├── fonts └── CustomIcons.ttf ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── smart_home │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── AppDelegate.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── main.m │ ├── AppDelegate.m │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj └── Podfile ├── screenshot ├── Screenshot 2019-08-19 at 10.44.45 AM.png ├── Screenshot 2019-08-19 at 10.45.35 AM.png ├── Screenshot 2019-08-19 at 10.50.45 AM.png └── Screenshot 2019-08-19 at 10.51.09 AM.png ├── lib ├── Model │ ├── activetabmodel.dart │ ├── homeinfomodel.dart │ ├── homedatamodel.dart │ ├── homepagedata.dart │ └── homeinfodata.dart ├── util │ └── util_smarthome.dart ├── tabpagewidgets │ ├── humiditywidget.dart │ ├── currenttempwidget.dart │ ├── tempswitch.dart │ ├── fancontroller.dart │ ├── changetempwidget.dart │ └── bottomcontrolpanel.dart ├── dialwidget │ ├── knobcontainer.dart │ ├── tickerpainter.dart │ ├── circletickpainter.dart │ ├── gesturedetector.dart │ └── controlknob.dart ├── icons │ └── my_flutter_app_icons.dart ├── homepagewidget │ ├── addnewwideget.dart │ ├── homeportraitlayout.dart │ ├── homelandscapelayout.dart │ ├── mainpageswitch.dart │ ├── homeappbar.dart │ ├── musicplayerwidget.dart │ └── homepagecard.dart ├── main.dart └── controlwidget │ └── airconditionerControl.dart ├── .metadata ├── test └── widget_test.dart ├── README.md ├── .gitignore ├── pubspec.yaml └── pubspec.lock /fonts/CustomIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/fonts/CustomIcons.ttf -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /screenshot/Screenshot 2019-08-19 at 10.44.45 AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/screenshot/Screenshot 2019-08-19 at 10.44.45 AM.png -------------------------------------------------------------------------------- /screenshot/Screenshot 2019-08-19 at 10.45.35 AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/screenshot/Screenshot 2019-08-19 at 10.45.35 AM.png -------------------------------------------------------------------------------- /screenshot/Screenshot 2019-08-19 at 10.50.45 AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/screenshot/Screenshot 2019-08-19 at 10.50.45 AM.png -------------------------------------------------------------------------------- /screenshot/Screenshot 2019-08-19 at 10.51.09 AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/screenshot/Screenshot 2019-08-19 at 10.51.09 AM.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ertcs/smart_home/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/Model/activetabmodel.dart: -------------------------------------------------------------------------------- 1 | 2 | class ActiveTabIndex{ 3 | int activeIndex; 4 | 5 | ActiveTabIndex(this.activeIndex); 6 | 7 | void setActiveTabIndex(int index){ 8 | activeIndex = index; 9 | 10 | } 11 | 12 | int get getActiveTab{ 13 | return activeIndex; 14 | } 15 | } -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 20e59316b8b8474554b38493b8ca888794b0234a 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/smart_home/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.smart_home; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /lib/util/util_smarthome.dart: -------------------------------------------------------------------------------- 1 | import 'package:intl/intl.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | DateFormat dateFormat = DateFormat("MMM dd, yyyy"); 5 | 6 | String get getCurrentDate{ 7 | return dateFormat.format(DateTime.now()); 8 | } 9 | 10 | 11 | const dateTextStyle = TextStyle(color: Colors.grey, fontSize: 16); 12 | 13 | const homeTitleTextStyle = TextStyle(fontSize: 30,color: Colors.black,fontWeight: FontWeight.bold); 14 | 15 | const notificationTextStyle = TextStyle(color: Colors.white,fontSize: 12); 16 | 17 | const cardTitleStyle = TextStyle(fontSize: 18,color: Colors.black,fontWeight: FontWeight.bold); 18 | 19 | -------------------------------------------------------------------------------- /lib/tabpagewidgets/humiditywidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HumidityWidget extends StatelessWidget { 4 | final String humidityUnit; 5 | 6 | HumidityWidget(this.humidityUnit); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Column( 11 | children: [ 12 | Text( 13 | 'Humidity', 14 | style: TextStyle(color: Colors.grey), 15 | ), 16 | Text( 17 | humidityUnit, 18 | style: TextStyle( 19 | fontSize: 20, 20 | color: Colors.black, 21 | ), 22 | ) 23 | ], 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/tabpagewidgets/currenttempwidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CurrentTempWidget extends StatelessWidget { 4 | final String currentTemp; 5 | 6 | CurrentTempWidget(this.currentTemp); 7 | @override 8 | Widget build(BuildContext context) { 9 | return Column( 10 | children: [ 11 | Text( 12 | 'Current temp.', 13 | style: TextStyle(color: Colors.grey), 14 | ), 15 | Text( 16 | currentTemp, 17 | style: TextStyle( 18 | fontSize: 20, 19 | color: Colors.black, 20 | ), 21 | ) 22 | ], 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/Model/homeinfomodel.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | class HomeInfoModel { 4 | String title; 5 | String currentTemp; 6 | String humidity; 7 | int setTemp; 8 | int fanSpeed; 9 | bool isFanOn; 10 | double knobReading; 11 | 12 | HomeInfoModel({ 13 | this.title="room", 14 | this.isFanOn = false, 15 | this.humidity = '24%', 16 | this.setTemp =0, 17 | this.fanSpeed=2, 18 | this.currentTemp='28°C', 19 | this.knobReading, 20 | }); 21 | 22 | void switchFan() { 23 | isFanOn = !isFanOn; 24 | } 25 | 26 | void setFanSpeed(int speed){ 27 | fanSpeed = speed; 28 | } 29 | 30 | void setKnobReading(double reading){ 31 | knobReading = reading; 32 | } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /lib/Model/homedatamodel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HomeDataModel { 4 | UserInfoModel userInfoModel; 5 | RoomInfoModel roomInfoModel; 6 | 7 | HomeDataModel(this.userInfoModel,this.roomInfoModel); 8 | } 9 | 10 | class UserInfoModel { 11 | String userImage; 12 | int notificationCount; 13 | 14 | UserInfoModel( 15 | {this.userImage = 16 | 'https://content-static.upwork.com/uploads/2014/10/01073429/profilephoto2.jpg', 17 | this.notificationCount = 5}) 18 | ; 19 | } 20 | 21 | class RoomInfoModel { 22 | bool isActive; 23 | String title; 24 | String subTitle; 25 | IconData iconData; 26 | RoomInfoModel({ 27 | this.isActive = false, 28 | this.title, 29 | this.subTitle, 30 | this.iconData, 31 | }); 32 | 33 | void switchToggle() { 34 | isActive = !isActive; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/dialwidget/knobcontainer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:smart_home/Model/homeinfodata.dart'; 4 | import 'package:smart_home/dialwidget/gesturedetector.dart'; 5 | 6 | 7 | class KnobContainer extends StatelessWidget { 8 | final int activeTab; 9 | KnobContainer(this.activeTab); 10 | @override 11 | Widget build(BuildContext context) { 12 | return Container( 13 | width: double.infinity, 14 | height: double.infinity, 15 | decoration: BoxDecoration( 16 | shape: BoxShape.circle, 17 | ), 18 | child: Consumer( 19 | builder: (context,infoData,child){ 20 | return CircleGestureDetector( 21 | infoModel: infoData, 22 | index:activeTab); 23 | }, 24 | 25 | ), 26 | ); 27 | } 28 | } -------------------------------------------------------------------------------- /lib/icons/my_flutter_app_icons.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/widgets.dart'; 3 | 4 | class CustomIcons { 5 | CustomIcons._(); 6 | 7 | static const _kFontFam = 'CustomIcons'; 8 | 9 | static const IconData router = const IconData(0xe800, fontFamily: _kFontFam); 10 | static const IconData temperatire = const IconData(0xe801, fontFamily: _kFontFam); 11 | static const IconData lightbulb_outline = const IconData(0xe802, fontFamily: _kFontFam); 12 | static const IconData music = const IconData(0xe803, fontFamily: _kFontFam); 13 | static const IconData home = const IconData(0xe804, fontFamily: _kFontFam); 14 | static const IconData group = const IconData(0xe805, fontFamily: _kFontFam); 15 | static const IconData sliders = const IconData(0xf1de, fontFamily: _kFontFam); 16 | static const IconData television = const IconData(0xf26c, fontFamily: _kFontFam); 17 | } 18 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/homepagewidget/addnewwideget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:dotted_border/dotted_border.dart'; 3 | import 'package:smart_home/util/util_smarthome.dart'; 4 | 5 | class AddNewWidget extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Padding( 9 | padding: const EdgeInsets.only(top: 20,left: 10,right: 10), 10 | child: DottedBorder( 11 | dashPattern: [2], 12 | color: Colors.grey[400], 13 | borderType: BorderType.RRect, 14 | radius: Radius.circular(12), 15 | strokeWidth: 2, 16 | child: Container( 17 | height: 70, 18 | child: Row( 19 | children: [ 20 | Expanded( 21 | flex: 1, 22 | child: Icon(Icons.add,color: Colors.grey,size: 30,), 23 | ), 24 | Expanded( 25 | flex: 2, 26 | child:Text('Add new device',style: dateTextStyle.copyWith(fontSize: 20),), 27 | ), 28 | ], 29 | 30 | ), 31 | ), 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:smart_home/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # smart_home 2 | 3 |

UI of Smart Home Control Panel App 4 |

UI design concept https://dribbble.com/shots/6959677-Smart-home/attachments/1785?mode=media 5 | 6 | ![Alt text](https://github.com/ertcs/smart_home/blob/master/screenshot/Screenshot%202019-08-19%20at%2010.44.45%20AM.png) 7 | ![Alt text](https://github.com/ertcs/smart_home/blob/master/screenshot/Screenshot%202019-08-19%20at%2010.45.35%20AM.png) 8 | ![Alt text](https://github.com/ertcs/smart_home/blob/master/screenshot/Screenshot%202019-08-19%20at%2010.50.45%20AM.png) 9 | ![Alt text](https://github.com/ertcs/smart_home/blob/master/screenshot/Screenshot%202019-08-19%20at%2010.51.09%20AM.png) 10 | ![Watch the video](http://i3.ytimg.com/vi/Z6ZFLlrda_Y/maxresdefault.jpg)](https://youtu.be/Z6ZFLlrda_Y) 11 | 12 | ## Getting Started 13 | 14 | This project is a starting point for a Flutter application. 15 | 16 | A few resources to get you started if this is your first Flutter project: 17 | 18 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 19 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 20 | 21 | For help getting started with Flutter, view our 22 | [online documentation](https://flutter.dev/docs), which offers tutorials, 23 | samples, guidance on mobile development, and a full API reference. 24 | -------------------------------------------------------------------------------- /lib/dialwidget/tickerpainter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'dart:math'; 3 | 4 | 5 | class TickPainter extends CustomPainter { 6 | final LONG_TICK = 15.0; 7 | final SHORT_TICK = 5.0; 8 | final tickCount; 9 | final tickPerSection; 10 | final tickInset; 11 | final tickPaint; 12 | final currentTem; 13 | 14 | TickPainter({ 15 | this.tickCount = 31, 16 | this.tickPerSection = 5, 17 | this.tickInset = 0.0, 18 | this.currentTem, 19 | }) : tickPaint = new Paint() { 20 | tickPaint.strokeWidth = 1.5; 21 | } 22 | 23 | @override 24 | void paint(Canvas canvas, Size size) { 25 | final radius = size.width / 2; 26 | 27 | canvas.translate(size.width / 2, size.height / 2); 28 | 29 | canvas.save(); 30 | 31 | for (int i = 0; i < tickCount; i++) { 32 | currentTem>=i?tickPaint.color = Colors.blueAccent:tickPaint.color = Colors.deepOrange; 33 | final ticklenght = i % tickPerSection == 0 ? LONG_TICK : SHORT_TICK; 34 | canvas.drawLine( 35 | Offset(0.0, radius), 36 | Offset(0.0, radius + ticklenght), 37 | tickPaint, 38 | ); 39 | 40 | canvas.rotate((2 * pi / tickCount) / 2); 41 | } 42 | 43 | canvas.restore(); 44 | } 45 | 46 | @override 47 | bool shouldRepaint(CustomPainter oldDelegate) { 48 | // TODO: implement shouldRepaint 49 | return true; 50 | } 51 | } -------------------------------------------------------------------------------- /lib/homepagewidget/homeportraitlayout.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:smart_home/util/util_smarthome.dart'; 3 | import 'homepagecard.dart'; 4 | import 'musicplayerwidget.dart'; 5 | import 'addnewwideget.dart'; 6 | 7 | class HomePortraitLayout extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return Column( 11 | crossAxisAlignment: CrossAxisAlignment.start, 12 | children: [ 13 | SizedBox(height: 30), 14 | Text( 15 | 'Devices'.toUpperCase(), 16 | style: dateTextStyle.copyWith(color: Colors.grey[700]), 17 | ), 18 | SizedBox( 19 | height: 10, 20 | ), 21 | Row( 22 | children: [ 23 | HomePageCard( 24 | index: 0, 25 | ), 26 | HomePageCard( 27 | index: 1, 28 | ), 29 | ], 30 | ), 31 | MusicCardWidget(), 32 | Row( 33 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 34 | children: [ 35 | HomePageCard( 36 | index: 3, 37 | ), 38 | HomePageCard( 39 | index: 4, 40 | ), 41 | ], 42 | ), 43 | AddNewWidget(), 44 | SizedBox(height: 30,) 45 | 46 | ], 47 | ); 48 | } 49 | } -------------------------------------------------------------------------------- /lib/homepagewidget/homelandscapelayout.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:smart_home/homepagewidget/homeappbar.dart'; 3 | import 'package:smart_home/util/util_smarthome.dart'; 4 | import 'homepagecard.dart'; 5 | import 'musicplayerwidget.dart'; 6 | import 'addnewwideget.dart'; 7 | 8 | class HomeLandScapeLayout extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Column( 12 | crossAxisAlignment: CrossAxisAlignment.start, 13 | children: [ 14 | HomeAppBar(), 15 | SizedBox( 16 | height: 10, 17 | ), 18 | Text( 19 | 'Devices'.toUpperCase(), 20 | style: dateTextStyle.copyWith(color: Colors.grey[700]), 21 | ), 22 | SizedBox( 23 | height: 10, 24 | ), 25 | Row( 26 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 27 | children: [ 28 | HomePageCard( 29 | index: 0, 30 | ), 31 | HomePageCard( 32 | index: 1, 33 | ), 34 | HomePageCard( 35 | index: 3, 36 | ), 37 | HomePageCard( 38 | index: 4, 39 | ), 40 | ], 41 | ), 42 | MusicCardWidget(), 43 | AddNewWidget(), 44 | SizedBox(height: 30,) 45 | ], 46 | ); 47 | } 48 | } -------------------------------------------------------------------------------- /lib/homepagewidget/mainpageswitch.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MainPageSwitch extends StatelessWidget { 4 | final bool isFanOn; 5 | final Function switchFan; 6 | 7 | MainPageSwitch({this.isFanOn,this.switchFan}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Padding( 12 | padding: const EdgeInsets.only(top: 6), 13 | child: GestureDetector( 14 | onTap: switchFan, 15 | child: Container( 16 | height: 20,width: 38, 17 | decoration: BoxDecoration( 18 | color: isFanOn?Colors.blueAccent:Colors.grey[300], 19 | borderRadius: BorderRadius.circular(30) 20 | ), 21 | child: Padding( 22 | padding: EdgeInsets.all(3), 23 | child: Align( 24 | alignment: isFanOn?Alignment.centerRight:Alignment.centerLeft, 25 | child: Material( 26 | elevation: 4, 27 | shape: CircleBorder(), 28 | child: Container( 29 | width: 14, 30 | height: 14, 31 | decoration: BoxDecoration( 32 | color: Colors.white, 33 | borderRadius: BorderRadius.circular(10) 34 | ), 35 | ), 36 | ), 37 | ) 38 | ), 39 | ), 40 | ), 41 | ); 42 | } 43 | } -------------------------------------------------------------------------------- /lib/Model/homepagedata.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:smart_home/Model/homedatamodel.dart'; 3 | import 'package:smart_home/icons/my_flutter_app_icons.dart'; 4 | 5 | class HomePageData extends ChangeNotifier { 6 | List userInfo = [ 7 | UserInfoModel( 8 | userImage: 9 | 'https://content-static.upwork.com/uploads/2014/10/01073429/profilephoto2.jpg', 10 | notificationCount: 1) 11 | ]; 12 | 13 | List roomInfoData = [ 14 | RoomInfoModel( 15 | title: 'Temperature', 16 | subTitle: 'Bedroom,Kitchen', 17 | isActive: true, 18 | iconData: CustomIcons.temperatire), 19 | RoomInfoModel( 20 | title: 'Lights', 21 | subTitle: 'Bedroom,Kitchen', 22 | isActive: true, 23 | iconData: CustomIcons.lightbulb_outline), 24 | RoomInfoModel( 25 | title: 'Music', 26 | subTitle: 'Johg Robinson - N', 27 | isActive: true, 28 | iconData: CustomIcons.music), 29 | RoomInfoModel( 30 | title: 'Smart TV', 31 | subTitle: 'Playing HBO', 32 | isActive: false, 33 | iconData: CustomIcons.television), 34 | RoomInfoModel( 35 | title: 'Router', 36 | subTitle: '128.67/Mbit/s', 37 | isActive: true, 38 | iconData: CustomIcons.router) 39 | ]; 40 | 41 | void switchOffAll(RoomInfoModel roomInfoModel) { 42 | roomInfoModel.switchToggle(); 43 | notifyListeners(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | smart_home 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /lib/dialwidget/circletickpainter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'dart:math'; 3 | 4 | class AllTickPainter extends CustomPainter { 5 | var tickPaint = new Paint(); 6 | var circlePaint = Paint(); 7 | 8 | @override 9 | void paint(Canvas canvas, Size size) { 10 | tickPaint.strokeWidth = 1; 11 | tickPaint.color = Colors.grey; 12 | tickPaint.strokeCap = StrokeCap.round; 13 | double length=10; 14 | double rightLength=-9.5; 15 | double strokewidth =1; 16 | double strokewidthright = 0; 17 | 18 | circlePaint = new Paint() 19 | ..color = Colors.blueAccent 20 | ..strokeCap = StrokeCap.round 21 | ..style = PaintingStyle.stroke 22 | ..strokeWidth = 1; 23 | 24 | final radius = size.width / 2; 25 | canvas.translate(size.width / 2, size.height / 2); 26 | for (int i = 0; i < 100; i++) { 27 | if(i>7&&i<51){ 28 | length = length-0.5; 29 | 30 | strokewidth = strokewidth-(1/44); 31 | tickPaint.strokeWidth = strokewidth; 32 | 33 | }else if(i>50&&i<94){ 34 | rightLength = rightLength+0.5; 35 | length = rightLength; 36 | 37 | strokewidthright = strokewidthright+(1/44); 38 | tickPaint.strokeWidth = strokewidthright; 39 | }else{ 40 | tickPaint.strokeWidth =1; 41 | length =12; 42 | } 43 | 44 | 45 | 46 | canvas.drawLine( 47 | Offset(0.0, radius + 8), 48 | Offset(0.0, radius-length), 49 | tickPaint, 50 | ); 51 | 52 | canvas.rotate((2 * pi / 100)); 53 | 54 | } 55 | 56 | } 57 | 58 | @override 59 | bool shouldRepaint(CustomPainter oldDelegate) { 60 | // TODO: implement shouldRepaint 61 | return true; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/ServiceDefinitions.json 65 | **/ios/Runner/GeneratedPluginRegistrant.* 66 | 67 | # Exceptions to above rules. 68 | !**/ios/**/default.mode1v3 69 | !**/ios/**/default.mode2v3 70 | !**/ios/**/default.pbxuser 71 | !**/ios/**/default.perspectivev3 72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 73 | -------------------------------------------------------------------------------- /lib/tabpagewidgets/tempswitch.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | 4 | 5 | class TempSwitch extends StatelessWidget { 6 | final bool isFanOn; 7 | final Function switchFan; 8 | 9 | TempSwitch(this.isFanOn,this.switchFan); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return GestureDetector( 14 | onTap: switchFan, 15 | child: Container( 16 | height: 35,width: 64, 17 | decoration: BoxDecoration( 18 | color: isFanOn?Colors.blueAccent:Colors.grey[300], 19 | borderRadius: BorderRadius.circular(10) 20 | ), 21 | child: Padding( 22 | padding: EdgeInsets.all(3), 23 | child: Align( 24 | alignment: isFanOn?Alignment.centerLeft:Alignment.centerRight, 25 | child: Container( 26 | width: 30, 27 | decoration: BoxDecoration( 28 | color: Colors.white, 29 | borderRadius: BorderRadius.circular(6) 30 | ), 31 | child: Row( 32 | crossAxisAlignment: CrossAxisAlignment.center, 33 | mainAxisAlignment: MainAxisAlignment.center, 34 | children: [ 35 | Padding( 36 | padding: const EdgeInsets.only(top: 7,bottom: 7,right: 3), 37 | child: Container(color: Colors.grey[300],width: 2,), 38 | ), 39 | Padding( 40 | padding: const EdgeInsets.only(top: 7,bottom: 7), 41 | child: Container(color: Colors.grey[300],width: 2,), 42 | ), 43 | ], 44 | ), 45 | ), 46 | ) 47 | ), 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: smart_home 2 | description: UI of Smart Home Control Panel App 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | fluttery: ^0.0.8 27 | provider: ^3.0.0+1 28 | intl: 29 | dotted_border: ^1.0.2 30 | 31 | 32 | 33 | dev_dependencies: 34 | flutter_test: 35 | sdk: flutter 36 | 37 | 38 | # For information on the generic Dart part of this file, see the 39 | # following page: https://dart.dev/tools/pub/pubspec 40 | 41 | # The following section is specific to Flutter. 42 | flutter: 43 | 44 | # The following line ensures that the Material Icons font is 45 | # included with your application, so that you can use the icons in 46 | # the material Icons class. 47 | uses-material-design: true 48 | 49 | fonts: 50 | - family: CustomIcons 51 | fonts: 52 | - asset: fonts/CustomIcons.ttf 53 | 54 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.smart_home" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'androidx.test:runner:1.1.1' 60 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 61 | } 62 | -------------------------------------------------------------------------------- /lib/tabpagewidgets/fancontroller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | 4 | class FanSpeedControl extends StatelessWidget { 5 | 6 | final bool isFanOn; 7 | final int fanSpeed; 8 | final Function changeFanSpeed; 9 | 10 | FanSpeedControl({this.isFanOn,this.fanSpeed,this.changeFanSpeed}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | 15 | return Container( 16 | height: 35, 17 | width: 240, 18 | decoration: BoxDecoration( 19 | borderRadius: BorderRadius.circular(10), 20 | color: Colors.white 21 | ), 22 | child: Row( 23 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 24 | children: [ 25 | GestureDetector( 26 | onTap: ()=>changeFanSpeed(1), 27 | child: Container( 28 | width: 30, 29 | decoration: BoxDecoration( 30 | borderRadius: BorderRadius.only(topLeft: Radius.circular(10),bottomLeft: Radius.circular(10)), 31 | color: fanSpeed>=1&&isFanOn?Colors.blueAccent:Colors.grey[200] 32 | ), 33 | ), 34 | ), 35 | GestureDetector( 36 | onTap: ()=>changeFanSpeed(2), 37 | child: Container( 38 | width: 50, 39 | color: fanSpeed>=2&&isFanOn?Colors.blueAccent:Colors.grey[200], 40 | ), 41 | ), 42 | GestureDetector( 43 | onTap: ()=>changeFanSpeed(3), 44 | child: Container( 45 | width: 70, 46 | color: fanSpeed>=3&&isFanOn?Colors.blueAccent:Colors.grey[200], 47 | 48 | ), 49 | ), 50 | GestureDetector( 51 | onTap: ()=>changeFanSpeed(4), 52 | child: Container( 53 | width: 80, 54 | decoration: BoxDecoration( 55 | borderRadius: BorderRadius.only(topRight: Radius.circular(10),bottomRight: Radius.circular(10)), 56 | color: fanSpeed==4&&isFanOn?Colors.blueAccent:Colors.grey[200], 57 | ), 58 | ), 59 | ), 60 | 61 | ], 62 | ), 63 | 64 | );; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/Model/homeinfodata.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:smart_home/Model/homeinfomodel.dart'; 3 | import 'activetabmodel.dart'; 4 | 5 | class HomeInfoData extends ChangeNotifier { 6 | List infoData = [ 7 | HomeInfoModel( 8 | title: 'Living Room', 9 | isFanOn: false, 10 | humidity: '33%', 11 | setTemp: 23, 12 | fanSpeed: 0, 13 | currentTemp: '25°C', 14 | knobReading: 0.37 15 | ), 16 | HomeInfoModel( 17 | title: 'Dining', 18 | isFanOn: true, 19 | humidity: '30%', 20 | setTemp: 16, 21 | fanSpeed: 1, 22 | currentTemp: '18°C', 23 | knobReading: 0.26 24 | ), 25 | HomeInfoModel( 26 | title: 'Kitchen', 27 | isFanOn: false, 28 | humidity: '48%', 29 | setTemp: 28, 30 | fanSpeed: 3, 31 | currentTemp: '30°C', 32 | knobReading: 0.45 33 | ), 34 | HomeInfoModel( 35 | title: 'Bathroom', 36 | isFanOn: true, 37 | humidity: '30%', 38 | setTemp: 24, 39 | fanSpeed: 3, 40 | currentTemp: '25°C', 41 | knobReading: 0.386 42 | ), 43 | ]; 44 | 45 | ActiveTabIndex tabIndex; 46 | 47 | void setTabIndex(int index){ 48 | tabIndex.setActiveTabIndex(index); 49 | notifyListeners(); 50 | } 51 | 52 | int get tabIndexCount{ 53 | return tabIndex.activeIndex; 54 | } 55 | 56 | 57 | void changeFanSpeed(HomeInfoModel infoModel, int speed) { 58 | infoModel.setFanSpeed(speed); 59 | notifyListeners(); 60 | } 61 | 62 | HomeInfoModel infoModel(int index) { 63 | return infoData[index]; 64 | } 65 | 66 | void changeTemp(HomeInfoModel infoModel, int changeTemp) { 67 | infoModel.setTemp = changeTemp; 68 | notifyListeners(); 69 | } 70 | 71 | int get roomCount { 72 | return infoData.length; 73 | } 74 | 75 | void switchFan(HomeInfoModel infoModel){ 76 | infoModel.switchFan(); 77 | notifyListeners(); 78 | } 79 | 80 | void setKnobPreCent(HomeInfoModel infoModel, double reading){ 81 | infoModel.setKnobReading(reading); 82 | notifyListeners(); 83 | 84 | } 85 | 86 | double getKnobReading(int index){ 87 | return infoData[index].knobReading; 88 | } 89 | 90 | 91 | 92 | 93 | } 94 | -------------------------------------------------------------------------------- /lib/tabpagewidgets/changetempwidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:smart_home/icons/my_flutter_app_icons.dart'; 3 | import 'package:provider/provider.dart'; 4 | import 'package:smart_home/Model/homeinfodata.dart'; 5 | 6 | class ChangeTempWidget extends StatelessWidget { 7 | final int setTemp; 8 | 9 | ChangeTempWidget(this.setTemp); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Consumer( 14 | builder: (context, infoData,child){ 15 | final bool isPortrait = MediaQuery.of(context).orientation == Orientation.portrait; 16 | return Column( 17 | children: [ 18 | Padding( 19 | padding: EdgeInsets.only(top: isPortrait?30:2), 20 | child: Row( 21 | mainAxisAlignment: MainAxisAlignment.center, 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | children: [ 24 | Row( 25 | mainAxisSize: MainAxisSize.min, 26 | mainAxisAlignment: MainAxisAlignment.start, 27 | crossAxisAlignment: CrossAxisAlignment.center, 28 | children: [ 29 | Icon( 30 | CustomIcons.temperatire, 31 | size: 30, 32 | color: Colors.grey, 33 | ), 34 | SizedBox( 35 | width: 10, 36 | ), 37 | Text( 38 | setTemp.toString(), 39 | style: TextStyle( 40 | fontSize: 80, fontWeight: FontWeight.bold), 41 | 42 | ), 43 | SizedBox( 44 | width: 2, 45 | ), 46 | 47 | ], 48 | ), 49 | Padding( 50 | padding: const EdgeInsets.only(top: 12), 51 | child: Text( 52 | '°C', 53 | style: TextStyle(color: Colors.grey, fontSize: 20), 54 | ), 55 | ) 56 | ], 57 | ), 58 | ), 59 | Padding( 60 | padding: const EdgeInsets.only(bottom: 10), 61 | child: Text('TEMPERATURE'), 62 | ), 63 | ], 64 | ); 65 | }, 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/dialwidget/gesturedetector.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:smart_home/Model/homeinfodata.dart'; 3 | import 'package:fluttery/gestures.dart'; 4 | import 'package:smart_home/dialwidget/controlknob.dart'; 5 | import 'dart:math'; 6 | 7 | 8 | class CircleGestureDetector extends StatefulWidget { 9 | 10 | final HomeInfoData infoModel; 11 | final int index; 12 | 13 | CircleGestureDetector({this.infoModel,this.index}); 14 | 15 | @override 16 | _CircleGestureDetectorState createState() => _CircleGestureDetectorState(); 17 | } 18 | 19 | class _CircleGestureDetectorState extends State { 20 | 21 | double _seekPrecent=0.0; 22 | PolarCoord _startDragCoord; 23 | double _startDragPreCent; 24 | double _currentDragPreCent; 25 | 26 | 27 | 28 | _onRadialDragStart(PolarCoord coord){ 29 | _startDragCoord = coord; 30 | _startDragPreCent =widget.infoModel.infoModel(widget.index).knobReading; 31 | } 32 | 33 | _onRadialDragUpdate(PolarCoord coord){ 34 | if(_startDragCoord!=null){ 35 | final dragAngle = coord.angle-_startDragCoord.angle; 36 | final dragPreCent = dragAngle/(2*pi); 37 | final dragValue = (_startDragPreCent+dragPreCent)%1.0.clamp(0.0, 0.5); 38 | final max1= (dragValue*31*2).round(); 39 | 40 | setState(() { 41 | final bool isFanOn = widget.infoModel.infoData[widget.index].isFanOn; 42 | if(isFanOn){ 43 | _currentDragPreCent = dragValue??0.0; 44 | widget.infoModel.setKnobPreCent(widget.infoModel.infoData[widget.index], _currentDragPreCent??_seekPrecent); 45 | widget.infoModel.changeTemp(widget.infoModel.infoModel(widget.index), max1); 46 | print('darcoord: ${max1}'); 47 | 48 | } 49 | } 50 | ); 51 | 52 | } 53 | 54 | 55 | } 56 | 57 | onRadialDragEnd(){ 58 | final bool isFanOn = widget.infoModel.infoData[widget.index].isFanOn; 59 | if(isFanOn){ 60 | setState(() { 61 | _seekPrecent = _currentDragPreCent; 62 | _currentDragPreCent = null; 63 | _startDragCoord=null; 64 | _startDragPreCent=0.0; 65 | }); 66 | } 67 | 68 | 69 | } 70 | 71 | @override 72 | Widget build(BuildContext context) { 73 | return RadialDragGestureDetector( 74 | onRadialDragStart: _onRadialDragStart, 75 | onRadialDragUpdate: _onRadialDragUpdate, 76 | onRadialDragEnd: onRadialDragEnd, 77 | 78 | child: ControlKnob(widget.infoModel.getKnobReading(widget.index)), 79 | 80 | ); 81 | } 82 | 83 | } -------------------------------------------------------------------------------- /lib/homepagewidget/homeappbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:smart_home/Model/homepagedata.dart'; 4 | import 'package:smart_home/util/util_smarthome.dart'; 5 | 6 | class HomeAppBar extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | return Consumer( 10 | builder: (context, data,child){ 11 | return Padding( 12 | padding: const EdgeInsets.only(top: 58), 13 | child: Row( 14 | mainAxisSize: MainAxisSize.max, 15 | crossAxisAlignment: CrossAxisAlignment.start, 16 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 17 | children: [ 18 | Column( 19 | crossAxisAlignment: CrossAxisAlignment.start, 20 | children: [ 21 | Text( 22 | getCurrentDate, 23 | style: 24 | dateTextStyle.copyWith(color: Colors.grey[700]), 25 | ), 26 | Text( 27 | 'Smart home', 28 | style: homeTitleTextStyle, 29 | ) 30 | ], 31 | ), 32 | Stack( 33 | alignment: Alignment.center, 34 | children: [ 35 | Center( 36 | child: CircleAvatar( 37 | backgroundImage: 38 | NetworkImage(data.userInfo[0].userImage), 39 | ), 40 | ), 41 | 42 | data.userInfo[0].notificationCount>0? 43 | Padding( 44 | padding: EdgeInsets.only( 45 | left: 30, 46 | bottom: 30, 47 | ), 48 | child: Container( 49 | height: 20, 50 | width: 20, 51 | decoration: BoxDecoration( 52 | color: Colors.blue, 53 | border: 54 | Border.all(color: Colors.white, width: 2), 55 | shape: BoxShape.circle), 56 | child: Center( 57 | child: Text( 58 | data.userInfo[0].notificationCount.toString(), 59 | style: notificationTextStyle, 60 | )), 61 | ), 62 | ):Container() 63 | ], 64 | ) 65 | ], 66 | ), 67 | ); 68 | }, 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 37 | # referring to absolute paths on developers' machines. 38 | system('rm -rf .symlinks') 39 | system('mkdir -p .symlinks/plugins') 40 | 41 | # Flutter Pods 42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 43 | if generated_xcode_build_settings.empty? 44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first." 45 | end 46 | generated_xcode_build_settings.map { |p| 47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 48 | symlink = File.join('.symlinks', 'flutter') 49 | File.symlink(File.dirname(p[:path]), symlink) 50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 51 | end 52 | } 53 | 54 | # Plugin Pods 55 | plugin_pods = parse_KV_file('../.flutter-plugins') 56 | plugin_pods.map { |p| 57 | symlink = File.join('.symlinks', 'plugins', p[:name]) 58 | File.symlink(p[:path], symlink) 59 | pod p[:name], :path => File.join(symlink, 'ios') 60 | } 61 | end 62 | 63 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. 64 | install! 'cocoapods', :disable_input_output_paths => true 65 | 66 | post_install do |installer| 67 | installer.pods_project.targets.each do |target| 68 | target.build_configurations.each do |config| 69 | config.build_settings['ENABLE_BITCODE'] = 'NO' 70 | end 71 | end 72 | end 73 | -------------------------------------------------------------------------------- /lib/tabpagewidgets/bottomcontrolpanel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:smart_home/Model/homeinfodata.dart'; 4 | import 'package:smart_home/tabpagewidgets/tempswitch.dart'; 5 | import 'package:smart_home/tabpagewidgets/fancontroller.dart'; 6 | import 'package:smart_home/Model/homeinfomodel.dart'; 7 | 8 | 9 | // not in use 10 | 11 | class BottomControlPanel extends StatelessWidget { 12 | final int tabIndex; 13 | 14 | BottomControlPanel(this.tabIndex); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Consumer( 19 | builder: (context,data,child){ 20 | HomeInfoModel roomData = data.infoData[tabIndex]; 21 | bool ismyFanOn = roomData.isFanOn; 22 | return Container( 23 | child: Padding( 24 | padding: const EdgeInsets.only(bottom: 35), 25 | child: Row( 26 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 27 | crossAxisAlignment: CrossAxisAlignment.start, 28 | children: [ 29 | Padding( 30 | padding: const EdgeInsets.only( 31 | left: 20, bottom: 20, top: 10), 32 | child: Column( 33 | crossAxisAlignment: CrossAxisAlignment.start, 34 | children: [ 35 | Text('Turn on/off'), 36 | SizedBox( 37 | height: 5, 38 | ), 39 | TempSwitch(roomData.isFanOn,(){ 40 | data.switchFan(roomData); 41 | }), 42 | ], 43 | ), 44 | ), 45 | Column( 46 | children: [ 47 | Padding( 48 | padding: const EdgeInsets.only( 49 | right: 20, bottom: 20, top: 10, left: 20), 50 | child: Column( 51 | crossAxisAlignment: CrossAxisAlignment.end, 52 | children: [ 53 | Text('Set Speed'), 54 | SizedBox( 55 | height: 5, 56 | ), 57 | FanSpeedControl( 58 | isFanOn: roomData.isFanOn, 59 | fanSpeed: roomData.fanSpeed, 60 | changeFanSpeed: (speed){ 61 | data.changeFanSpeed(roomData, speed); 62 | 63 | }, 64 | ) 65 | ], 66 | ), 67 | ), 68 | ], 69 | ) 70 | ], 71 | ), 72 | ), 73 | ); 74 | }, 75 | ); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/dialwidget/controlknob.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'dart:math'; 3 | import 'package:smart_home/dialwidget/circletickpainter.dart'; 4 | 5 | class ControlKnob extends StatelessWidget { 6 | final double knobReading; 7 | 8 | ControlKnob(this.knobReading); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | final bool isPortrait = MediaQuery.of(context).orientation == Orientation.portrait; 13 | return Transform( 14 | transform:Matrix4.rotationZ(2*pi*knobReading), 15 | alignment: Alignment.center, 16 | child: Padding( 17 | padding: isPortrait?const EdgeInsets.all(70.0):const EdgeInsets.all(30.0), 18 | child: Material( 19 | color: Colors.blueAccent, 20 | elevation: 10, 21 | shape: CircleBorder(), 22 | shadowColor: Colors.blueAccent, 23 | child: Transform.rotate( 24 | // (2*pi)*0.75 25 | angle: (2*pi)*0.75, 26 | child: Container( 27 | width: double.infinity, 28 | height: double.infinity, 29 | decoration: BoxDecoration( 30 | color: Colors.white, 31 | shape: BoxShape.circle, 32 | boxShadow: [ 33 | BoxShadow( 34 | color: Colors.blueAccent, 35 | blurRadius: 1.0, 36 | spreadRadius: 1.0, 37 | offset: const Offset(0.0, 1.0), 38 | ) 39 | ]), 40 | child: Stack( 41 | children: [ 42 | Padding( 43 | padding: isPortrait?const EdgeInsets.all(12):const EdgeInsets.all(47.0), 44 | child: Container( 45 | width: double.infinity, 46 | height: double.infinity, 47 | decoration: 48 | BoxDecoration(shape: BoxShape.circle), 49 | child: Padding( 50 | padding: isPortrait?const EdgeInsets.all(20.0):const EdgeInsets.all(45.0), 51 | child: CustomPaint( 52 | painter: AllTickPainter(), 53 | ), 54 | ), 55 | ), 56 | ), 57 | Align( 58 | alignment: Alignment.topCenter, 59 | child: Padding( 60 | padding: const EdgeInsets.all(5.0), 61 | child: Container( 62 | height: 10, 63 | width: 10, 64 | decoration: BoxDecoration( 65 | shape: BoxShape.circle, 66 | color: Colors.blueAccent), 67 | ), 68 | ), 69 | ) 70 | ], 71 | ), 72 | ), 73 | ), 74 | ), 75 | ), 76 | ); 77 | } 78 | } -------------------------------------------------------------------------------- /lib/homepagewidget/musicplayerwidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:smart_home/Model/homepagedata.dart'; 3 | import 'package:smart_home/util/util_smarthome.dart'; 4 | import 'package:provider/provider.dart'; 5 | 6 | class MusicCardWidget extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | final double screenSize = MediaQuery.of(context).size.width; 10 | final double cardWidth = (screenSize - 60) / 2; 11 | final bool isPortrait = MediaQuery.of(context).orientation == Orientation.portrait; 12 | return Consumer( 13 | builder: (context,data,child){ 14 | bool isActive = data.roomInfoData[2].isActive; 15 | return Card( 16 | elevation: isActive?10:0, 17 | color: Colors.white, 18 | shape: RoundedRectangleBorder( 19 | borderRadius: BorderRadius.circular(30.0)), 20 | child: Container( 21 | height: isPortrait ? cardWidth*.95:cardWidth*0.2, 22 | width: isPortrait?double.infinity:cardWidth*80, 23 | child: Padding( 24 | padding: EdgeInsets.all(6), 25 | child: Row( 26 | crossAxisAlignment: CrossAxisAlignment.center, 27 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 28 | children: [ 29 | Icon( 30 | data.roomInfoData[2].iconData, 31 | size: 50, 32 | color: isActive?Colors.blueAccent:Colors.grey, 33 | ), 34 | Column( 35 | mainAxisAlignment: MainAxisAlignment.center, 36 | crossAxisAlignment: CrossAxisAlignment.start, 37 | children: [ 38 | Text(data.roomInfoData[2].title, 39 | style: homeTitleTextStyle.copyWith( 40 | fontSize: 20, 41 | color: isActive?Colors.black:Colors.grey, 42 | ),), 43 | Text(data.roomInfoData[2].subTitle,style: dateTextStyle,), 44 | ], 45 | ), 46 | Row( 47 | children: [ 48 | Icon(Icons.fast_rewind,color: Colors.grey,size: 30,), 49 | GestureDetector( 50 | onTap: (){ 51 | data.switchOffAll(data.roomInfoData[2]); 52 | }, 53 | child: Icon( 54 | isActive?Icons.play_arrow:Icons.pause, 55 | color: isActive?Colors.blueAccent:Colors.grey, 56 | size: 40, 57 | ), 58 | ), 59 | Icon(Icons.fast_forward,color: Colors.grey,size: 30,), 60 | ], 61 | ) 62 | ], 63 | ), 64 | ), 65 | ), 66 | ); 67 | }, 68 | ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /lib/homepagewidget/homepagecard.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:smart_home/homepagewidget/mainpageswitch.dart'; 3 | import 'package:provider/provider.dart'; 4 | import 'package:smart_home/Model/homepagedata.dart'; 5 | import 'package:smart_home/util/util_smarthome.dart'; 6 | import 'package:smart_home/Model/homedatamodel.dart'; 7 | import 'package:smart_home/controlwidget/airconditionerControl.dart'; 8 | 9 | class HomePageCard extends StatelessWidget { 10 | final int index; 11 | 12 | HomePageCard({this.index}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | final double screenSize = MediaQuery.of(context).size.width; 17 | final double cardWidth = (screenSize - 60) / 2; 18 | final bool isPortrait = MediaQuery.of(context).orientation == Orientation.portrait; 19 | return Consumer( 20 | builder: (context, data, child){ 21 | RoomInfoModel roomInfoModel = data.roomInfoData[index]; 22 | return Card( 23 | elevation: roomInfoModel.isActive?6:0, 24 | color: Colors.white, 25 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.0)), 26 | child: Container( 27 | height: isPortrait ? cardWidth*.95:180, 28 | width: isPortrait?cardWidth:180, 29 | child: Padding( 30 | padding: EdgeInsets.all(20), 31 | child: Column( 32 | crossAxisAlignment: CrossAxisAlignment.start, 33 | children: [ 34 | Row( 35 | crossAxisAlignment: CrossAxisAlignment.start, 36 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 37 | children: [ 38 | Icon( 39 | roomInfoModel.iconData, 40 | color: roomInfoModel.isActive?Colors.blueAccent:Colors.grey, 41 | size: 45, 42 | ), 43 | MainPageSwitch( 44 | isFanOn: roomInfoModel.isActive, 45 | switchFan: () { 46 | data.switchOffAll(roomInfoModel); 47 | }, 48 | ) 49 | ], 50 | ), 51 | GestureDetector( 52 | onTap: (){ 53 | if(index==0){ 54 | Navigator.push( 55 | context, 56 | MaterialPageRoute(builder: (context) => AirConditionerControlUnit()), 57 | ); 58 | } 59 | }, 60 | child: Column( 61 | crossAxisAlignment: CrossAxisAlignment.start, 62 | children: [ 63 | SizedBox( 64 | height: 20, 65 | ), 66 | Text( 67 | roomInfoModel.title, 68 | style: cardTitleStyle.copyWith(color: roomInfoModel?.isActive?Colors.black:Colors.grey), 69 | ), 70 | Text( 71 | roomInfoModel.isActive?roomInfoModel.subTitle:'', 72 | style: dateTextStyle, 73 | maxLines: 1, 74 | ) 75 | ], 76 | ), 77 | ) 78 | 79 | ], 80 | ), 81 | ), 82 | ), 83 | ); 84 | } 85 | );; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:smart_home/Model/homepagedata.dart'; 4 | import 'homepagewidget/homeappbar.dart'; 5 | import 'icons/my_flutter_app_icons.dart'; 6 | import 'homepagewidget/homelandscapelayout.dart'; 7 | import 'homepagewidget/homeportraitlayout.dart'; 8 | 9 | void main() => runApp(new MyApp()); 10 | 11 | class MyApp extends StatelessWidget { 12 | @override 13 | Widget build(BuildContext context) { 14 | return MaterialApp( 15 | debugShowCheckedModeBanner: false, 16 | home: Home(), 17 | ); 18 | } 19 | } 20 | 21 | class Home extends StatefulWidget { 22 | @override 23 | _HomeState createState() => _HomeState(); 24 | } 25 | 26 | class _HomeState extends State { 27 | int _selectedIndex = 0; 28 | static const TextStyle optionStyle = 29 | TextStyle(fontSize: 30, fontWeight: FontWeight.bold); 30 | 31 | // static const List _widgetOptions = [ 32 | // Text( 33 | // 'Index 0: home', 34 | // style: optionStyle, 35 | // ), 36 | // Text( 37 | // 'Index 1: members', 38 | // style: optionStyle, 39 | // ), 40 | // Text( 41 | // 'Index 2: setting', 42 | // style: optionStyle, 43 | // ), 44 | // ]; 45 | 46 | void _onItemTapped(int index) { 47 | setState(() { 48 | _selectedIndex = index; 49 | }); 50 | } 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | return Scaffold( 55 | backgroundColor: Colors.grey[200], 56 | body: HomePage(), 57 | bottomNavigationBar: BottomNavigationBar( 58 | items: const [ 59 | BottomNavigationBarItem( 60 | icon: Icon(CustomIcons.home), 61 | title: Text('home') 62 | ), 63 | BottomNavigationBarItem( 64 | icon: Icon(CustomIcons.group), 65 | title: Text('members'), 66 | ), 67 | BottomNavigationBarItem( 68 | icon: Icon(CustomIcons.sliders), 69 | title: Text('setting'), 70 | ), 71 | ], 72 | currentIndex: _selectedIndex, 73 | selectedItemColor: Colors.black, 74 | onTap: _onItemTapped, 75 | ), 76 | ); 77 | } 78 | } 79 | 80 | class HomePage extends StatelessWidget { 81 | @override 82 | Widget build(BuildContext context) { 83 | return OrientationBuilder( 84 | builder: (context, orientation) { 85 | return ChangeNotifierProvider( 86 | builder: (context) => HomePageData(), 87 | child: Padding( 88 | padding: const EdgeInsets.only(right: 20, left: 20), 89 | child: Consumer( 90 | builder: (context, data, child) { 91 | return Column( 92 | crossAxisAlignment: CrossAxisAlignment.start, 93 | mainAxisSize: MainAxisSize.min, 94 | mainAxisAlignment: MainAxisAlignment.spaceAround, 95 | children: [ 96 | orientation==Orientation.portrait?HomeAppBar():SizedBox(height: 20,), 97 | Expanded( 98 | flex: 9, 99 | child: Container( 100 | width: orientation==Orientation.portrait?MediaQuery.of(context).size.width:MediaQuery.of(context).size.width-80, 101 | child: ScrollView(), 102 | ), 103 | ) 104 | ], 105 | ); 106 | }, 107 | ), 108 | ), 109 | ); 110 | }, 111 | ); 112 | } 113 | } 114 | 115 | class ScrollView extends StatelessWidget { 116 | @override 117 | Widget build(BuildContext context) { 118 | return OrientationBuilder( 119 | builder: (context, orientation) { 120 | return SingleChildScrollView( 121 | scrollDirection: Axis.vertical, 122 | child: orientation == Orientation.portrait 123 | ? HomePortraitLayout() 124 | : HomeLandScapeLayout(), 125 | ); 126 | }, 127 | ); 128 | } 129 | } 130 | 131 | 132 | 133 | 134 | 135 | //https://dribbble.com/shots/6959677-Smart-home/attachments/1785?mode=media 136 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.2.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.0.4" 18 | charcode: 19 | dependency: transitive 20 | description: 21 | name: charcode 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.2" 25 | collection: 26 | dependency: transitive 27 | description: 28 | name: collection 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.14.11" 32 | cupertino_icons: 33 | dependency: "direct main" 34 | description: 35 | name: cupertino_icons 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "0.1.2" 39 | dotted_border: 40 | dependency: "direct main" 41 | description: 42 | name: dotted_border 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.0.2" 46 | flutter: 47 | dependency: "direct main" 48 | description: flutter 49 | source: sdk 50 | version: "0.0.0" 51 | flutter_test: 52 | dependency: "direct dev" 53 | description: flutter 54 | source: sdk 55 | version: "0.0.0" 56 | fluttery: 57 | dependency: "direct main" 58 | description: 59 | name: fluttery 60 | url: "https://pub.dartlang.org" 61 | source: hosted 62 | version: "0.0.8" 63 | intl: 64 | dependency: "direct main" 65 | description: 66 | name: intl 67 | url: "https://pub.dartlang.org" 68 | source: hosted 69 | version: "0.15.8" 70 | matcher: 71 | dependency: transitive 72 | description: 73 | name: matcher 74 | url: "https://pub.dartlang.org" 75 | source: hosted 76 | version: "0.12.5" 77 | meta: 78 | dependency: transitive 79 | description: 80 | name: meta 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "1.1.6" 84 | path: 85 | dependency: transitive 86 | description: 87 | name: path 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "1.6.2" 91 | path_drawing: 92 | dependency: transitive 93 | description: 94 | name: path_drawing 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "0.4.1" 98 | path_parsing: 99 | dependency: transitive 100 | description: 101 | name: path_parsing 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "0.1.4" 105 | pedantic: 106 | dependency: transitive 107 | description: 108 | name: pedantic 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.7.0" 112 | provider: 113 | dependency: "direct main" 114 | description: 115 | name: provider 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "3.0.0+1" 119 | quiver: 120 | dependency: transitive 121 | description: 122 | name: quiver 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "2.0.3" 126 | sky_engine: 127 | dependency: transitive 128 | description: flutter 129 | source: sdk 130 | version: "0.0.99" 131 | source_span: 132 | dependency: transitive 133 | description: 134 | name: source_span 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.5.5" 138 | stack_trace: 139 | dependency: transitive 140 | description: 141 | name: stack_trace 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.9.3" 145 | stream_channel: 146 | dependency: transitive 147 | description: 148 | name: stream_channel 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.0.0" 152 | string_scanner: 153 | dependency: transitive 154 | description: 155 | name: string_scanner 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.0.4" 159 | term_glyph: 160 | dependency: transitive 161 | description: 162 | name: term_glyph 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.1.0" 166 | test_api: 167 | dependency: transitive 168 | description: 169 | name: test_api 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "0.2.5" 173 | typed_data: 174 | dependency: transitive 175 | description: 176 | name: typed_data 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.1.6" 180 | vector_math: 181 | dependency: transitive 182 | description: 183 | name: vector_math 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.0.8" 187 | sdks: 188 | dart: ">=2.2.2 <3.0.0" 189 | flutter: ">=0.3.6 <2.0.0" 190 | -------------------------------------------------------------------------------- /lib/controlwidget/airconditionerControl.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:smart_home/tabpagewidgets/tempswitch.dart'; 3 | import 'package:smart_home/tabpagewidgets/fancontroller.dart'; 4 | import 'dart:math'; 5 | import 'package:smart_home/tabpagewidgets/currenttempwidget.dart'; 6 | import 'package:smart_home/tabpagewidgets/humiditywidget.dart'; 7 | import 'package:smart_home/tabpagewidgets/changetempwidget.dart'; 8 | import 'package:smart_home/Model/homeinfodata.dart'; 9 | import 'package:smart_home/Model/homeinfomodel.dart'; 10 | import 'package:provider/provider.dart'; 11 | import 'package:smart_home/dialwidget/tickerpainter.dart'; 12 | import 'package:smart_home/dialwidget/knobcontainer.dart'; 13 | 14 | class AirConditionerControlUnit extends StatefulWidget { 15 | @override 16 | _AirConditionerControlUnitState createState() => _AirConditionerControlUnitState(); 17 | } 18 | 19 | class _AirConditionerControlUnitState extends Statewith SingleTickerProviderStateMixin { 20 | TabController _tabController; 21 | List homeInfoData = HomeInfoData().infoData; 22 | 23 | @override 24 | void initState() { 25 | _tabController = new TabController(length: homeInfoData.length, vsync: this); 26 | 27 | } 28 | 29 | 30 | @override 31 | void dispose() { 32 | _tabController.dispose(); 33 | super.dispose(); 34 | } 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | final bool isPortrait = MediaQuery.of(context).orientation == Orientation.portrait; 39 | return DefaultTabController( 40 | length: homeInfoData.length, 41 | child: Scaffold( 42 | backgroundColor: Colors.white, 43 | appBar: ( 44 | AppBar( 45 | brightness: Brightness.light, 46 | backgroundColor: Colors.grey[200], 47 | elevation: 0, 48 | leading: GestureDetector( 49 | onTap: (){ 50 | Navigator.pop(context); 51 | }, 52 | child: Icon( 53 | Icons.keyboard_backspace, 54 | color: Colors.blueAccent, 55 | size: 30, 56 | ), 57 | ), 58 | title: Text( 59 | 'Air Conditioner', 60 | style: TextStyle(color: Colors.black), 61 | ), 62 | bottom: TabBar( 63 | indicator: UnderlineTabIndicator( 64 | borderSide: BorderSide(width: 3.0, color: Colors.blueAccent), 65 | insets: EdgeInsets.symmetric(horizontal: isPortrait?20.0:5.0), 66 | ), 67 | labelColor: Colors.black, 68 | labelStyle: TextStyle(fontSize: 18, fontWeight: FontWeight.w500), 69 | unselectedLabelColor: Colors.grey, 70 | unselectedLabelStyle: TextStyle(fontSize: 16), 71 | isScrollable: true, 72 | controller: _tabController, 73 | tabs: tabTextWidget(homeInfoData,isPortrait), 74 | ))), 75 | body: ChangeNotifierProvider( 76 | builder: (context)=> HomeInfoData(), 77 | child: TabBarView( 78 | children: tabContainWidget(homeInfoData,isPortrait), 79 | controller: _tabController, 80 | ), 81 | ), 82 | ), 83 | ); 84 | } 85 | } 86 | 87 | List tabTextWidget(List homeInfoData,bool isPortrait ) { 88 | 89 | List tabList = []; 90 | for (int i = 0; i < homeInfoData.length; i++) { 91 | tabList.add(Column( 92 | children: [ 93 | Text( 94 | homeInfoData[i].title, 95 | ), 96 | SizedBox( 97 | height: isPortrait?10:2, 98 | ) 99 | ], 100 | )); 101 | } 102 | 103 | return tabList; 104 | } 105 | 106 | 107 | List tabContainWidget(List infoData, bool isPortrait) { 108 | List tabList = []; 109 | for (var i = 0; i < infoData.length; ++i) { 110 | tabList.add( 111 | Container( 112 | height: double.infinity, 113 | width: double.infinity, 114 | color: Colors.grey[200], 115 | child: isPortrait?PortraitAirConditionerUnit(i):LandScapeAirConditionerUnit(i) 116 | ) 117 | ); 118 | } 119 | 120 | 121 | 122 | return tabList; 123 | } 124 | 125 | class LandScapeAirConditionerUnit extends StatelessWidget { 126 | final int index; 127 | 128 | LandScapeAirConditionerUnit(this.index); 129 | 130 | @override 131 | Widget build(BuildContext context) { 132 | return Consumer( 133 | builder: (context,data,child){ 134 | HomeInfoModel roomData = data.infoData[index]; 135 | return Container( 136 | margin: EdgeInsets.only(right: 8.0,top: 8.0), 137 | decoration: BoxDecoration( 138 | borderRadius: BorderRadius.only( 139 | topRight: Radius.circular(30), topLeft: Radius.circular(30)), 140 | color: Colors.white, 141 | ), 142 | child: Row( 143 | children: [ 144 | Expanded( 145 | flex: 2, 146 | child: Column( 147 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 148 | children: [ 149 | Row( 150 | mainAxisSize: MainAxisSize.max, 151 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 152 | crossAxisAlignment: CrossAxisAlignment.center, 153 | children: [ 154 | CurrentTempWidget(roomData.currentTemp), 155 | Container(height: 50, width: 2, color: Colors.grey[300],), 156 | HumidityWidget(roomData.humidity), 157 | ], 158 | ), 159 | ChangeTempWidget(roomData.setTemp), 160 | Container( 161 | child: Padding( 162 | padding: const EdgeInsets.only(bottom: 5), 163 | child: Row( 164 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 165 | crossAxisAlignment: CrossAxisAlignment.start, 166 | children: [ 167 | Padding( 168 | padding: const EdgeInsets.only( 169 | left: 20, bottom: 20, top: 10), 170 | child: Column( 171 | crossAxisAlignment: CrossAxisAlignment.start, 172 | children: [ 173 | Text('Turn on/off'), 174 | SizedBox( 175 | height: 5, 176 | ), 177 | TempSwitch(roomData.isFanOn,(){ 178 | data.switchFan(roomData); 179 | }), 180 | ], 181 | ), 182 | ), 183 | Column( 184 | children: [ 185 | Padding( 186 | padding: const EdgeInsets.only( 187 | right: 20, bottom: 20, top: 10, left: 20), 188 | child: Column( 189 | crossAxisAlignment: CrossAxisAlignment.end, 190 | children: [ 191 | Text('Set Speed'), 192 | SizedBox( 193 | height: 5, 194 | ), 195 | FanSpeedControl( 196 | isFanOn: roomData.isFanOn, 197 | fanSpeed: roomData.fanSpeed, 198 | changeFanSpeed: (speed){ 199 | data.changeFanSpeed(roomData, speed); 200 | }, 201 | ) 202 | ], 203 | ), 204 | ), 205 | ], 206 | ) 207 | ], 208 | ), 209 | ), 210 | ) 211 | 212 | ], 213 | ), 214 | ), 215 | Expanded( 216 | flex: 2, 217 | child: Padding( 218 | padding: const EdgeInsets.only(top:20.0), 219 | child: Container( 220 | child: Stack( 221 | children: [ 222 | Transform.rotate( 223 | angle: (2*pi)*0.25, 224 | child: Container( 225 | height: 360, 226 | width: double.infinity, 227 | decoration: BoxDecoration( 228 | shape: BoxShape.circle, 229 | color: Colors.white, 230 | ), 231 | child:Container( 232 | height: double.infinity, 233 | width: double.infinity, 234 | padding: EdgeInsets.all(90), 235 | child: CustomPaint( 236 | painter: TickPainter(currentTem: roomData.setTemp), 237 | ), 238 | ), 239 | ), 240 | ), 241 | Container( 242 | height: 300, 243 | width: double.infinity, 244 | color: Colors.transparent, 245 | child: KnobContainer(index), 246 | ), 247 | 248 | 249 | ], 250 | ), 251 | ), 252 | ), 253 | ) 254 | ], 255 | ), 256 | ); 257 | }, 258 | ); 259 | } 260 | } 261 | 262 | 263 | class PortraitAirConditionerUnit extends StatelessWidget { 264 | final int i; 265 | 266 | PortraitAirConditionerUnit(this.i); 267 | 268 | @override 269 | Widget build(BuildContext context) { 270 | return Consumer( 271 | builder: (context,data,child){ 272 | HomeInfoModel roomData = data.infoData[i]; 273 | return Column( 274 | mainAxisSize: MainAxisSize.max, 275 | mainAxisAlignment: MainAxisAlignment.start, 276 | children: [ 277 | SizedBox( 278 | height: 30, 279 | ), 280 | Container( 281 | margin: EdgeInsets.only(right: 8.0), 282 | decoration: BoxDecoration( 283 | borderRadius: BorderRadius.only( 284 | topRight: Radius.circular(30), topLeft: Radius.circular(30)), 285 | color: Colors.white, 286 | ), 287 | child: Column( 288 | children: [ 289 | SizedBox( 290 | height: 30, 291 | ), 292 | Row( 293 | mainAxisSize: MainAxisSize.max, 294 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 295 | crossAxisAlignment: CrossAxisAlignment.end, 296 | children: [ 297 | CurrentTempWidget(roomData.currentTemp), 298 | Container( 299 | height: 50, 300 | width: 2, 301 | color: Colors.grey[300], 302 | ), 303 | HumidityWidget(roomData.humidity), 304 | ], 305 | ), 306 | ChangeTempWidget(roomData.setTemp), 307 | Stack( 308 | children: [ 309 | Transform.rotate( 310 | angle: (2*pi)*0.25, 311 | child: Container( 312 | height: 360, 313 | width: double.infinity, 314 | decoration: BoxDecoration( 315 | shape: BoxShape.circle, 316 | color: Colors.white, 317 | ), 318 | child:Container( 319 | height: double.infinity, 320 | width: double.infinity, 321 | padding: EdgeInsets.all(75), 322 | child: CustomPaint( 323 | painter: TickPainter(currentTem: roomData.setTemp), 324 | ), 325 | ), 326 | ), 327 | ), 328 | Container( 329 | height: 360, 330 | width: double.infinity, 331 | color: Colors.transparent, 332 | child: KnobContainer(i), 333 | ), 334 | 335 | ], 336 | ), 337 | Container( 338 | child: Padding( 339 | padding: const EdgeInsets.only(bottom: 35), 340 | child: Row( 341 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 342 | crossAxisAlignment: CrossAxisAlignment.start, 343 | children: [ 344 | Padding( 345 | padding: const EdgeInsets.only( 346 | left: 20, bottom: 20, top: 10), 347 | child: Column( 348 | crossAxisAlignment: CrossAxisAlignment.start, 349 | children: [ 350 | Text('Turn on/off'), 351 | SizedBox( 352 | height: 5, 353 | ), 354 | TempSwitch(roomData.isFanOn,(){ 355 | data.switchFan(roomData); 356 | }), 357 | ], 358 | ), 359 | ), 360 | Column( 361 | children: [ 362 | Padding( 363 | padding: const EdgeInsets.only( 364 | right: 20, bottom: 20, top: 10, left: 20), 365 | child: Column( 366 | crossAxisAlignment: CrossAxisAlignment.end, 367 | children: [ 368 | Text('Set Speed'), 369 | SizedBox( 370 | height: 5, 371 | ), 372 | FanSpeedControl( 373 | isFanOn: roomData.isFanOn, 374 | fanSpeed: roomData.fanSpeed, 375 | changeFanSpeed: (speed){ 376 | data.changeFanSpeed(roomData, speed); 377 | }, 378 | ) 379 | ], 380 | ), 381 | ), 382 | ], 383 | ) 384 | ], 385 | ), 386 | ), 387 | ) 388 | ], 389 | ), 390 | ), 391 | ], 392 | ); 393 | 394 | }, 395 | ); 396 | } 397 | } 398 | 399 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 15 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 17 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 18 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXCopyFilesBuildPhase section */ 25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 26 | isa = PBXCopyFilesBuildPhase; 27 | buildActionMask = 2147483647; 28 | dstPath = ""; 29 | dstSubfolderSpec = 10; 30 | files = ( 31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 33 | ); 34 | name = "Embed Frameworks"; 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXCopyFilesBuildPhase section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 42 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 43 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 45 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 46 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 47 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 48 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 49 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 50 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 54 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 55 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 64 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 9740EEB11CF90186004384FC /* Flutter */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 3B80C3931E831B6300D905FE /* App.framework */, 75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 76 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 77 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 78 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 79 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 80 | ); 81 | name = Flutter; 82 | sourceTree = ""; 83 | }; 84 | 97C146E51CF9000F007C117D = { 85 | isa = PBXGroup; 86 | children = ( 87 | 9740EEB11CF90186004384FC /* Flutter */, 88 | 97C146F01CF9000F007C117D /* Runner */, 89 | 97C146EF1CF9000F007C117D /* Products */, 90 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 97C146EF1CF9000F007C117D /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146EE1CF9000F007C117D /* Runner.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | 97C146F01CF9000F007C117D /* Runner */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 106 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 107 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 108 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 109 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 110 | 97C147021CF9000F007C117D /* Info.plist */, 111 | 97C146F11CF9000F007C117D /* Supporting Files */, 112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 114 | ); 115 | path = Runner; 116 | sourceTree = ""; 117 | }; 118 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 97C146F21CF9000F007C117D /* main.m */, 122 | ); 123 | name = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | /* End PBXGroup section */ 127 | 128 | /* Begin PBXNativeTarget section */ 129 | 97C146ED1CF9000F007C117D /* Runner */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 132 | buildPhases = ( 133 | 9740EEB61CF901F6004384FC /* Run Script */, 134 | 97C146EA1CF9000F007C117D /* Sources */, 135 | 97C146EB1CF9000F007C117D /* Frameworks */, 136 | 97C146EC1CF9000F007C117D /* Resources */, 137 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 138 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 139 | ); 140 | buildRules = ( 141 | ); 142 | dependencies = ( 143 | ); 144 | name = Runner; 145 | productName = Runner; 146 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 147 | productType = "com.apple.product-type.application"; 148 | }; 149 | /* End PBXNativeTarget section */ 150 | 151 | /* Begin PBXProject section */ 152 | 97C146E61CF9000F007C117D /* Project object */ = { 153 | isa = PBXProject; 154 | attributes = { 155 | LastUpgradeCheck = 1020; 156 | ORGANIZATIONNAME = "The Chromium Authors"; 157 | TargetAttributes = { 158 | 97C146ED1CF9000F007C117D = { 159 | CreatedOnToolsVersion = 7.3.1; 160 | }; 161 | }; 162 | }; 163 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 164 | compatibilityVersion = "Xcode 3.2"; 165 | developmentRegion = en; 166 | hasScannedForEncodings = 0; 167 | knownRegions = ( 168 | en, 169 | Base, 170 | ); 171 | mainGroup = 97C146E51CF9000F007C117D; 172 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 173 | projectDirPath = ""; 174 | projectRoot = ""; 175 | targets = ( 176 | 97C146ED1CF9000F007C117D /* Runner */, 177 | ); 178 | }; 179 | /* End PBXProject section */ 180 | 181 | /* Begin PBXResourcesBuildPhase section */ 182 | 97C146EC1CF9000F007C117D /* Resources */ = { 183 | isa = PBXResourcesBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 187 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 188 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 189 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 190 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | }; 194 | /* End PBXResourcesBuildPhase section */ 195 | 196 | /* Begin PBXShellScriptBuildPhase section */ 197 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 198 | isa = PBXShellScriptBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | ); 202 | inputPaths = ( 203 | ); 204 | name = "Thin Binary"; 205 | outputPaths = ( 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | shellPath = /bin/sh; 209 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 210 | }; 211 | 9740EEB61CF901F6004384FC /* Run Script */ = { 212 | isa = PBXShellScriptBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | ); 216 | inputPaths = ( 217 | ); 218 | name = "Run Script"; 219 | outputPaths = ( 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | shellPath = /bin/sh; 223 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 224 | }; 225 | /* End PBXShellScriptBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | 97C146EA1CF9000F007C117D /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 233 | 97C146F31CF9000F007C117D /* main.m in Sources */, 234 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | /* End PBXSourcesBuildPhase section */ 239 | 240 | /* Begin PBXVariantGroup section */ 241 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 242 | isa = PBXVariantGroup; 243 | children = ( 244 | 97C146FB1CF9000F007C117D /* Base */, 245 | ); 246 | name = Main.storyboard; 247 | sourceTree = ""; 248 | }; 249 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 250 | isa = PBXVariantGroup; 251 | children = ( 252 | 97C147001CF9000F007C117D /* Base */, 253 | ); 254 | name = LaunchScreen.storyboard; 255 | sourceTree = ""; 256 | }; 257 | /* End PBXVariantGroup section */ 258 | 259 | /* Begin XCBuildConfiguration section */ 260 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 261 | isa = XCBuildConfiguration; 262 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 263 | buildSettings = { 264 | ALWAYS_SEARCH_USER_PATHS = NO; 265 | CLANG_ANALYZER_NONNULL = YES; 266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 267 | CLANG_CXX_LIBRARY = "libc++"; 268 | CLANG_ENABLE_MODULES = YES; 269 | CLANG_ENABLE_OBJC_ARC = YES; 270 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 271 | CLANG_WARN_BOOL_CONVERSION = YES; 272 | CLANG_WARN_COMMA = YES; 273 | CLANG_WARN_CONSTANT_CONVERSION = YES; 274 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 275 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 276 | CLANG_WARN_EMPTY_BODY = YES; 277 | CLANG_WARN_ENUM_CONVERSION = YES; 278 | CLANG_WARN_INFINITE_RECURSION = YES; 279 | CLANG_WARN_INT_CONVERSION = YES; 280 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 281 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 282 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 283 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 284 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 285 | CLANG_WARN_STRICT_PROTOTYPES = YES; 286 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 287 | CLANG_WARN_UNREACHABLE_CODE = YES; 288 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 289 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 290 | COPY_PHASE_STRIP = NO; 291 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 292 | ENABLE_NS_ASSERTIONS = NO; 293 | ENABLE_STRICT_OBJC_MSGSEND = YES; 294 | GCC_C_LANGUAGE_STANDARD = gnu99; 295 | GCC_NO_COMMON_BLOCKS = YES; 296 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 297 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 298 | GCC_WARN_UNDECLARED_SELECTOR = YES; 299 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 300 | GCC_WARN_UNUSED_FUNCTION = YES; 301 | GCC_WARN_UNUSED_VARIABLE = YES; 302 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 303 | MTL_ENABLE_DEBUG_INFO = NO; 304 | SDKROOT = iphoneos; 305 | TARGETED_DEVICE_FAMILY = "1,2"; 306 | VALIDATE_PRODUCT = YES; 307 | }; 308 | name = Profile; 309 | }; 310 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 311 | isa = XCBuildConfiguration; 312 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 313 | buildSettings = { 314 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 315 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 316 | DEVELOPMENT_TEAM = S8QB4VV633; 317 | ENABLE_BITCODE = NO; 318 | FRAMEWORK_SEARCH_PATHS = ( 319 | "$(inherited)", 320 | "$(PROJECT_DIR)/Flutter", 321 | ); 322 | INFOPLIST_FILE = Runner/Info.plist; 323 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 324 | LIBRARY_SEARCH_PATHS = ( 325 | "$(inherited)", 326 | "$(PROJECT_DIR)/Flutter", 327 | ); 328 | PRODUCT_BUNDLE_IDENTIFIER = com.example.smartHome; 329 | PRODUCT_NAME = "$(TARGET_NAME)"; 330 | VERSIONING_SYSTEM = "apple-generic"; 331 | }; 332 | name = Profile; 333 | }; 334 | 97C147031CF9000F007C117D /* Debug */ = { 335 | isa = XCBuildConfiguration; 336 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 337 | buildSettings = { 338 | ALWAYS_SEARCH_USER_PATHS = NO; 339 | CLANG_ANALYZER_NONNULL = YES; 340 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 341 | CLANG_CXX_LIBRARY = "libc++"; 342 | CLANG_ENABLE_MODULES = YES; 343 | CLANG_ENABLE_OBJC_ARC = YES; 344 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 345 | CLANG_WARN_BOOL_CONVERSION = YES; 346 | CLANG_WARN_COMMA = YES; 347 | CLANG_WARN_CONSTANT_CONVERSION = YES; 348 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 349 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 350 | CLANG_WARN_EMPTY_BODY = YES; 351 | CLANG_WARN_ENUM_CONVERSION = YES; 352 | CLANG_WARN_INFINITE_RECURSION = YES; 353 | CLANG_WARN_INT_CONVERSION = YES; 354 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 356 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 357 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 358 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 359 | CLANG_WARN_STRICT_PROTOTYPES = YES; 360 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 361 | CLANG_WARN_UNREACHABLE_CODE = YES; 362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 363 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 364 | COPY_PHASE_STRIP = NO; 365 | DEBUG_INFORMATION_FORMAT = dwarf; 366 | ENABLE_STRICT_OBJC_MSGSEND = YES; 367 | ENABLE_TESTABILITY = YES; 368 | GCC_C_LANGUAGE_STANDARD = gnu99; 369 | GCC_DYNAMIC_NO_PIC = NO; 370 | GCC_NO_COMMON_BLOCKS = YES; 371 | GCC_OPTIMIZATION_LEVEL = 0; 372 | GCC_PREPROCESSOR_DEFINITIONS = ( 373 | "DEBUG=1", 374 | "$(inherited)", 375 | ); 376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 378 | GCC_WARN_UNDECLARED_SELECTOR = YES; 379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 380 | GCC_WARN_UNUSED_FUNCTION = YES; 381 | GCC_WARN_UNUSED_VARIABLE = YES; 382 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 383 | MTL_ENABLE_DEBUG_INFO = YES; 384 | ONLY_ACTIVE_ARCH = YES; 385 | SDKROOT = iphoneos; 386 | TARGETED_DEVICE_FAMILY = "1,2"; 387 | }; 388 | name = Debug; 389 | }; 390 | 97C147041CF9000F007C117D /* Release */ = { 391 | isa = XCBuildConfiguration; 392 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 393 | buildSettings = { 394 | ALWAYS_SEARCH_USER_PATHS = NO; 395 | CLANG_ANALYZER_NONNULL = YES; 396 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 397 | CLANG_CXX_LIBRARY = "libc++"; 398 | CLANG_ENABLE_MODULES = YES; 399 | CLANG_ENABLE_OBJC_ARC = YES; 400 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 401 | CLANG_WARN_BOOL_CONVERSION = YES; 402 | CLANG_WARN_COMMA = YES; 403 | CLANG_WARN_CONSTANT_CONVERSION = YES; 404 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 405 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 406 | CLANG_WARN_EMPTY_BODY = YES; 407 | CLANG_WARN_ENUM_CONVERSION = YES; 408 | CLANG_WARN_INFINITE_RECURSION = YES; 409 | CLANG_WARN_INT_CONVERSION = YES; 410 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 411 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 412 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 413 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 414 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 415 | CLANG_WARN_STRICT_PROTOTYPES = YES; 416 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 417 | CLANG_WARN_UNREACHABLE_CODE = YES; 418 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 419 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 420 | COPY_PHASE_STRIP = NO; 421 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 422 | ENABLE_NS_ASSERTIONS = NO; 423 | ENABLE_STRICT_OBJC_MSGSEND = YES; 424 | GCC_C_LANGUAGE_STANDARD = gnu99; 425 | GCC_NO_COMMON_BLOCKS = YES; 426 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 427 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 428 | GCC_WARN_UNDECLARED_SELECTOR = YES; 429 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 430 | GCC_WARN_UNUSED_FUNCTION = YES; 431 | GCC_WARN_UNUSED_VARIABLE = YES; 432 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 433 | MTL_ENABLE_DEBUG_INFO = NO; 434 | SDKROOT = iphoneos; 435 | TARGETED_DEVICE_FAMILY = "1,2"; 436 | VALIDATE_PRODUCT = YES; 437 | }; 438 | name = Release; 439 | }; 440 | 97C147061CF9000F007C117D /* Debug */ = { 441 | isa = XCBuildConfiguration; 442 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 443 | buildSettings = { 444 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.smartHome; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | VERSIONING_SYSTEM = "apple-generic"; 460 | }; 461 | name = Debug; 462 | }; 463 | 97C147071CF9000F007C117D /* Release */ = { 464 | isa = XCBuildConfiguration; 465 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 466 | buildSettings = { 467 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 468 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 469 | ENABLE_BITCODE = NO; 470 | FRAMEWORK_SEARCH_PATHS = ( 471 | "$(inherited)", 472 | "$(PROJECT_DIR)/Flutter", 473 | ); 474 | INFOPLIST_FILE = Runner/Info.plist; 475 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 476 | LIBRARY_SEARCH_PATHS = ( 477 | "$(inherited)", 478 | "$(PROJECT_DIR)/Flutter", 479 | ); 480 | PRODUCT_BUNDLE_IDENTIFIER = com.example.smartHome; 481 | PRODUCT_NAME = "$(TARGET_NAME)"; 482 | VERSIONING_SYSTEM = "apple-generic"; 483 | }; 484 | name = Release; 485 | }; 486 | /* End XCBuildConfiguration section */ 487 | 488 | /* Begin XCConfigurationList section */ 489 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 490 | isa = XCConfigurationList; 491 | buildConfigurations = ( 492 | 97C147031CF9000F007C117D /* Debug */, 493 | 97C147041CF9000F007C117D /* Release */, 494 | 249021D3217E4FDB00AE95B9 /* Profile */, 495 | ); 496 | defaultConfigurationIsVisible = 0; 497 | defaultConfigurationName = Release; 498 | }; 499 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 500 | isa = XCConfigurationList; 501 | buildConfigurations = ( 502 | 97C147061CF9000F007C117D /* Debug */, 503 | 97C147071CF9000F007C117D /* Release */, 504 | 249021D4217E4FDB00AE95B9 /* Profile */, 505 | ); 506 | defaultConfigurationIsVisible = 0; 507 | defaultConfigurationName = Release; 508 | }; 509 | /* End XCConfigurationList section */ 510 | }; 511 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 512 | } 513 | --------------------------------------------------------------------------------