├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── smart_home_animation
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── 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-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
└── images
│ ├── 0.jpeg
│ ├── 1.jpeg
│ ├── 2.jpeg
│ ├── 3.jpeg
│ └── 4.jpeg
├── gif.gif
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
├── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── 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-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
└── RunnerTests
│ └── RunnerTests.swift
├── lib
├── core
│ ├── app
│ │ └── app.dart
│ ├── core.dart
│ ├── shared
│ │ ├── domain
│ │ │ ├── domain.dart
│ │ │ └── entities
│ │ │ │ ├── entities.dart
│ │ │ │ ├── music_info.dart
│ │ │ │ ├── smart_device.dart
│ │ │ │ └── smart_room.dart
│ │ ├── presentation
│ │ │ ├── presentation.dart
│ │ │ └── widgets
│ │ │ │ ├── blue_dot_light.dart
│ │ │ │ ├── parallax_image_card.dart
│ │ │ │ ├── room_card.dart
│ │ │ │ ├── sh_app_bar.dart
│ │ │ │ ├── sh_card.dart
│ │ │ │ ├── sh_divider.dart
│ │ │ │ ├── sh_switcher.dart
│ │ │ │ ├── shimmer_arrows.dart
│ │ │ │ └── widgets.dart
│ │ └── shared.dart
│ └── theme
│ │ ├── sh_colors.dart
│ │ ├── sh_icons.dart
│ │ ├── sh_theme.dart
│ │ └── theme.dart
├── features
│ ├── home
│ │ └── presentation
│ │ │ ├── screens
│ │ │ └── home_screen.dart
│ │ │ └── widgets
│ │ │ ├── background_room_lights.dart
│ │ │ ├── lighted_background.dart
│ │ │ ├── page_indicators.dart
│ │ │ ├── sm_home_bottom_navigation.dart
│ │ │ └── smart_room_page_view.dart
│ └── smart_room
│ │ ├── screens
│ │ └── room_details_screen.dart
│ │ └── widgets
│ │ ├── air_conditiioner_controls_card.dart
│ │ ├── light_and_time_switcher.dart
│ │ ├── light_intensity_slide_card.dart
│ │ ├── music_switchers.dart
│ │ └── room_details_page_view.dart
└── main.dart
├── linux
├── .gitignore
├── CMakeLists.txt
├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
├── main.cc
├── my_application.cc
└── my_application.h
├── pubspec.lock
├── pubspec.yaml
├── test
└── widget_test.dart
└── ui.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
--------------------------------------------------------------------------------
/.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: "efbf63d9c66b9f6ec30e9ad4611189aa80003d31"
8 | channel: "stable"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
17 | base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
18 | - platform: android
19 | create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
20 | base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
21 | - platform: ios
22 | create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
23 | base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
24 | - platform: linux
25 | create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
26 | base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
27 | - platform: macos
28 | create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
29 | base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
30 | - platform: web
31 | create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
32 | base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
33 | - platform: windows
34 | create_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
35 | base_revision: efbf63d9c66b9f6ec30e9ad4611189aa80003d31
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter Smart Home Animated App
2 |
3 | I've created a step-by-step video tutorial to guide you through the process of building a Animated Smart Home App using Flutter. **[Watch it on YouTube](https://youtu.be/7l-0x1Y7d1M)**
4 |
5 | Welcome to the 'Animated Smart Home App'. In this video, we'll begin by showing you how to create a parallax effect in Flutter. We'll be focusing on using the implicit widget for most animations. Plus, you'll see how we use explicit animation widgets and custom transitions when moving from one page to another. Enjoy!
6 |
7 | ### Animation Preview
8 |
9 | 
10 |
11 | 
12 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26 |
27 | # Additional information about this file can be found at
28 | # https://dart.dev/guides/language/analysis-options
29 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | id "dev.flutter.flutter-gradle-plugin"
5 | }
6 |
7 | def localProperties = new Properties()
8 | def localPropertiesFile = rootProject.file('local.properties')
9 | if (localPropertiesFile.exists()) {
10 | localPropertiesFile.withReader('UTF-8') { reader ->
11 | localProperties.load(reader)
12 | }
13 | }
14 |
15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16 | if (flutterVersionCode == null) {
17 | flutterVersionCode = '1'
18 | }
19 |
20 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
21 | if (flutterVersionName == null) {
22 | flutterVersionName = '1.0'
23 | }
24 |
25 | android {
26 | namespace "com.example.smart_home_animation"
27 | compileSdkVersion flutter.compileSdkVersion
28 | ndkVersion flutter.ndkVersion
29 |
30 | compileOptions {
31 | sourceCompatibility JavaVersion.VERSION_1_8
32 | targetCompatibility JavaVersion.VERSION_1_8
33 | }
34 |
35 | kotlinOptions {
36 | jvmTarget = '1.8'
37 | }
38 |
39 | sourceSets {
40 | main.java.srcDirs += 'src/main/kotlin'
41 | }
42 |
43 | defaultConfig {
44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45 | applicationId "com.example.smart_home_animation"
46 | // You can update the following values to match your application needs.
47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48 | minSdkVersion flutter.minSdkVersion
49 | targetSdkVersion flutter.targetSdkVersion
50 | versionCode flutterVersionCode.toInteger()
51 | versionName flutterVersionName
52 | }
53 |
54 | buildTypes {
55 | release {
56 | // TODO: Add your own signing config for the release build.
57 | // Signing with the debug keys for now, so `flutter run --release` works.
58 | signingConfig signingConfigs.debug
59 | }
60 | }
61 | }
62 |
63 | flutter {
64 | source '../..'
65 | }
66 |
67 | dependencies {}
68 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
14 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/smart_home_animation/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.smart_home_animation
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.3.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | tasks.register("clean", Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }
9 | settings.ext.flutterSdkPath = flutterSdkPath()
10 |
11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12 |
13 | plugins {
14 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
15 | }
16 | }
17 |
18 | include ":app"
19 |
20 | apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
21 |
--------------------------------------------------------------------------------
/assets/images/0.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/assets/images/0.jpeg
--------------------------------------------------------------------------------
/assets/images/1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/assets/images/1.jpeg
--------------------------------------------------------------------------------
/assets/images/2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/assets/images/2.jpeg
--------------------------------------------------------------------------------
/assets/images/3.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/assets/images/3.jpeg
--------------------------------------------------------------------------------
/assets/images/4.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/assets/images/4.jpeg
--------------------------------------------------------------------------------
/gif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/gif.gif
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/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/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '11.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 flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | target 'RunnerTests' do
36 | inherit! :search_paths
37 | end
38 | end
39 |
40 | post_install do |installer|
41 | installer.pods_project.targets.each do |target|
42 | flutter_additional_ios_build_settings(target)
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - FMDB (2.7.5):
4 | - FMDB/standard (= 2.7.5)
5 | - FMDB/standard (2.7.5)
6 | - path_provider_foundation (0.0.1):
7 | - Flutter
8 | - FlutterMacOS
9 | - sqflite (0.0.3):
10 | - Flutter
11 | - FMDB (>= 2.7.5)
12 |
13 | DEPENDENCIES:
14 | - Flutter (from `Flutter`)
15 | - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
16 | - sqflite (from `.symlinks/plugins/sqflite/ios`)
17 |
18 | SPEC REPOS:
19 | trunk:
20 | - FMDB
21 |
22 | EXTERNAL SOURCES:
23 | Flutter:
24 | :path: Flutter
25 | path_provider_foundation:
26 | :path: ".symlinks/plugins/path_provider_foundation/darwin"
27 | sqflite:
28 | :path: ".symlinks/plugins/sqflite/ios"
29 |
30 | SPEC CHECKSUMS:
31 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
32 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
33 | path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
34 | sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
35 |
36 | PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189
37 |
38 | COCOAPODS: 1.12.1
39 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 322B8C9C0E8EFC6526825147 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2E118BDF652CA86877AD0AD /* Pods_RunnerTests.framework */; };
12 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
13 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
16 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
17 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
18 | B4D931C19B333BF1E17095FC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B4050F49E82ADB5E6DD747E5 /* Pods_Runner.framework */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXContainerItemProxy section */
22 | 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
23 | isa = PBXContainerItemProxy;
24 | containerPortal = 97C146E61CF9000F007C117D /* Project object */;
25 | proxyType = 1;
26 | remoteGlobalIDString = 97C146ED1CF9000F007C117D;
27 | remoteInfo = Runner;
28 | };
29 | /* End PBXContainerItemProxy section */
30 |
31 | /* Begin PBXCopyFilesBuildPhase section */
32 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
33 | isa = PBXCopyFilesBuildPhase;
34 | buildActionMask = 2147483647;
35 | dstPath = "";
36 | dstSubfolderSpec = 10;
37 | files = (
38 | );
39 | name = "Embed Frameworks";
40 | runOnlyForDeploymentPostprocessing = 0;
41 | };
42 | /* End PBXCopyFilesBuildPhase section */
43 |
44 | /* Begin PBXFileReference section */
45 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
46 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
47 | 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
48 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
49 | 355F7F7B206F4AF72CDFAC54 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; };
50 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
51 | 57A29CD93F91479CD3F86AA0 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; };
52 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
53 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
54 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
55 | 8321CA18C985ADA0277C7743 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; };
56 | 8D35D94EBB4A1472CD7361F0 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
57 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
58 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
59 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
60 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
61 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
62 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
63 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
64 | A2E118BDF652CA86877AD0AD /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
65 | B4050F49E82ADB5E6DD747E5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
66 | D7562FF7BC5697759BDF11E8 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
67 | E0899EAC7E1EBE6DA8D709CF /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
68 | /* End PBXFileReference section */
69 |
70 | /* Begin PBXFrameworksBuildPhase section */
71 | 9399265B21B3CE75EEC5D93C /* Frameworks */ = {
72 | isa = PBXFrameworksBuildPhase;
73 | buildActionMask = 2147483647;
74 | files = (
75 | 322B8C9C0E8EFC6526825147 /* Pods_RunnerTests.framework in Frameworks */,
76 | );
77 | runOnlyForDeploymentPostprocessing = 0;
78 | };
79 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
80 | isa = PBXFrameworksBuildPhase;
81 | buildActionMask = 2147483647;
82 | files = (
83 | B4D931C19B333BF1E17095FC /* Pods_Runner.framework in Frameworks */,
84 | );
85 | runOnlyForDeploymentPostprocessing = 0;
86 | };
87 | /* End PBXFrameworksBuildPhase section */
88 |
89 | /* Begin PBXGroup section */
90 | 331C8082294A63A400263BE5 /* RunnerTests */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 331C807B294A618700263BE5 /* RunnerTests.swift */,
94 | );
95 | path = RunnerTests;
96 | sourceTree = "";
97 | };
98 | 9740EEB11CF90186004384FC /* Flutter */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
102 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
103 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
104 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
105 | );
106 | name = Flutter;
107 | sourceTree = "";
108 | };
109 | 97C146E51CF9000F007C117D = {
110 | isa = PBXGroup;
111 | children = (
112 | 9740EEB11CF90186004384FC /* Flutter */,
113 | 97C146F01CF9000F007C117D /* Runner */,
114 | 97C146EF1CF9000F007C117D /* Products */,
115 | 331C8082294A63A400263BE5 /* RunnerTests */,
116 | B833E24B2EBA18D367495673 /* Pods */,
117 | BC377954ED4DE48C5EB88C44 /* Frameworks */,
118 | );
119 | sourceTree = "";
120 | };
121 | 97C146EF1CF9000F007C117D /* Products */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 97C146EE1CF9000F007C117D /* Runner.app */,
125 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
126 | );
127 | name = Products;
128 | sourceTree = "";
129 | };
130 | 97C146F01CF9000F007C117D /* Runner */ = {
131 | isa = PBXGroup;
132 | children = (
133 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
134 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
135 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
136 | 97C147021CF9000F007C117D /* Info.plist */,
137 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
138 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
139 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
140 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
141 | );
142 | path = Runner;
143 | sourceTree = "";
144 | };
145 | B833E24B2EBA18D367495673 /* Pods */ = {
146 | isa = PBXGroup;
147 | children = (
148 | 8D35D94EBB4A1472CD7361F0 /* Pods-Runner.debug.xcconfig */,
149 | D7562FF7BC5697759BDF11E8 /* Pods-Runner.release.xcconfig */,
150 | E0899EAC7E1EBE6DA8D709CF /* Pods-Runner.profile.xcconfig */,
151 | 57A29CD93F91479CD3F86AA0 /* Pods-RunnerTests.debug.xcconfig */,
152 | 355F7F7B206F4AF72CDFAC54 /* Pods-RunnerTests.release.xcconfig */,
153 | 8321CA18C985ADA0277C7743 /* Pods-RunnerTests.profile.xcconfig */,
154 | );
155 | name = Pods;
156 | path = Pods;
157 | sourceTree = "";
158 | };
159 | BC377954ED4DE48C5EB88C44 /* Frameworks */ = {
160 | isa = PBXGroup;
161 | children = (
162 | B4050F49E82ADB5E6DD747E5 /* Pods_Runner.framework */,
163 | A2E118BDF652CA86877AD0AD /* Pods_RunnerTests.framework */,
164 | );
165 | name = Frameworks;
166 | sourceTree = "";
167 | };
168 | /* End PBXGroup section */
169 |
170 | /* Begin PBXNativeTarget section */
171 | 331C8080294A63A400263BE5 /* RunnerTests */ = {
172 | isa = PBXNativeTarget;
173 | buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
174 | buildPhases = (
175 | 0B93A1A5A1BB9ADA2FF42FF3 /* [CP] Check Pods Manifest.lock */,
176 | 331C807D294A63A400263BE5 /* Sources */,
177 | 331C807F294A63A400263BE5 /* Resources */,
178 | 9399265B21B3CE75EEC5D93C /* Frameworks */,
179 | );
180 | buildRules = (
181 | );
182 | dependencies = (
183 | 331C8086294A63A400263BE5 /* PBXTargetDependency */,
184 | );
185 | name = RunnerTests;
186 | productName = RunnerTests;
187 | productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
188 | productType = "com.apple.product-type.bundle.unit-test";
189 | };
190 | 97C146ED1CF9000F007C117D /* Runner */ = {
191 | isa = PBXNativeTarget;
192 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
193 | buildPhases = (
194 | C1985F630CDEF5B468614812 /* [CP] Check Pods Manifest.lock */,
195 | 9740EEB61CF901F6004384FC /* Run Script */,
196 | 97C146EA1CF9000F007C117D /* Sources */,
197 | 97C146EB1CF9000F007C117D /* Frameworks */,
198 | 97C146EC1CF9000F007C117D /* Resources */,
199 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
200 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
201 | 4F50CFF3068417219EC02149 /* [CP] Embed Pods Frameworks */,
202 | );
203 | buildRules = (
204 | );
205 | dependencies = (
206 | );
207 | name = Runner;
208 | productName = Runner;
209 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
210 | productType = "com.apple.product-type.application";
211 | };
212 | /* End PBXNativeTarget section */
213 |
214 | /* Begin PBXProject section */
215 | 97C146E61CF9000F007C117D /* Project object */ = {
216 | isa = PBXProject;
217 | attributes = {
218 | BuildIndependentTargetsInParallel = YES;
219 | LastUpgradeCheck = 1430;
220 | ORGANIZATIONNAME = "";
221 | TargetAttributes = {
222 | 331C8080294A63A400263BE5 = {
223 | CreatedOnToolsVersion = 14.0;
224 | TestTargetID = 97C146ED1CF9000F007C117D;
225 | };
226 | 97C146ED1CF9000F007C117D = {
227 | CreatedOnToolsVersion = 7.3.1;
228 | LastSwiftMigration = 1100;
229 | };
230 | };
231 | };
232 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
233 | compatibilityVersion = "Xcode 9.3";
234 | developmentRegion = en;
235 | hasScannedForEncodings = 0;
236 | knownRegions = (
237 | en,
238 | Base,
239 | );
240 | mainGroup = 97C146E51CF9000F007C117D;
241 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
242 | projectDirPath = "";
243 | projectRoot = "";
244 | targets = (
245 | 97C146ED1CF9000F007C117D /* Runner */,
246 | 331C8080294A63A400263BE5 /* RunnerTests */,
247 | );
248 | };
249 | /* End PBXProject section */
250 |
251 | /* Begin PBXResourcesBuildPhase section */
252 | 331C807F294A63A400263BE5 /* Resources */ = {
253 | isa = PBXResourcesBuildPhase;
254 | buildActionMask = 2147483647;
255 | files = (
256 | );
257 | runOnlyForDeploymentPostprocessing = 0;
258 | };
259 | 97C146EC1CF9000F007C117D /* Resources */ = {
260 | isa = PBXResourcesBuildPhase;
261 | buildActionMask = 2147483647;
262 | files = (
263 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
264 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
265 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
266 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
267 | );
268 | runOnlyForDeploymentPostprocessing = 0;
269 | };
270 | /* End PBXResourcesBuildPhase section */
271 |
272 | /* Begin PBXShellScriptBuildPhase section */
273 | 0B93A1A5A1BB9ADA2FF42FF3 /* [CP] Check Pods Manifest.lock */ = {
274 | isa = PBXShellScriptBuildPhase;
275 | buildActionMask = 2147483647;
276 | files = (
277 | );
278 | inputFileListPaths = (
279 | );
280 | inputPaths = (
281 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
282 | "${PODS_ROOT}/Manifest.lock",
283 | );
284 | name = "[CP] Check Pods Manifest.lock";
285 | outputFileListPaths = (
286 | );
287 | outputPaths = (
288 | "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
289 | );
290 | runOnlyForDeploymentPostprocessing = 0;
291 | shellPath = /bin/sh;
292 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
293 | showEnvVarsInLog = 0;
294 | };
295 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
296 | isa = PBXShellScriptBuildPhase;
297 | alwaysOutOfDate = 1;
298 | buildActionMask = 2147483647;
299 | files = (
300 | );
301 | inputPaths = (
302 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
303 | );
304 | name = "Thin Binary";
305 | outputPaths = (
306 | );
307 | runOnlyForDeploymentPostprocessing = 0;
308 | shellPath = /bin/sh;
309 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
310 | };
311 | 4F50CFF3068417219EC02149 /* [CP] Embed Pods Frameworks */ = {
312 | isa = PBXShellScriptBuildPhase;
313 | buildActionMask = 2147483647;
314 | files = (
315 | );
316 | inputFileListPaths = (
317 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
318 | );
319 | name = "[CP] Embed Pods Frameworks";
320 | outputFileListPaths = (
321 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
322 | );
323 | runOnlyForDeploymentPostprocessing = 0;
324 | shellPath = /bin/sh;
325 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
326 | showEnvVarsInLog = 0;
327 | };
328 | 9740EEB61CF901F6004384FC /* Run Script */ = {
329 | isa = PBXShellScriptBuildPhase;
330 | alwaysOutOfDate = 1;
331 | buildActionMask = 2147483647;
332 | files = (
333 | );
334 | inputPaths = (
335 | );
336 | name = "Run Script";
337 | outputPaths = (
338 | );
339 | runOnlyForDeploymentPostprocessing = 0;
340 | shellPath = /bin/sh;
341 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
342 | };
343 | C1985F630CDEF5B468614812 /* [CP] Check Pods Manifest.lock */ = {
344 | isa = PBXShellScriptBuildPhase;
345 | buildActionMask = 2147483647;
346 | files = (
347 | );
348 | inputFileListPaths = (
349 | );
350 | inputPaths = (
351 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
352 | "${PODS_ROOT}/Manifest.lock",
353 | );
354 | name = "[CP] Check Pods Manifest.lock";
355 | outputFileListPaths = (
356 | );
357 | outputPaths = (
358 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
359 | );
360 | runOnlyForDeploymentPostprocessing = 0;
361 | shellPath = /bin/sh;
362 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
363 | showEnvVarsInLog = 0;
364 | };
365 | /* End PBXShellScriptBuildPhase section */
366 |
367 | /* Begin PBXSourcesBuildPhase section */
368 | 331C807D294A63A400263BE5 /* Sources */ = {
369 | isa = PBXSourcesBuildPhase;
370 | buildActionMask = 2147483647;
371 | files = (
372 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
373 | );
374 | runOnlyForDeploymentPostprocessing = 0;
375 | };
376 | 97C146EA1CF9000F007C117D /* Sources */ = {
377 | isa = PBXSourcesBuildPhase;
378 | buildActionMask = 2147483647;
379 | files = (
380 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
381 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
382 | );
383 | runOnlyForDeploymentPostprocessing = 0;
384 | };
385 | /* End PBXSourcesBuildPhase section */
386 |
387 | /* Begin PBXTargetDependency section */
388 | 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
389 | isa = PBXTargetDependency;
390 | target = 97C146ED1CF9000F007C117D /* Runner */;
391 | targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
392 | };
393 | /* End PBXTargetDependency section */
394 |
395 | /* Begin PBXVariantGroup section */
396 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
397 | isa = PBXVariantGroup;
398 | children = (
399 | 97C146FB1CF9000F007C117D /* Base */,
400 | );
401 | name = Main.storyboard;
402 | sourceTree = "";
403 | };
404 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
405 | isa = PBXVariantGroup;
406 | children = (
407 | 97C147001CF9000F007C117D /* Base */,
408 | );
409 | name = LaunchScreen.storyboard;
410 | sourceTree = "";
411 | };
412 | /* End PBXVariantGroup section */
413 |
414 | /* Begin XCBuildConfiguration section */
415 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
416 | isa = XCBuildConfiguration;
417 | buildSettings = {
418 | ALWAYS_SEARCH_USER_PATHS = NO;
419 | CLANG_ANALYZER_NONNULL = YES;
420 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
421 | CLANG_CXX_LIBRARY = "libc++";
422 | CLANG_ENABLE_MODULES = YES;
423 | CLANG_ENABLE_OBJC_ARC = YES;
424 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
425 | CLANG_WARN_BOOL_CONVERSION = YES;
426 | CLANG_WARN_COMMA = YES;
427 | CLANG_WARN_CONSTANT_CONVERSION = YES;
428 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
429 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
430 | CLANG_WARN_EMPTY_BODY = YES;
431 | CLANG_WARN_ENUM_CONVERSION = YES;
432 | CLANG_WARN_INFINITE_RECURSION = YES;
433 | CLANG_WARN_INT_CONVERSION = YES;
434 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
435 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
436 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
437 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
438 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
439 | CLANG_WARN_STRICT_PROTOTYPES = YES;
440 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
441 | CLANG_WARN_UNREACHABLE_CODE = YES;
442 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
443 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
444 | COPY_PHASE_STRIP = NO;
445 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
446 | ENABLE_NS_ASSERTIONS = NO;
447 | ENABLE_STRICT_OBJC_MSGSEND = YES;
448 | GCC_C_LANGUAGE_STANDARD = gnu99;
449 | GCC_NO_COMMON_BLOCKS = YES;
450 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
451 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
452 | GCC_WARN_UNDECLARED_SELECTOR = YES;
453 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
454 | GCC_WARN_UNUSED_FUNCTION = YES;
455 | GCC_WARN_UNUSED_VARIABLE = YES;
456 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
457 | MTL_ENABLE_DEBUG_INFO = NO;
458 | SDKROOT = iphoneos;
459 | SUPPORTED_PLATFORMS = iphoneos;
460 | TARGETED_DEVICE_FAMILY = "1,2";
461 | VALIDATE_PRODUCT = YES;
462 | };
463 | name = Profile;
464 | };
465 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
466 | isa = XCBuildConfiguration;
467 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
468 | buildSettings = {
469 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
470 | CLANG_ENABLE_MODULES = YES;
471 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
472 | ENABLE_BITCODE = NO;
473 | INFOPLIST_FILE = Runner/Info.plist;
474 | LD_RUNPATH_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "@executable_path/Frameworks",
477 | );
478 | PRODUCT_BUNDLE_IDENTIFIER = com.example.smartHomeAnimation;
479 | PRODUCT_NAME = "$(TARGET_NAME)";
480 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
481 | SWIFT_VERSION = 5.0;
482 | VERSIONING_SYSTEM = "apple-generic";
483 | };
484 | name = Profile;
485 | };
486 | 331C8088294A63A400263BE5 /* Debug */ = {
487 | isa = XCBuildConfiguration;
488 | baseConfigurationReference = 57A29CD93F91479CD3F86AA0 /* Pods-RunnerTests.debug.xcconfig */;
489 | buildSettings = {
490 | BUNDLE_LOADER = "$(TEST_HOST)";
491 | CODE_SIGN_STYLE = Automatic;
492 | CURRENT_PROJECT_VERSION = 1;
493 | GENERATE_INFOPLIST_FILE = YES;
494 | MARKETING_VERSION = 1.0;
495 | PRODUCT_BUNDLE_IDENTIFIER = com.example.smartHomeAnimation.RunnerTests;
496 | PRODUCT_NAME = "$(TARGET_NAME)";
497 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
498 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
499 | SWIFT_VERSION = 5.0;
500 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
501 | };
502 | name = Debug;
503 | };
504 | 331C8089294A63A400263BE5 /* Release */ = {
505 | isa = XCBuildConfiguration;
506 | baseConfigurationReference = 355F7F7B206F4AF72CDFAC54 /* Pods-RunnerTests.release.xcconfig */;
507 | buildSettings = {
508 | BUNDLE_LOADER = "$(TEST_HOST)";
509 | CODE_SIGN_STYLE = Automatic;
510 | CURRENT_PROJECT_VERSION = 1;
511 | GENERATE_INFOPLIST_FILE = YES;
512 | MARKETING_VERSION = 1.0;
513 | PRODUCT_BUNDLE_IDENTIFIER = com.example.smartHomeAnimation.RunnerTests;
514 | PRODUCT_NAME = "$(TARGET_NAME)";
515 | SWIFT_VERSION = 5.0;
516 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
517 | };
518 | name = Release;
519 | };
520 | 331C808A294A63A400263BE5 /* Profile */ = {
521 | isa = XCBuildConfiguration;
522 | baseConfigurationReference = 8321CA18C985ADA0277C7743 /* Pods-RunnerTests.profile.xcconfig */;
523 | buildSettings = {
524 | BUNDLE_LOADER = "$(TEST_HOST)";
525 | CODE_SIGN_STYLE = Automatic;
526 | CURRENT_PROJECT_VERSION = 1;
527 | GENERATE_INFOPLIST_FILE = YES;
528 | MARKETING_VERSION = 1.0;
529 | PRODUCT_BUNDLE_IDENTIFIER = com.example.smartHomeAnimation.RunnerTests;
530 | PRODUCT_NAME = "$(TARGET_NAME)";
531 | SWIFT_VERSION = 5.0;
532 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
533 | };
534 | name = Profile;
535 | };
536 | 97C147031CF9000F007C117D /* Debug */ = {
537 | isa = XCBuildConfiguration;
538 | buildSettings = {
539 | ALWAYS_SEARCH_USER_PATHS = NO;
540 | CLANG_ANALYZER_NONNULL = YES;
541 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
542 | CLANG_CXX_LIBRARY = "libc++";
543 | CLANG_ENABLE_MODULES = YES;
544 | CLANG_ENABLE_OBJC_ARC = YES;
545 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
546 | CLANG_WARN_BOOL_CONVERSION = YES;
547 | CLANG_WARN_COMMA = YES;
548 | CLANG_WARN_CONSTANT_CONVERSION = YES;
549 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
550 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
551 | CLANG_WARN_EMPTY_BODY = YES;
552 | CLANG_WARN_ENUM_CONVERSION = YES;
553 | CLANG_WARN_INFINITE_RECURSION = YES;
554 | CLANG_WARN_INT_CONVERSION = YES;
555 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
556 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
557 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
558 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
559 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
560 | CLANG_WARN_STRICT_PROTOTYPES = YES;
561 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
562 | CLANG_WARN_UNREACHABLE_CODE = YES;
563 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
564 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
565 | COPY_PHASE_STRIP = NO;
566 | DEBUG_INFORMATION_FORMAT = dwarf;
567 | ENABLE_STRICT_OBJC_MSGSEND = YES;
568 | ENABLE_TESTABILITY = YES;
569 | GCC_C_LANGUAGE_STANDARD = gnu99;
570 | GCC_DYNAMIC_NO_PIC = NO;
571 | GCC_NO_COMMON_BLOCKS = YES;
572 | GCC_OPTIMIZATION_LEVEL = 0;
573 | GCC_PREPROCESSOR_DEFINITIONS = (
574 | "DEBUG=1",
575 | "$(inherited)",
576 | );
577 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
578 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
579 | GCC_WARN_UNDECLARED_SELECTOR = YES;
580 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
581 | GCC_WARN_UNUSED_FUNCTION = YES;
582 | GCC_WARN_UNUSED_VARIABLE = YES;
583 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
584 | MTL_ENABLE_DEBUG_INFO = YES;
585 | ONLY_ACTIVE_ARCH = YES;
586 | SDKROOT = iphoneos;
587 | TARGETED_DEVICE_FAMILY = "1,2";
588 | };
589 | name = Debug;
590 | };
591 | 97C147041CF9000F007C117D /* Release */ = {
592 | isa = XCBuildConfiguration;
593 | buildSettings = {
594 | ALWAYS_SEARCH_USER_PATHS = NO;
595 | CLANG_ANALYZER_NONNULL = YES;
596 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
597 | CLANG_CXX_LIBRARY = "libc++";
598 | CLANG_ENABLE_MODULES = YES;
599 | CLANG_ENABLE_OBJC_ARC = YES;
600 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
601 | CLANG_WARN_BOOL_CONVERSION = YES;
602 | CLANG_WARN_COMMA = YES;
603 | CLANG_WARN_CONSTANT_CONVERSION = YES;
604 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
605 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
606 | CLANG_WARN_EMPTY_BODY = YES;
607 | CLANG_WARN_ENUM_CONVERSION = YES;
608 | CLANG_WARN_INFINITE_RECURSION = YES;
609 | CLANG_WARN_INT_CONVERSION = YES;
610 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
611 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
612 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
613 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
614 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
615 | CLANG_WARN_STRICT_PROTOTYPES = YES;
616 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
617 | CLANG_WARN_UNREACHABLE_CODE = YES;
618 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
619 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
620 | COPY_PHASE_STRIP = NO;
621 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
622 | ENABLE_NS_ASSERTIONS = NO;
623 | ENABLE_STRICT_OBJC_MSGSEND = YES;
624 | GCC_C_LANGUAGE_STANDARD = gnu99;
625 | GCC_NO_COMMON_BLOCKS = YES;
626 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
627 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
628 | GCC_WARN_UNDECLARED_SELECTOR = YES;
629 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
630 | GCC_WARN_UNUSED_FUNCTION = YES;
631 | GCC_WARN_UNUSED_VARIABLE = YES;
632 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
633 | MTL_ENABLE_DEBUG_INFO = NO;
634 | SDKROOT = iphoneos;
635 | SUPPORTED_PLATFORMS = iphoneos;
636 | SWIFT_COMPILATION_MODE = wholemodule;
637 | SWIFT_OPTIMIZATION_LEVEL = "-O";
638 | TARGETED_DEVICE_FAMILY = "1,2";
639 | VALIDATE_PRODUCT = YES;
640 | };
641 | name = Release;
642 | };
643 | 97C147061CF9000F007C117D /* Debug */ = {
644 | isa = XCBuildConfiguration;
645 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
646 | buildSettings = {
647 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
648 | CLANG_ENABLE_MODULES = YES;
649 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
650 | ENABLE_BITCODE = NO;
651 | INFOPLIST_FILE = Runner/Info.plist;
652 | LD_RUNPATH_SEARCH_PATHS = (
653 | "$(inherited)",
654 | "@executable_path/Frameworks",
655 | );
656 | PRODUCT_BUNDLE_IDENTIFIER = com.example.smartHomeAnimation;
657 | PRODUCT_NAME = "$(TARGET_NAME)";
658 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
659 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
660 | SWIFT_VERSION = 5.0;
661 | VERSIONING_SYSTEM = "apple-generic";
662 | };
663 | name = Debug;
664 | };
665 | 97C147071CF9000F007C117D /* Release */ = {
666 | isa = XCBuildConfiguration;
667 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
668 | buildSettings = {
669 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
670 | CLANG_ENABLE_MODULES = YES;
671 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
672 | ENABLE_BITCODE = NO;
673 | INFOPLIST_FILE = Runner/Info.plist;
674 | LD_RUNPATH_SEARCH_PATHS = (
675 | "$(inherited)",
676 | "@executable_path/Frameworks",
677 | );
678 | PRODUCT_BUNDLE_IDENTIFIER = com.example.smartHomeAnimation;
679 | PRODUCT_NAME = "$(TARGET_NAME)";
680 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
681 | SWIFT_VERSION = 5.0;
682 | VERSIONING_SYSTEM = "apple-generic";
683 | };
684 | name = Release;
685 | };
686 | /* End XCBuildConfiguration section */
687 |
688 | /* Begin XCConfigurationList section */
689 | 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
690 | isa = XCConfigurationList;
691 | buildConfigurations = (
692 | 331C8088294A63A400263BE5 /* Debug */,
693 | 331C8089294A63A400263BE5 /* Release */,
694 | 331C808A294A63A400263BE5 /* Profile */,
695 | );
696 | defaultConfigurationIsVisible = 0;
697 | defaultConfigurationName = Release;
698 | };
699 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
700 | isa = XCConfigurationList;
701 | buildConfigurations = (
702 | 97C147031CF9000F007C117D /* Debug */,
703 | 97C147041CF9000F007C117D /* Release */,
704 | 249021D3217E4FDB00AE95B9 /* Profile */,
705 | );
706 | defaultConfigurationIsVisible = 0;
707 | defaultConfigurationName = Release;
708 | };
709 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
710 | isa = XCConfigurationList;
711 | buildConfigurations = (
712 | 97C147061CF9000F007C117D /* Debug */,
713 | 97C147071CF9000F007C117D /* Release */,
714 | 249021D4217E4FDB00AE95B9 /* Profile */,
715 | );
716 | defaultConfigurationIsVisible = 0;
717 | defaultConfigurationName = Release;
718 | };
719 | /* End XCConfigurationList section */
720 | };
721 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
722 | }
723 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/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 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/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/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/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/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 | CFBundleDisplayName
8 | Smart Home Animation
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | smart_home_animation
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/lib/core/app/app.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:smart_home_animation/core/core.dart';
3 | import 'package:smart_home_animation/features/home/presentation/screens/home_screen.dart';
4 | import 'package:ui_common/ui_common.dart';
5 |
6 | class SmartHomeApp extends StatelessWidget {
7 | const SmartHomeApp({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return ScreenUtilInit(
12 | builder: (context, child) {
13 | return MaterialApp(
14 | debugShowCheckedModeBanner: false,
15 | title: 'TheFlutterWay Smart Home Animated App',
16 | theme: SHTheme.dark,
17 | home: const HomeScreen(),
18 | );
19 | },
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/core/core.dart:
--------------------------------------------------------------------------------
1 | export 'shared/shared.dart';
2 | export 'theme/theme.dart';
3 |
--------------------------------------------------------------------------------
/lib/core/shared/domain/domain.dart:
--------------------------------------------------------------------------------
1 | export 'entities/entities.dart';
2 |
--------------------------------------------------------------------------------
/lib/core/shared/domain/entities/entities.dart:
--------------------------------------------------------------------------------
1 | export 'music_info.dart';
2 | export 'smart_device.dart';
3 | export 'smart_room.dart';
4 |
--------------------------------------------------------------------------------
/lib/core/shared/domain/entities/music_info.dart:
--------------------------------------------------------------------------------
1 | class MusicInfo {
2 | MusicInfo({required this.isOn, required this.currentSong});
3 |
4 | final bool isOn;
5 | final Song currentSong;
6 | }
7 |
8 | class Song {
9 | const Song(this.title, this.artist, this.thumbUrl);
10 |
11 | final String title;
12 | final String artist;
13 | final String thumbUrl;
14 |
15 | static const Song defaultSong = Song(
16 | 'I wanna be your slave',
17 | 'MANESKIN',
18 | 'https://i.ibb.co/bQ65QkD/manesking.jpg',
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/lib/core/shared/domain/entities/smart_device.dart:
--------------------------------------------------------------------------------
1 | class SmartDevice {
2 | SmartDevice({required this.isOn, required this.value});
3 |
4 | final bool isOn;
5 | final int value;
6 | }
7 |
--------------------------------------------------------------------------------
/lib/core/shared/domain/entities/smart_room.dart:
--------------------------------------------------------------------------------
1 | import 'package:smart_home_animation/core/shared/domain/entities/smart_device.dart';
2 |
3 | import 'music_info.dart';
4 |
5 | class SmartRoom {
6 | SmartRoom({
7 | required this.id,
8 | required this.name,
9 | required this.imageUrl,
10 | required this.temperature,
11 | required this.airHumidity,
12 | required this.lights,
13 | required this.airCondition,
14 | required this.timer,
15 | required this.musicInfo,
16 | });
17 |
18 | final String id;
19 | final String name;
20 | final String imageUrl;
21 | final double temperature;
22 | final double airHumidity;
23 | final SmartDevice lights;
24 | final SmartDevice airCondition;
25 | final SmartDevice timer;
26 | final MusicInfo musicInfo;
27 |
28 | SmartRoom copyWith({
29 | String? id,
30 | String? name,
31 | String? imageUrl,
32 | double? temperature,
33 | double? airHumidity,
34 | SmartDevice? lights,
35 | SmartDevice? airCondition,
36 | SmartDevice? timer,
37 | MusicInfo? musicInfo,
38 | }) =>
39 | SmartRoom(
40 | id: id ?? this.id,
41 | name: name ?? this.name,
42 | imageUrl: imageUrl ?? this.imageUrl,
43 | temperature: temperature ?? this.temperature,
44 | airHumidity: airHumidity ?? this.airHumidity,
45 | lights: lights ?? this.lights,
46 | airCondition: airCondition ?? this.airCondition,
47 | musicInfo: musicInfo ?? this.musicInfo,
48 | timer: timer ?? this.timer,
49 | );
50 |
51 | static List fakeValues = [
52 | _room,
53 | _room.copyWith(id: '2', name: 'DINING ROOM', imageUrl: _imagesUrls[2]),
54 | _room.copyWith(id: '3', name: 'KITCHEN', imageUrl: _imagesUrls[3]),
55 | _room.copyWith(id: '4', name: 'BEDROOM', imageUrl: _imagesUrls[4]),
56 | _room.copyWith(id: '5', name: 'BATHROOM', imageUrl: _imagesUrls[1]),
57 | ];
58 | }
59 |
60 | final _room = SmartRoom(
61 | id: '1',
62 | name: 'LIVING ROOM',
63 | imageUrl: _imagesUrls[0],
64 | temperature: 12,
65 | airHumidity: 23,
66 | lights: SmartDevice(isOn: true, value: 20),
67 | timer: SmartDevice(isOn: false, value: 20),
68 | airCondition: SmartDevice(isOn: false, value: 10),
69 | musicInfo: MusicInfo(
70 | isOn: false,
71 | currentSong: Song.defaultSong,
72 | ),
73 | );
74 |
75 | const _imagesUrls = [
76 | 'assets/images/0.jpeg',
77 | 'assets/images/1.jpeg',
78 | 'assets/images/2.jpeg',
79 | 'assets/images/3.jpeg',
80 | 'assets/images/4.jpeg',
81 | ];
82 |
--------------------------------------------------------------------------------
/lib/core/shared/presentation/presentation.dart:
--------------------------------------------------------------------------------
1 | export 'widgets/widgets.dart';
2 |
--------------------------------------------------------------------------------
/lib/core/shared/presentation/widgets/blue_dot_light.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class BlueLightDot extends StatelessWidget {
4 | const BlueLightDot({
5 | super.key,
6 | });
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return const SizedBox.square(
11 | dimension: 8,
12 | child: DecoratedBox(
13 | decoration: BoxDecoration(
14 | color: Colors.cyan,
15 | shape: BoxShape.circle,
16 | boxShadow: [
17 | BoxShadow(
18 | color: Colors.cyan,
19 | blurRadius: 10,
20 | )
21 | ],
22 | ),
23 | ),
24 | );
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/core/shared/presentation/widgets/parallax_image_card.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:smart_home_animation/core/theme/sh_colors.dart';
5 | import 'package:ui_common/ui_common.dart';
6 |
7 | class ParallaxImageCard extends StatelessWidget {
8 | const ParallaxImageCard(
9 | {super.key, required this.imageUrl, this.parallaxValue = 0});
10 |
11 | final String imageUrl;
12 | final double parallaxValue;
13 |
14 | BoxDecoration get _perallaxUrlImageDecoration => BoxDecoration(
15 | borderRadius: BorderRadius.all(Radius.circular(12)),
16 | color: SHColors.hintColor,
17 | boxShadow: const [
18 | BoxShadow(
19 | color: Colors.black26,
20 | blurRadius: 12,
21 | offset: Offset(-7, 7),
22 | ),
23 | ],
24 | image: DecorationImage(
25 | image: AssetImage(imageUrl),
26 | fit: BoxFit.cover,
27 | colorFilter:
28 | const ColorFilter.mode(Colors.black26, BlendMode.colorBurn),
29 | alignment: Alignment(lerpDouble(.5, -.5, parallaxValue)!, 0),
30 | ),
31 | );
32 |
33 | BoxDecoration get _vignetteDecoration => BoxDecoration(
34 | borderRadius: 12.borderRadiusA,
35 | gradient: const RadialGradient(
36 | radius: 2,
37 | colors: [Colors.transparent, Colors.black],
38 | ),
39 | );
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | return Stack(
44 | fit: StackFit.expand,
45 | children: [
46 | DecoratedBox(decoration: _perallaxUrlImageDecoration),
47 | DecoratedBox(decoration: _vignetteDecoration),
48 | ],
49 | );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/core/shared/presentation/widgets/room_card.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:smart_home_animation/features/home/presentation/widgets/background_room_lights.dart';
5 | import 'package:ui_common/ui_common.dart';
6 |
7 | import '../../../../features/smart_room/screens/room_details_screen.dart';
8 | import '../../../core.dart';
9 | import 'shimmer_arrows.dart';
10 |
11 | class RoomCard extends StatelessWidget {
12 | const RoomCard({
13 | required this.percent,
14 | required this.room,
15 | required this.expand,
16 | required this.onSwipeUp,
17 | required this.onSwipeDown,
18 | required this.onTap,
19 | super.key,
20 | });
21 |
22 | final double percent;
23 | final SmartRoom room;
24 | final VoidCallback onSwipeUp;
25 | final VoidCallback onSwipeDown;
26 | final VoidCallback onTap;
27 | final bool expand;
28 |
29 | @override
30 | Widget build(BuildContext context) {
31 | return TweenAnimationBuilder(
32 | duration: const Duration(milliseconds: 200),
33 | curve: Curves.fastOutSlowIn,
34 | tween: Tween(begin: 0, end: expand ? 1 : 0),
35 | builder: (_, value, __) => Stack(
36 | fit: StackFit.expand,
37 | children: [
38 | // -----------------------------------------------
39 | // Background information card
40 | // -----------------------------------------------
41 | Transform.scale(
42 | scale: lerpDouble(.85, 1.2, value),
43 | // scale: 0.85,
44 |
45 | child: Padding(
46 | padding: const EdgeInsets.only(bottom: 180),
47 | child: BackgroundRoomCard(room: room, translation: value),
48 | ),
49 | ),
50 | // -----------------------------------------------
51 | // Room image card with parallax effect
52 | // -----------------------------------------------
53 | Padding(
54 | padding: const EdgeInsets.only(bottom: 200),
55 | child: Transform(
56 | transform: Matrix4.translationValues(0, -90 * value, 0),
57 | child: GestureDetector(
58 | onTap: onTap,
59 | onVerticalDragUpdate: (details) {
60 | if (details.primaryDelta! < -10) onSwipeUp();
61 | if (details.primaryDelta! > 10) onSwipeDown();
62 | },
63 | child: Hero(
64 | tag: room.id,
65 | // -----------------------------------------------
66 | // Custom hero widget
67 | // -----------------------------------------------
68 | flightShuttleBuilder: (_, animation, __, ___, ____) {
69 | return AnimatedBuilder(
70 | animation: animation,
71 | builder: (context, _) => Material(
72 | type: MaterialType.transparency,
73 | child: RoomDetailItems(
74 | animation: animation,
75 | topPadding: context.mediaQuery.padding.top,
76 | room: room,
77 | ),
78 | ),
79 | );
80 | },
81 | child: Stack(
82 | fit: StackFit.expand,
83 | clipBehavior: Clip.none,
84 | children: [
85 | ParallaxImageCard(
86 | imageUrl: room.imageUrl,
87 | parallaxValue: percent,
88 | ),
89 | VerticalRoomTitle(room: room),
90 | const CameraIconButton(),
91 | const AnimatedUpwardArrows()
92 | ],
93 | ),
94 | ),
95 | ),
96 | ),
97 | ),
98 | ],
99 | ),
100 | );
101 | }
102 | }
103 |
104 | class AnimatedUpwardArrows extends StatelessWidget {
105 | const AnimatedUpwardArrows({
106 | super.key,
107 | });
108 |
109 | @override
110 | Widget build(BuildContext context) {
111 | return Align(
112 | alignment: Alignment.bottomCenter,
113 | child: Column(
114 | mainAxisAlignment: MainAxisAlignment.end,
115 | children: [
116 | const ShimmerArrows(),
117 | const SizedBox(height: 24),
118 | Container(
119 | margin: const EdgeInsets.only(bottom: 12),
120 | height: 4,
121 | width: 120,
122 | decoration: const BoxDecoration(
123 | color: SHColors.textColor,
124 | borderRadius: BorderRadius.all(Radius.circular(8)),
125 | ),
126 | ),
127 | ],
128 | ),
129 | );
130 | }
131 | }
132 |
133 | class CameraIconButton extends StatelessWidget {
134 | const CameraIconButton({
135 | super.key,
136 | });
137 |
138 | @override
139 | Widget build(BuildContext context) {
140 | return Material(
141 | type: MaterialType.transparency,
142 | child: Align(
143 | alignment: Alignment.topRight,
144 | child: IconButton(
145 | onPressed: () {},
146 | icon: const Icon(
147 | SHIcons.camera,
148 | color: SHColors.textColor,
149 | ),
150 | ),
151 | ),
152 | );
153 | }
154 | }
155 |
156 | class VerticalRoomTitle extends StatelessWidget {
157 | const VerticalRoomTitle({
158 | required this.room,
159 | super.key,
160 | });
161 |
162 | final SmartRoom room;
163 |
164 | @override
165 | Widget build(BuildContext context) {
166 | // final dx = 50 * animationValue;
167 | // final opacity = 1 - animationValue;
168 | return Align(
169 | alignment: Alignment.centerLeft,
170 | child: RotatedBox(
171 | quarterTurns: -1,
172 | child: FittedBox(
173 | child: Padding(
174 | padding: EdgeInsets.only(left: 40.h, right: 20.h, top: 12.w),
175 | child: Text(
176 | room.name.replaceAll(' ', ''),
177 | maxLines: 1,
178 | style: context.displayLarge.copyWith(color: SHColors.textColor),
179 | ),
180 | ),
181 | ),
182 | ),
183 | );
184 | }
185 | }
186 |
--------------------------------------------------------------------------------
/lib/core/shared/presentation/widgets/sh_app_bar.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:smart_home_animation/core/theme/sh_icons.dart';
3 |
4 | class ShAppBar extends StatelessWidget implements PreferredSizeWidget {
5 | const ShAppBar({
6 | super.key,
7 | });
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return AppBar(
12 | leading: Hero(
13 | tag: "app-bar-icon-1",
14 | child: Material(
15 | type: MaterialType.transparency,
16 | child: IconButton(
17 | onPressed: () {},
18 | icon: const Icon(SHIcons.menu),
19 | ),
20 | ),
21 | ),
22 | actions: [
23 | Hero(
24 | tag: "app-bar-icon-2",
25 | child: Material(
26 | type: MaterialType.transparency,
27 | child: IconButton(
28 | onPressed: () {},
29 | icon: const Icon(SHIcons.search),
30 | ),
31 | ),
32 | ),
33 | const SizedBox(width: 8),
34 | ],
35 | );
36 | }
37 |
38 | @override
39 | Size get preferredSize => const Size(double.infinity, kToolbarHeight);
40 | }
41 |
--------------------------------------------------------------------------------
/lib/core/shared/presentation/widgets/sh_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:ui_common/ui_common.dart';
3 |
4 | import '../../../core.dart';
5 |
6 | class SHCard extends StatelessWidget {
7 | const SHCard({
8 | super.key,
9 | this.height,
10 | this.children = const [],
11 | this.childrenPadding = EdgeInsets.zero,
12 | });
13 |
14 | final double? height;
15 | final List children;
16 | final EdgeInsets childrenPadding;
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return SizedBox(
21 | height: height,
22 | child: DecoratedBox(
23 | decoration: BoxDecoration(
24 | gradient: const LinearGradient(
25 | begin: Alignment.topCenter,
26 | end: Alignment.bottomCenter,
27 | colors: SHColors.cardColors,
28 | ),
29 | boxShadow: const [
30 | BoxShadow(
31 | color: Colors.black38,
32 | blurRadius: 20,
33 | offset: Offset(-10, 10),
34 | ),
35 | ],
36 | borderRadius: 12.borderRadiusA,
37 | ),
38 | child: Column(
39 | mainAxisSize: MainAxisSize.min,
40 | children: [
41 | for (int index = 0; index < children.length; index++) ...[
42 | Padding(
43 | padding: childrenPadding,
44 | child: children[index],
45 | ),
46 | if (index < children.length - 1) const SHDivider(),
47 | ],
48 | ],
49 | ),
50 | ),
51 | );
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/lib/core/shared/presentation/widgets/sh_divider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:ui_common/ui_common.dart';
3 |
4 | import '../../../core.dart';
5 |
6 | class SHDivider extends StatelessWidget {
7 | const SHDivider({
8 | super.key,
9 | });
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return DecoratedBox(
14 | decoration: const BoxDecoration(
15 | color: SHColors.backgroundColor,
16 | boxShadow: [
17 | BoxShadow(
18 | blurRadius: 1,
19 | color: Colors.white54,
20 | offset: Offset(0, 1),
21 | ),
22 | ],
23 | ),
24 | child: SizedBox(height: 1.r, width: double.infinity),
25 | );
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/core/shared/presentation/widgets/sh_switcher.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | import '../../../core.dart';
5 |
6 | class SHSwitcher extends StatelessWidget {
7 | const SHSwitcher({
8 | required this.value,
9 | required this.onChanged,
10 | this.icon,
11 | super.key,
12 | });
13 |
14 | final bool value;
15 | final Icon? icon;
16 | final ValueChanged onChanged;
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return FittedBox(
21 | fit: BoxFit.scaleDown,
22 | child: Row(
23 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
24 | children: [
25 | if (icon != null) ...[
26 | IconTheme(
27 | data: IconThemeData(
28 | color: value ? SHColors.selectedColor : Colors.white38,
29 | ),
30 | child: icon!,
31 | ),
32 | const SizedBox(width: 8),
33 | ],
34 | CupertinoSwitch(
35 | trackColor: SHColors.trackColor,
36 | activeColor: SHColors.trackColor,
37 | thumbColor: value ? null : Colors.white60,
38 | value: value,
39 | onChanged: onChanged,
40 | ),
41 | const SizedBox(width: 8),
42 | Text(
43 | value ? 'ON' : 'OFF',
44 | style: TextStyle(
45 | fontSize: 16,
46 | fontWeight: FontWeight.w900,
47 | color: value ? SHColors.selectedColor : Colors.white38,
48 | ),
49 | )
50 | ],
51 | ),
52 | );
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/core/shared/presentation/widgets/shimmer_arrows.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../theme/sh_icons.dart';
4 |
5 | class ShimmerArrows extends StatefulWidget {
6 | const ShimmerArrows({super.key});
7 |
8 | @override
9 | State createState() => _ShimmerArrowsState();
10 | }
11 |
12 | class _ShimmerArrowsState extends State
13 | with TickerProviderStateMixin {
14 | late final AnimationController _controller;
15 |
16 | @override
17 | void initState() {
18 | _controller = AnimationController.unbounded(vsync: this)
19 | ..repeat(min: -0.5, max: 1.5, period: const Duration(seconds: 1));
20 | super.initState();
21 | }
22 |
23 | @override
24 | void dispose() {
25 | _controller.dispose();
26 | super.dispose();
27 | }
28 |
29 | Gradient get gradient => LinearGradient(
30 | begin: Alignment.topCenter,
31 | end: Alignment.bottomCenter,
32 | colors: const [Colors.white10, Colors.white, Colors.white10],
33 | stops: const [0.0, 0.3, 1],
34 | transform: _SlideGradientTransform(_controller.value),
35 | );
36 |
37 | @override
38 | Widget build(BuildContext context) {
39 | return AnimatedBuilder(
40 | animation: _controller,
41 | builder: (_, child) {
42 | return ShaderMask(
43 | shaderCallback: (bounds) => gradient.createShader(bounds),
44 | child: child,
45 | );
46 | },
47 | child: const Column(
48 | children: [
49 | Align(heightFactor: .4, child: Icon(SHIcons.arrowUp)),
50 | Align(heightFactor: .4, child: Icon(SHIcons.arrowUp)),
51 | Align(heightFactor: .4, child: Icon(SHIcons.arrowUp)),
52 | ],
53 | ),
54 | );
55 | }
56 | }
57 |
58 | class _SlideGradientTransform extends GradientTransform {
59 | const _SlideGradientTransform(this.percent);
60 |
61 | final double percent;
62 |
63 | @override
64 | Matrix4? transform(Rect bounds, {TextDirection? textDirection}) =>
65 | Matrix4.translationValues(0, -(bounds.height * percent), 0);
66 | }
67 |
--------------------------------------------------------------------------------
/lib/core/shared/presentation/widgets/widgets.dart:
--------------------------------------------------------------------------------
1 | export 'sh_app_bar.dart';
2 | export 'parallax_image_card.dart';
3 | export 'blue_dot_light.dart';
4 | export 'sh_divider.dart';
5 | export 'sh_card.dart';
6 | export 'sh_switcher.dart';
7 |
--------------------------------------------------------------------------------
/lib/core/shared/shared.dart:
--------------------------------------------------------------------------------
1 | export 'domain/domain.dart';
2 | export 'presentation/presentation.dart';
3 |
--------------------------------------------------------------------------------
/lib/core/theme/sh_colors.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | abstract class SHColors {
4 | static const Color textColor = Color(0xFFD0D7E1);
5 | static const Color hintColor = Color(0xFF717578);
6 | static const Color backgroundColor = Color(0xff343941);
7 | static const Color cardColor = Color(0xff4D565F);
8 | static const Color trackColor = Color(0xff2C3037);
9 | static const Color selectedColor = Color(0xffE3D0B2);
10 |
11 | static const List cardColors = [
12 | Color(0xff60656D),
13 | Color(0xff4D565F),
14 | Color(0xff464D57),
15 | ];
16 | static const List dimmedLightColors = [
17 | Color(0xff505863),
18 | Color(0xff424a53),
19 | Color(0xff343941),
20 | ];
21 | }
22 |
--------------------------------------------------------------------------------
/lib/core/theme/sh_icons.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:fluttericon/font_awesome5_icons.dart';
4 |
5 | abstract class SHIcons {
6 | static const IconData search = CupertinoIcons.search;
7 | static const IconData menu = CupertinoIcons.line_horizontal_3;
8 | static const IconData lock = CupertinoIcons.lock_fill;
9 | static const IconData home = CupertinoIcons.home;
10 | static const IconData settings = CupertinoIcons.settings;
11 | static const IconData camera = CupertinoIcons.camera_fill;
12 | static const IconData arrowUp = Icons.keyboard_arrow_up;
13 | static const IconData fan = FontAwesome5.fan;
14 | static const IconData lightBulbOutline = Icons.lightbulb_outline;
15 | static const IconData lightBulb = Icons.lightbulb;
16 | static const IconData music = Icons.music_note;
17 | static const IconData thermostat = Icons.device_thermostat;
18 | static const IconData waterDrop = Icons.water_drop_outlined;
19 | static const IconData timer = Icons.timer_outlined;
20 | static const IconData timerOff = Icons.timer_off_outlined;
21 | static const IconData lightMin = Icons.light_mode_outlined;
22 | static const IconData lightMax = Icons.light_mode;
23 | static const IconData snowFlake = CupertinoIcons.snow;
24 | static const IconData wind = CupertinoIcons.wind;
25 | static const IconData air = FontAwesome5.air_freshener;
26 | }
27 |
--------------------------------------------------------------------------------
/lib/core/theme/sh_theme.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 |
4 | import 'sh_colors.dart';
5 |
6 | abstract class SHTheme {
7 | static ThemeData dark = ThemeData(
8 | textTheme: TextTheme(
9 | bodyLarge: GoogleFonts.gruppo(
10 | fontSize: 16,
11 | fontWeight: FontWeight.w800,
12 | color: SHColors.textColor,
13 | ),
14 | bodyMedium: GoogleFonts.gruppo(
15 | fontSize: 14,
16 | fontWeight: FontWeight.w800,
17 | color: SHColors.textColor,
18 | ),
19 | bodySmall: GoogleFonts.montserrat(
20 | fontSize: 10,
21 | fontWeight: FontWeight.w400,
22 | color: SHColors.textColor,
23 | ),
24 | displayLarge: GoogleFonts.buda(
25 | fontSize: 70,
26 | color: SHColors.textColor,
27 | ),
28 | displayMedium: GoogleFonts.buda(
29 | fontSize: 50,
30 | color: SHColors.textColor,
31 | ),
32 | displaySmall: GoogleFonts.buda(
33 | fontSize: 40,
34 | color: SHColors.textColor,
35 | ),
36 | ),
37 | appBarTheme: const AppBarTheme(
38 | elevation: 0,
39 | backgroundColor: Colors.transparent,
40 | ),
41 | iconTheme: const IconThemeData(color: SHColors.textColor),
42 | textButtonTheme: TextButtonThemeData(
43 | style: TextButton.styleFrom(
44 | foregroundColor: Colors.white,
45 | shape: const StadiumBorder(),
46 | textStyle: GoogleFonts.montserrat(
47 | fontSize: 12,
48 | fontWeight: FontWeight.w800,
49 | ),
50 | ),
51 | ),
52 | sliderTheme: const SliderThemeData(
53 | activeTrackColor: SHColors.selectedColor,
54 | inactiveTrackColor: SHColors.trackColor,
55 | thumbColor: SHColors.selectedColor,
56 | trackHeight: 2,
57 | ),
58 | bottomNavigationBarTheme: BottomNavigationBarThemeData(
59 | backgroundColor: Colors.transparent,
60 | elevation: 0,
61 | selectedIconTheme: const IconThemeData(size: 40),
62 | unselectedIconTheme: const IconThemeData(size: 40),
63 | selectedItemColor: SHColors.hintColor,
64 | unselectedItemColor: SHColors.hintColor,
65 | selectedLabelStyle: GoogleFonts.montserrat(
66 | fontSize: 12,
67 | fontWeight: FontWeight.w700,
68 | ),
69 | unselectedLabelStyle: GoogleFonts.montserrat(
70 | fontSize: 12,
71 | fontWeight: FontWeight.w700,
72 | ),
73 | ),
74 | scaffoldBackgroundColor: SHColors.backgroundColor,
75 | );
76 | }
77 |
--------------------------------------------------------------------------------
/lib/core/theme/theme.dart:
--------------------------------------------------------------------------------
1 | export 'sh_colors.dart';
2 | export 'sh_icons.dart';
3 | export 'sh_theme.dart';
4 |
--------------------------------------------------------------------------------
/lib/features/home/presentation/screens/home_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:smart_home_animation/core/core.dart';
3 | import 'package:ui_common/ui_common.dart';
4 |
5 | import '../widgets/lighted_background.dart';
6 | import '../widgets/page_indicators.dart';
7 | import '../widgets/sm_home_bottom_navigation.dart';
8 | import '../widgets/smart_room_page_view.dart';
9 |
10 | class HomeScreen extends StatefulWidget {
11 | const HomeScreen({super.key});
12 |
13 | @override
14 | State createState() => _HomeScreenState();
15 | }
16 |
17 | class _HomeScreenState extends State {
18 | final controller = PageController(viewportFraction: 0.8);
19 | final ValueNotifier pageNotifier = ValueNotifier(0);
20 | final ValueNotifier roomSelectorNotifier = ValueNotifier(-1);
21 |
22 | @override
23 | void initState() {
24 | controller.addListener(pageListener);
25 | super.initState();
26 | }
27 |
28 | @override
29 | void dispose() {
30 | controller
31 | ..removeListener(pageListener)
32 | ..dispose();
33 | super.dispose();
34 | }
35 |
36 | void pageListener() {
37 | pageNotifier.value = controller.page ?? 0;
38 | }
39 |
40 | @override
41 | Widget build(BuildContext context) {
42 | return LightedBackgound(
43 | child: Scaffold(
44 | backgroundColor: Colors.transparent,
45 | appBar: const ShAppBar(),
46 | body: SafeArea(
47 | child: Column(
48 | children: [
49 | const SizedBox(height: 24),
50 | Text("SELECT A ROOM", style: context.bodyLarge),
51 | height32,
52 | Expanded(
53 | child: Stack(
54 | fit: StackFit.expand,
55 | clipBehavior: Clip.none,
56 | children: [
57 | SmartRoomsPageView(
58 | pageNotifier: pageNotifier,
59 | roomSelectorNotifier: roomSelectorNotifier,
60 | controller: controller,
61 | ),
62 | Positioned.fill(
63 | top: null,
64 | child: Column(
65 | children: [
66 | PageIndicators(
67 | roomSelectorNotifier: roomSelectorNotifier,
68 | pageNotifier: pageNotifier,
69 | ),
70 | SmHomeBottomNavigationBar(
71 | roomSelectorNotifier: roomSelectorNotifier,
72 | ),
73 | ],
74 | ),
75 | ),
76 | ],
77 | ),
78 | ),
79 | ],
80 | ),
81 | ),
82 | ),
83 | );
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/lib/features/home/presentation/widgets/background_room_lights.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 | import 'package:ui_common/ui_common.dart';
4 |
5 | import '../../../../core/core.dart';
6 |
7 | class BackgroundRoomCard extends StatelessWidget {
8 | const BackgroundRoomCard({
9 | required this.room,
10 | required this.translation,
11 | super.key,
12 | });
13 |
14 | final SmartRoom room;
15 | final double translation;
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return Transform(
20 | transform: Matrix4.translationValues(0, 80 * translation, 0),
21 | child: DecoratedBox(
22 | decoration: const BoxDecoration(
23 | color: SHColors.cardColor,
24 | borderRadius: BorderRadius.all(Radius.circular(12)),
25 | boxShadow: [
26 | BoxShadow(
27 | color: Colors.black26,
28 | blurRadius: 12,
29 | offset: Offset(-7, 7),
30 | ),
31 | ],
32 | ),
33 | child: Column(
34 | mainAxisAlignment: MainAxisAlignment.end,
35 | crossAxisAlignment: CrossAxisAlignment.stretch,
36 | children: [
37 | _RoomInfoRow(
38 | icon: const Icon(SHIcons.thermostat),
39 | label: const Text('Temperature'),
40 | data: '${room.temperature}°',
41 | ),
42 | height4,
43 | _RoomInfoRow(
44 | icon: const Icon(SHIcons.waterDrop),
45 | label: const Text('Air Humidity'),
46 | data: '${room.airHumidity}%',
47 | ),
48 | height4,
49 | const _RoomInfoRow(
50 | icon: Icon(SHIcons.timer),
51 | label: Text('Timer'),
52 | data: null,
53 | ),
54 | height12,
55 | const SHDivider(),
56 | Padding(
57 | padding: EdgeInsets.all(12.sp),
58 | child: Row(
59 | mainAxisAlignment: MainAxisAlignment.spaceAround,
60 | children: [
61 | _DeviceIconSwitcher(
62 | onTap: (value) {},
63 | icon: const Icon(SHIcons.lightBulbOutline),
64 | label: const Text('Lights'),
65 | value: room.lights.isOn,
66 | ),
67 | _DeviceIconSwitcher(
68 | onTap: (value) {},
69 | icon: const Icon(SHIcons.fan),
70 | label: const Text('Air-conditioning'),
71 | value: room.airCondition.isOn,
72 | ),
73 | _DeviceIconSwitcher(
74 | onTap: (value) {},
75 | icon: const Icon(SHIcons.music),
76 | label: const Text('Music'),
77 | value: room.musicInfo.isOn,
78 | ),
79 | ],
80 | ),
81 | ),
82 | ],
83 | ),
84 | ),
85 | );
86 | }
87 | }
88 |
89 | class _DeviceIconSwitcher extends StatelessWidget {
90 | const _DeviceIconSwitcher({
91 | required this.onTap,
92 | required this.label,
93 | required this.icon,
94 | required this.value,
95 | });
96 |
97 | final Text label;
98 | final Icon icon;
99 | final bool value;
100 | final ValueChanged onTap;
101 |
102 | @override
103 | Widget build(BuildContext context) {
104 | final color = value ? SHColors.selectedColor : SHColors.textColor;
105 | return InkWell(
106 | onTap: () => onTap(!value),
107 | child: Column(
108 | children: [
109 | IconTheme(
110 | data: IconThemeData(color: color, size: 24.sp),
111 | child: icon,
112 | ),
113 | const SizedBox(height: 4),
114 | DefaultTextStyle(
115 | style: context.bodySmall.copyWith(color: color),
116 | child: label,
117 | ),
118 | Text(
119 | value ? 'ON' : 'OFF',
120 | style: GoogleFonts.montserrat(
121 | fontWeight: FontWeight.w700,
122 | color: color,
123 | ),
124 | ),
125 | ],
126 | ),
127 | );
128 | }
129 | }
130 |
131 | class _RoomInfoRow extends StatelessWidget {
132 | const _RoomInfoRow({
133 | required this.icon,
134 | required this.label,
135 | required this.data,
136 | });
137 |
138 | final Icon icon;
139 | final Text label;
140 | final String? data;
141 |
142 | @override
143 | Widget build(BuildContext context) {
144 | return Row(
145 | children: [
146 | width32,
147 | IconTheme(
148 | data: context.iconTheme.copyWith(size: 18.sp),
149 | child: icon,
150 | ),
151 | width4,
152 | Expanded(
153 | child: DefaultTextStyle(
154 | style: context.bodySmall.copyWith(
155 | color: data == null ? context.textColor.withOpacity(.6) : null,
156 | ),
157 | child: label,
158 | ),
159 | ),
160 | if (data != null)
161 | Text(
162 | data!,
163 | style: GoogleFonts.montserrat(
164 | fontSize: 14.sp,
165 | fontWeight: FontWeight.w700,
166 | ),
167 | )
168 | else
169 | Row(
170 | children: [
171 | const BlueLightDot(),
172 | width4,
173 | Text(
174 | 'OFF',
175 | style: GoogleFonts.montserrat(
176 | fontWeight: FontWeight.w800,
177 | fontSize: 12.sp,
178 | color: SHColors.textColor.withOpacity(.6),
179 | ),
180 | ),
181 | ],
182 | ),
183 | width32,
184 | ],
185 | );
186 | }
187 | }
188 |
--------------------------------------------------------------------------------
/lib/features/home/presentation/widgets/lighted_background.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:smart_home_animation/core/theme/sh_colors.dart';
3 |
4 | class LightedBackgound extends StatelessWidget {
5 | const LightedBackgound({
6 | super.key,
7 | required this.child,
8 | });
9 |
10 | final Widget child;
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Stack(
15 | fit: StackFit.expand,
16 | children: [
17 | const ColoredBox(color: SHColors.backgroundColor),
18 | Transform.scale(
19 | scale: 2,
20 | alignment: Alignment.center,
21 | child: Transform(
22 | transform: Matrix4.identity()
23 | ..setEntry(3, 2, 0.001)
24 | ..rotateY(1.4)
25 | ..rotateX(0.1)
26 | ..setTranslationRaw(90, -80, 0),
27 | child: const DecoratedBox(
28 | decoration: BoxDecoration(
29 | gradient: RadialGradient(
30 | focal: Alignment.topCenter,
31 | center: Alignment(0, -0.55),
32 | colors: SHColors.dimmedLightColors,
33 | ),
34 | ),
35 | ),
36 | ),
37 | ),
38 | child,
39 | ],
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/features/home/presentation/widgets/page_indicators.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../../core/shared/domain/entities/smart_room.dart';
4 | import '../../../../core/theme/sh_colors.dart';
5 |
6 | class PageIndicators extends StatelessWidget {
7 | const PageIndicators({
8 | super.key,
9 | required this.roomSelectorNotifier,
10 | required this.pageNotifier,
11 | });
12 |
13 | final ValueNotifier roomSelectorNotifier;
14 | final ValueNotifier pageNotifier;
15 |
16 | @override
17 | Widget build(BuildContext context) {
18 | return ValueListenableBuilder(
19 | valueListenable: roomSelectorNotifier,
20 | builder: (_, value, child) => AnimatedOpacity(
21 | opacity: value != -1 ? 0 : 1,
22 | duration: value != -1
23 | ? const Duration(milliseconds: 1)
24 | : const Duration(milliseconds: 400),
25 | child: child,
26 | ),
27 | child: ValueListenableBuilder(
28 | valueListenable: pageNotifier,
29 | builder: (_, value, __) => Center(
30 | child: PageViewIndicators(
31 | length: SmartRoom.fakeValues.length,
32 | pageIndex: value,
33 | ),
34 | ),
35 | ),
36 | );
37 | }
38 | }
39 |
40 | class PageViewIndicators extends StatelessWidget {
41 | const PageViewIndicators({
42 | required this.length,
43 | required this.pageIndex,
44 | super.key,
45 | });
46 |
47 | final int length;
48 | final double pageIndex;
49 |
50 | @override
51 | Widget build(BuildContext context) {
52 | final index = pageIndex;
53 | return SizedBox(
54 | height: 12,
55 | child: Stack(
56 | clipBehavior: Clip.none,
57 | alignment: Alignment.center,
58 | children: [
59 | Row(
60 | mainAxisSize: MainAxisSize.min,
61 | children: [
62 | for (int i = 0; i < length; i++) ...[
63 | const _Dot(),
64 | if (i < length - 1) const SizedBox(width: 16),
65 | ],
66 | ],
67 | ),
68 | Positioned(
69 | left: (16 * index) + (6 * index),
70 | child: const _BorderDot(),
71 | )
72 | ],
73 | ),
74 | );
75 | }
76 | }
77 |
78 | class _BorderDot extends StatelessWidget {
79 | const _BorderDot();
80 |
81 | @override
82 | Widget build(BuildContext context) {
83 | return SizedBox(
84 | width: 12,
85 | height: 12,
86 | child: DecoratedBox(
87 | decoration: BoxDecoration(
88 | border: Border.all(color: Colors.orange, width: 2),
89 | color: SHColors.backgroundColor,
90 | shape: BoxShape.circle,
91 | ),
92 | ),
93 | );
94 | }
95 | }
96 |
97 | class _Dot extends StatelessWidget {
98 | const _Dot();
99 |
100 | @override
101 | Widget build(BuildContext context) {
102 | return const SizedBox(
103 | width: 6,
104 | height: 6,
105 | child: DecoratedBox(
106 | decoration: BoxDecoration(
107 | color: SHColors.hintColor,
108 | shape: BoxShape.circle,
109 | ),
110 | ),
111 | );
112 | }
113 | }
--------------------------------------------------------------------------------
/lib/features/home/presentation/widgets/sm_home_bottom_navigation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../../core/core.dart';
4 |
5 | class SmHomeBottomNavigationBar extends StatelessWidget {
6 | const SmHomeBottomNavigationBar({
7 | super.key,
8 | required this.roomSelectorNotifier,
9 | });
10 |
11 | final ValueNotifier roomSelectorNotifier;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Padding(
16 | padding: const EdgeInsets.all(20),
17 | child: ValueListenableBuilder(
18 | valueListenable: roomSelectorNotifier,
19 | builder: (_, value, child) => AnimatedOpacity(
20 | duration: kThemeAnimationDuration,
21 | opacity: value != -1 ? 0 : 1,
22 | child: AnimatedContainer(
23 | duration: kThemeAnimationDuration,
24 | transform:
25 | Matrix4.translationValues(0, value != -1 ? -30.0 : 0.0, 0),
26 | child: child,
27 | ),
28 | ),
29 | child: BottomNavigationBar(
30 | items: const [
31 | BottomNavigationBarItem(
32 | icon: Padding(
33 | padding: EdgeInsets.all(8),
34 | child: Icon(SHIcons.lock),
35 | ),
36 | label: 'UNLOCK',
37 | ),
38 | BottomNavigationBarItem(
39 | icon: Padding(
40 | padding: EdgeInsets.all(8),
41 | child: Icon(SHIcons.home),
42 | ),
43 | label: 'MAIN',
44 | ),
45 | BottomNavigationBarItem(
46 | icon: Padding(
47 | padding: EdgeInsets.all(8),
48 | child: Icon(SHIcons.settings),
49 | ),
50 | label: 'SETTINGS',
51 | ),
52 | ],
53 | ),
54 | ),
55 | );
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/lib/features/home/presentation/widgets/smart_room_page_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../../core/shared/domain/entities/smart_room.dart';
4 | import '../../../../core/shared/presentation/widgets/room_card.dart';
5 | import '../../../smart_room/screens/room_details_screen.dart';
6 |
7 | class SmartRoomsPageView extends StatelessWidget {
8 | const SmartRoomsPageView({
9 | super.key,
10 | required this.pageNotifier,
11 | required this.roomSelectorNotifier,
12 | required this.controller,
13 | });
14 |
15 | final ValueNotifier pageNotifier;
16 | final ValueNotifier roomSelectorNotifier;
17 | final PageController controller;
18 |
19 | double _getOffsetX(double percent) => percent.isNegative ? 30.0 : -30.0;
20 |
21 | Matrix4 _getOutTranslate(double percent, int selected, int index) {
22 | final x = selected != index && selected != -1 ? _getOffsetX(percent) : 0.0;
23 | return Matrix4.translationValues(x, 0, 0);
24 | }
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | return ValueListenableBuilder(
29 | valueListenable: pageNotifier,
30 | builder: (_, page, __) => ValueListenableBuilder(
31 | valueListenable: roomSelectorNotifier,
32 | builder: (_, selected, __) => PageView.builder(
33 | clipBehavior: Clip.none,
34 | itemCount: SmartRoom.fakeValues.length,
35 | controller: controller,
36 | itemBuilder: (_, index) {
37 | final percent = page - index;
38 | final isSelected = selected == index;
39 | final room = SmartRoom.fakeValues[index];
40 | return AnimatedContainer(
41 | duration: kThemeAnimationDuration,
42 | curve: Curves.fastOutSlowIn,
43 | transform: _getOutTranslate(percent, selected, index),
44 | padding: const EdgeInsets.symmetric(horizontal: 16),
45 | child: RoomCard(
46 | percent: percent,
47 | expand: isSelected,
48 | room: room,
49 | onSwipeUp: () => roomSelectorNotifier.value = index,
50 | onSwipeDown: () => roomSelectorNotifier.value = -1,
51 | onTap: () async {
52 | if (isSelected) {
53 | await Navigator.push(
54 | context,
55 | PageRouteBuilder(
56 | transitionDuration: const Duration(milliseconds: 800),
57 | reverseTransitionDuration:
58 | const Duration(milliseconds: 800),
59 | pageBuilder: (_, animation, __) => FadeTransition(
60 | opacity: animation,
61 | child: RoomDetailScreen(room: room),
62 | ),
63 | ),
64 | );
65 | roomSelectorNotifier.value = -1;
66 | }
67 | },
68 | ),
69 | );
70 | },
71 | ),
72 | ),
73 | );
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/lib/features/smart_room/screens/room_details_screen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:smart_home_animation/core/shared/domain/entities/smart_room.dart';
5 | import 'package:smart_home_animation/core/shared/presentation/widgets/parallax_image_card.dart';
6 | import 'package:smart_home_animation/core/shared/presentation/widgets/sh_app_bar.dart';
7 | import 'package:ui_common/ui_common.dart';
8 |
9 | import '../../../core/shared/presentation/widgets/room_card.dart';
10 | import '../widgets/room_details_page_view.dart';
11 |
12 | class RoomDetailScreen extends StatelessWidget {
13 | const RoomDetailScreen({
14 | required this.room,
15 | super.key,
16 | });
17 |
18 | final SmartRoom room;
19 |
20 | @override
21 | Widget build(BuildContext context) {
22 | return Scaffold(
23 | extendBodyBehindAppBar: true,
24 | appBar: const ShAppBar(),
25 | body: RoomDetailItems(
26 | topPadding: context.mediaQuery.padding.top,
27 | room: room,
28 | ),
29 | );
30 | }
31 | }
32 |
33 | class RoomDetailItems extends StatelessWidget {
34 | const RoomDetailItems({
35 | required this.room,
36 | required this.topPadding,
37 | this.animation = const AlwaysStoppedAnimation(1),
38 | super.key,
39 | });
40 |
41 | final Animation animation;
42 | final double topPadding;
43 | final SmartRoom room;
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | final outDx = 200 * animation.value;
48 | final outDy = 100 * animation.value;
49 | final sigma = 10 * animation.value;
50 | return Hero(
51 | tag: room.id,
52 | child: Stack(
53 | alignment: Alignment.center,
54 | fit: StackFit.expand,
55 | children: [
56 | ParallaxImageCard(imageUrl: room.imageUrl),
57 | ClipRRect(
58 | child: BackdropFilter(
59 | filter: ImageFilter.blur(sigmaY: sigma, sigmaX: sigma),
60 | child: const ColoredBox(color: Colors.transparent),
61 | ),
62 | ),
63 | // --------------------------------------------
64 | // Animated output elements
65 | // --------------------------------------------
66 | FadeTransition(
67 | opacity: Tween(begin: 1, end: 0).animate(animation),
68 | child: Stack(
69 | children: [
70 | Transform.translate(
71 | offset: Offset(-outDx, 0),
72 | child: VerticalRoomTitle(room: room),
73 | ),
74 | Transform.translate(
75 | offset: Offset(outDx, outDy),
76 | child: const CameraIconButton(),
77 | ),
78 | Transform.translate(
79 | offset: Offset(0, outDy),
80 | child: const AnimatedUpwardArrows(),
81 | ),
82 | ],
83 | ),
84 | ),
85 | // --------------------------------------------
86 | // Animated room controls
87 | // --------------------------------------------
88 | FadeTransition(
89 | opacity: animation,
90 | child: Container(
91 | transform:
92 | Matrix4.translationValues(0, -200 * (1 - animation.value), 0),
93 | padding: EdgeInsets.only(top: topPadding + 12),
94 | child: Column(
95 | crossAxisAlignment: CrossAxisAlignment.stretch,
96 | children: [
97 | Text(
98 | room.name.replaceAll(' ', '\n'),
99 | textAlign: TextAlign.center,
100 | style: context.displaySmall.copyWith(height: .9),
101 | ),
102 | const Text('SETTINGS', textAlign: TextAlign.center),
103 | Expanded(
104 | child: RoomDetailsPageView(
105 | animation: animation,
106 | room: room,
107 | ),
108 | )
109 | ],
110 | ),
111 | ),
112 | ),
113 | ],
114 | ),
115 | );
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/lib/features/smart_room/widgets/air_conditiioner_controls_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 |
4 | import '../../../core/core.dart';
5 |
6 | class AirConditionerControlsCard extends StatelessWidget {
7 | const AirConditionerControlsCard({
8 | required this.room,
9 | super.key,
10 | });
11 |
12 | final SmartRoom room;
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return SHCard(
17 | childrenPadding: const EdgeInsets.all(12),
18 | children: [
19 | _AirSwitcher(room: room),
20 | const _AirIcons(),
21 | Column(
22 | children: [
23 | Row(
24 | children: [
25 | Container(
26 | width: 120,
27 | height: 50,
28 | margin: const EdgeInsets.all(8),
29 | decoration: BoxDecoration(
30 | borderRadius: const BorderRadius.all(Radius.circular(8)),
31 | border: Border.all(
32 | width: 10,
33 | color: Colors.white38,
34 | ),
35 | ),
36 | ),
37 | Expanded(
38 | child: FittedBox(
39 | fit: BoxFit.scaleDown,
40 | child: Row(
41 | mainAxisAlignment: MainAxisAlignment.end,
42 | children: [
43 | const Icon(
44 | SHIcons.waterDrop,
45 | color: Colors.white38,
46 | size: 20,
47 | ),
48 | Text(
49 | 'Air humidity',
50 | style: GoogleFonts.montserrat(
51 | fontSize: 10,
52 | color: Colors.white60,
53 | fontWeight: FontWeight.w500,
54 | ),
55 | ),
56 | const SizedBox(width: 8),
57 | Text('${room.airHumidity.toInt()}%'),
58 | ],
59 | ),
60 | ),
61 | )
62 | ],
63 | )
64 | ],
65 | )
66 | ],
67 | );
68 | }
69 | }
70 |
71 | class _AirIcons extends StatelessWidget {
72 | const _AirIcons();
73 |
74 | @override
75 | Widget build(BuildContext context) {
76 | return const IconTheme(
77 | data: IconThemeData(size: 30, color: Colors.white38),
78 | child: Row(
79 | children: [
80 | Icon(SHIcons.snowFlake),
81 | SizedBox(
82 | width: 8,
83 | ),
84 | Icon(SHIcons.wind),
85 | SizedBox(
86 | width: 8,
87 | ),
88 | Icon(SHIcons.waterDrop),
89 | SizedBox(
90 | width: 8,
91 | ),
92 | Icon(SHIcons.timer, color: SHColors.selectedColor),
93 | ],
94 | ),
95 | );
96 | }
97 | }
98 |
99 | class _AirSwitcher extends StatelessWidget {
100 | const _AirSwitcher({
101 | required this.room,
102 | });
103 |
104 | final SmartRoom room;
105 |
106 | @override
107 | Widget build(BuildContext context) {
108 | return Column(
109 | crossAxisAlignment: CrossAxisAlignment.start,
110 | children: [
111 | const Text('Air conditioning'),
112 | const SizedBox(height: 12),
113 | Row(
114 | children: [
115 | Expanded(
116 | child: SHSwitcher(
117 | icon: const Icon(SHIcons.fan),
118 | value: room.airCondition.isOn,
119 | onChanged: (value) {},
120 | ),
121 | ),
122 | const Spacer(),
123 | Text(
124 | '${room.airCondition.value}˚',
125 | style: const TextStyle(fontSize: 28),
126 | )
127 | ],
128 | )
129 | ],
130 | );
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/lib/features/smart_room/widgets/light_and_time_switcher.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../core/core.dart';
4 |
5 | class LightsAndTimerSwitchers extends StatelessWidget {
6 | const LightsAndTimerSwitchers({
7 | required this.room,
8 | super.key,
9 | });
10 |
11 | final SmartRoom room;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return SHCard(
16 | childrenPadding: const EdgeInsets.all(12),
17 | children: [
18 | Column(
19 | crossAxisAlignment: CrossAxisAlignment.start,
20 | children: [
21 | const Text('Lights'),
22 | const SizedBox(height: 8),
23 | SHSwitcher(
24 | value: room.lights.isOn,
25 | onChanged: (value) {},
26 | icon: const Icon(SHIcons.lightBulbOutline),
27 | ),
28 | ],
29 | ),
30 | Column(
31 | crossAxisAlignment: CrossAxisAlignment.start,
32 | children: [
33 | const Row(
34 | children: [
35 | Text('Timer'),
36 | Spacer(),
37 | BlueLightDot(),
38 | ],
39 | ),
40 | const SizedBox(height: 8),
41 | SHSwitcher(
42 | icon: room.timer.isOn
43 | ? const Icon(SHIcons.timer)
44 | : const Icon(SHIcons.timerOff),
45 | value: room.timer.isOn,
46 | onChanged: (value) {},
47 | ),
48 | ],
49 | ),
50 | ],
51 | );
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/lib/features/smart_room/widgets/light_intensity_slide_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../core/core.dart';
4 |
5 | class LightIntensitySliderCard extends StatelessWidget {
6 | const LightIntensitySliderCard({
7 | required this.room,
8 | super.key,
9 | });
10 |
11 | final SmartRoom room;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return SHCard(
16 | childrenPadding: const EdgeInsets.all(12),
17 | children: [
18 | _LightSwitcher(room: room),
19 | Row(
20 | children: [
21 | const Icon(SHIcons.lightMin),
22 | Expanded(
23 | child: Slider(
24 | value: .2,
25 | onChanged: (value) {},
26 | ),
27 | ),
28 | const Icon(SHIcons.lightMax),
29 | ],
30 | )
31 | ],
32 | );
33 | }
34 | }
35 |
36 | class _LightSwitcher extends StatelessWidget {
37 | const _LightSwitcher({
38 | required this.room,
39 | });
40 |
41 | final SmartRoom room;
42 |
43 | @override
44 | Widget build(BuildContext context) {
45 | return Row(
46 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
47 | children: [
48 | const Flexible(
49 | child: FittedBox(
50 | fit: BoxFit.scaleDown,
51 | child: Text('Light intensity'),
52 | ),
53 | ),
54 | Flexible(
55 | child: FittedBox(
56 | fit: BoxFit.scaleDown,
57 | child: Text(
58 | '${room.lights.value}%',
59 | style: const TextStyle(fontSize: 20),
60 | ),
61 | ),
62 | ),
63 | SHSwitcher(
64 | value: room.lights.isOn,
65 | onChanged: (value) {},
66 | ),
67 | ],
68 | );
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/lib/features/smart_room/widgets/music_switchers.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 |
4 | import '../../../core/core.dart';
5 |
6 | class MusicSwitchers extends StatelessWidget {
7 | const MusicSwitchers({
8 | required this.room,
9 | super.key,
10 | });
11 |
12 | final SmartRoom room;
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return SHCard(
17 | childrenPadding: const EdgeInsets.all(12),
18 | children: [
19 | Column(
20 | crossAxisAlignment: CrossAxisAlignment.stretch,
21 | children: [
22 | const Row(
23 | children: [
24 | Text('Music'),
25 | Spacer(),
26 | Icon(Icons.open_in_new_rounded),
27 | ],
28 | ),
29 | const SizedBox(height: 8),
30 | SHSwitcher(
31 | value: room.musicInfo.isOn,
32 | icon: const Icon(SHIcons.music),
33 | onChanged: (value) {},
34 | ),
35 | ],
36 | ),
37 | Column(
38 | crossAxisAlignment: CrossAxisAlignment.start,
39 | children: [
40 | Text(
41 | room.musicInfo.currentSong.title,
42 | maxLines: 1,
43 | overflow: TextOverflow.ellipsis,
44 | ),
45 | const SizedBox(height: 4),
46 | Text(
47 | room.musicInfo.currentSong.artist,
48 | style: GoogleFonts.montserrat(
49 | color: SHColors.selectedColor,
50 | fontWeight: FontWeight.w500,
51 | fontSize: 12,
52 | ),
53 | ),
54 | IconTheme(
55 | data: const IconThemeData(size: 20, color: Colors.white),
56 | child: Row(
57 | mainAxisAlignment: MainAxisAlignment.center,
58 | children: [
59 | const Flexible(child: Icon(Icons.fast_rewind)),
60 | const SizedBox(width: 8),
61 | Flexible(
62 | child: room.musicInfo.isOn
63 | ? const Icon(Icons.pause)
64 | : const Icon(Icons.play_arrow),
65 | ),
66 | const SizedBox(width: 8),
67 | const Flexible(child: Icon(Icons.fast_forward)),
68 | ],
69 | ),
70 | ),
71 | ],
72 | ),
73 | ],
74 | );
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/lib/features/smart_room/widgets/room_details_page_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 | import 'package:ui_common/ui_common.dart';
4 |
5 | import '../../../core/shared/domain/entities/smart_room.dart';
6 | import 'air_conditiioner_controls_card.dart';
7 | import 'light_and_time_switcher.dart';
8 | import 'light_intensity_slide_card.dart';
9 | import 'music_switchers.dart';
10 |
11 | class RoomDetailsPageView extends StatelessWidget {
12 | const RoomDetailsPageView({
13 | required this.animation,
14 | required this.room,
15 | super.key,
16 | });
17 |
18 | final Animation animation;
19 | final SmartRoom room;
20 |
21 | Animation get _interval1 => CurvedAnimation(
22 | parent: animation,
23 | curve: const Interval(0.4, 1, curve: Curves.easeIn),
24 | );
25 |
26 | Animation get _interval2 => CurvedAnimation(
27 | parent: animation,
28 | curve: const Interval(0.6, 1, curve: Curves.easeIn),
29 | );
30 |
31 | Animation get _interval3 => CurvedAnimation(
32 | parent: animation,
33 | curve: const Interval(0.8, 1, curve: Curves.easeIn),
34 | );
35 |
36 | @override
37 | Widget build(BuildContext context) {
38 | return PageView(
39 | physics: const BouncingScrollPhysics(),
40 | children: [
41 | Column(
42 | children: [
43 | SlideTransition(
44 | position: Tween(
45 | begin: const Offset(-1, 1),
46 | end: Offset.zero,
47 | ).animate(animation),
48 | child: Align(
49 | alignment: Alignment.centerLeft,
50 | child: TextButton.icon(
51 | onPressed: () => Navigator.pop(context),
52 | style: TextButton.styleFrom(
53 | alignment: Alignment.centerLeft,
54 | padding: const EdgeInsets.fromLTRB(8, 8, 8, 0),
55 | ),
56 | icon: const Icon(Icons.keyboard_arrow_left),
57 | label: const Text('BACK'),
58 | ),
59 | ),
60 | ),
61 | Expanded(
62 | child: DefaultTextStyle(
63 | style: GoogleFonts.montserrat(
64 | fontSize: 14,
65 | fontWeight: FontWeight.w700,
66 | ),
67 | child: ListView(
68 | physics: const BouncingScrollPhysics(),
69 | padding: const EdgeInsets.fromLTRB(20, 12, 20, 20),
70 | children: [
71 | SlideTransition(
72 | position: Tween(
73 | begin: const Offset(0, 2),
74 | end: Offset.zero,
75 | ).animate(_interval1),
76 | child: FadeTransition(
77 | opacity: _interval1,
78 | child: Row(
79 | children: [
80 | Expanded(
81 | child: LightsAndTimerSwitchers(room: room),
82 | ),
83 | width20,
84 | Expanded(child: MusicSwitchers(room: room)),
85 | ],
86 | ),
87 | ),
88 | ),
89 | const SizedBox(height: 20),
90 | SlideTransition(
91 | position: Tween(
92 | begin: const Offset(0, 2),
93 | end: Offset.zero,
94 | ).animate(_interval2),
95 | child: FadeTransition(
96 | opacity: _interval2,
97 | child: LightIntensitySliderCard(room: room),
98 | ),
99 | ),
100 | const SizedBox(height: 20),
101 | SlideTransition(
102 | position: Tween(
103 | begin: const Offset(0, 2),
104 | end: Offset.zero,
105 | ).animate(_interval1),
106 | child: FadeTransition(
107 | opacity: _interval3,
108 | child: AirConditionerControlsCard(room: room),
109 | ),
110 | ),
111 | ],
112 | ),
113 | ),
114 | ),
115 | ],
116 | ),
117 | ],
118 | );
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:smart_home_animation/core/app/app.dart';
3 |
4 | void main() {
5 | runApp(const SmartHomeApp());
6 | }
7 |
--------------------------------------------------------------------------------
/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/linux/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Project-level configuration.
2 | cmake_minimum_required(VERSION 3.10)
3 | project(runner LANGUAGES CXX)
4 |
5 | # The name of the executable created for the application. Change this to change
6 | # the on-disk name of your application.
7 | set(BINARY_NAME "smart_home_animation")
8 | # The unique GTK application identifier for this application. See:
9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID
10 | set(APPLICATION_ID "com.example.smart_home_animation")
11 |
12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
13 | # versions of CMake.
14 | cmake_policy(SET CMP0063 NEW)
15 |
16 | # Load bundled libraries from the lib/ directory relative to the binary.
17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
18 |
19 | # Root filesystem for cross-building.
20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT)
21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
27 | endif()
28 |
29 | # Define build configuration options.
30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
31 | set(CMAKE_BUILD_TYPE "Debug" CACHE
32 | STRING "Flutter build mode" FORCE)
33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
34 | "Debug" "Profile" "Release")
35 | endif()
36 |
37 | # Compilation settings that should be applied to most targets.
38 | #
39 | # Be cautious about adding new options here, as plugins use this function by
40 | # default. In most cases, you should add new options to specific targets instead
41 | # of modifying this function.
42 | function(APPLY_STANDARD_SETTINGS TARGET)
43 | target_compile_features(${TARGET} PUBLIC cxx_std_14)
44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror)
45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>")
46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>")
47 | endfunction()
48 |
49 | # Flutter library and tool build rules.
50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
51 | add_subdirectory(${FLUTTER_MANAGED_DIR})
52 |
53 | # System-level dependencies.
54 | find_package(PkgConfig REQUIRED)
55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
56 |
57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
58 |
59 | # Define the application target. To change its name, change BINARY_NAME above,
60 | # not the value here, or `flutter run` will no longer work.
61 | #
62 | # Any new source files that you add to the application should be added here.
63 | add_executable(${BINARY_NAME}
64 | "main.cc"
65 | "my_application.cc"
66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
67 | )
68 |
69 | # Apply the standard set of build settings. This can be removed for applications
70 | # that need different build settings.
71 | apply_standard_settings(${BINARY_NAME})
72 |
73 | # Add dependency libraries. Add any application-specific dependencies here.
74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter)
75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
76 |
77 | # Run the Flutter tool portions of the build. This must not be removed.
78 | add_dependencies(${BINARY_NAME} flutter_assemble)
79 |
80 | # Only the install-generated bundle's copy of the executable will launch
81 | # correctly, since the resources must in the right relative locations. To avoid
82 | # people trying to run the unbundled copy, put it in a subdirectory instead of
83 | # the default top-level location.
84 | set_target_properties(${BINARY_NAME}
85 | PROPERTIES
86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
87 | )
88 |
89 |
90 | # Generated plugin build rules, which manage building the plugins and adding
91 | # them to the application.
92 | include(flutter/generated_plugins.cmake)
93 |
94 |
95 | # === Installation ===
96 | # By default, "installing" just makes a relocatable bundle in the build
97 | # directory.
98 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
99 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
100 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
101 | endif()
102 |
103 | # Start with a clean build bundle directory every time.
104 | install(CODE "
105 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
106 | " COMPONENT Runtime)
107 |
108 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
109 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
110 |
111 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
112 | COMPONENT Runtime)
113 |
114 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
115 | COMPONENT Runtime)
116 |
117 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
118 | COMPONENT Runtime)
119 |
120 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
121 | install(FILES "${bundled_library}"
122 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
123 | COMPONENT Runtime)
124 | endforeach(bundled_library)
125 |
126 | # Fully re-copy the assets directory on each build to avoid having stale files
127 | # from a previous install.
128 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
129 | install(CODE "
130 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
131 | " COMPONENT Runtime)
132 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
133 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
134 |
135 | # Install the AOT library on non-Debug builds only.
136 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
137 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
138 | COMPONENT Runtime)
139 | endif()
140 |
--------------------------------------------------------------------------------
/linux/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This file controls Flutter-level build steps. It should not be edited.
2 | cmake_minimum_required(VERSION 3.10)
3 |
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | # Configuration provided via flutter tool.
7 | include(${EPHEMERAL_DIR}/generated_config.cmake)
8 |
9 | # TODO: Move the rest of this into files in ephemeral. See
10 | # https://github.com/flutter/flutter/issues/57146.
11 |
12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...),
13 | # which isn't available in 3.10.
14 | function(list_prepend LIST_NAME PREFIX)
15 | set(NEW_LIST "")
16 | foreach(element ${${LIST_NAME}})
17 | list(APPEND NEW_LIST "${PREFIX}${element}")
18 | endforeach(element)
19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
20 | endfunction()
21 |
22 | # === Flutter Library ===
23 | # System-level dependencies.
24 | find_package(PkgConfig REQUIRED)
25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
28 |
29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
30 |
31 | # Published to parent scope for install step.
32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
36 |
37 | list(APPEND FLUTTER_LIBRARY_HEADERS
38 | "fl_basic_message_channel.h"
39 | "fl_binary_codec.h"
40 | "fl_binary_messenger.h"
41 | "fl_dart_project.h"
42 | "fl_engine.h"
43 | "fl_json_message_codec.h"
44 | "fl_json_method_codec.h"
45 | "fl_message_codec.h"
46 | "fl_method_call.h"
47 | "fl_method_channel.h"
48 | "fl_method_codec.h"
49 | "fl_method_response.h"
50 | "fl_plugin_registrar.h"
51 | "fl_plugin_registry.h"
52 | "fl_standard_message_codec.h"
53 | "fl_standard_method_codec.h"
54 | "fl_string_codec.h"
55 | "fl_value.h"
56 | "fl_view.h"
57 | "flutter_linux.h"
58 | )
59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
60 | add_library(flutter INTERFACE)
61 | target_include_directories(flutter INTERFACE
62 | "${EPHEMERAL_DIR}"
63 | )
64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
65 | target_link_libraries(flutter INTERFACE
66 | PkgConfig::GTK
67 | PkgConfig::GLIB
68 | PkgConfig::GIO
69 | )
70 | add_dependencies(flutter flutter_assemble)
71 |
72 | # === Flutter tool backend ===
73 | # _phony_ is a non-existent file to force this command to run every time,
74 | # since currently there's no way to get a full input/output list from the
75 | # flutter tool.
76 | add_custom_command(
77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_
79 | COMMAND ${CMAKE_COMMAND} -E env
80 | ${FLUTTER_TOOL_ENVIRONMENT}
81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
83 | VERBATIM
84 | )
85 | add_custom_target(flutter_assemble DEPENDS
86 | "${FLUTTER_LIBRARY}"
87 | ${FLUTTER_LIBRARY_HEADERS}
88 | )
89 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 |
10 | void fl_register_plugins(FlPluginRegistry* registry) {
11 | }
12 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void fl_register_plugins(FlPluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
9 | )
10 |
11 | set(PLUGIN_BUNDLED_LIBRARIES)
12 |
13 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
18 | endforeach(plugin)
19 |
20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
23 | endforeach(ffi_plugin)
24 |
--------------------------------------------------------------------------------
/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/linux/my_application.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | #include
4 | #ifdef GDK_WINDOWING_X11
5 | #include
6 | #endif
7 |
8 | #include "flutter/generated_plugin_registrant.h"
9 |
10 | struct _MyApplication {
11 | GtkApplication parent_instance;
12 | char** dart_entrypoint_arguments;
13 | };
14 |
15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
16 |
17 | // Implements GApplication::activate.
18 | static void my_application_activate(GApplication* application) {
19 | MyApplication* self = MY_APPLICATION(application);
20 | GtkWindow* window =
21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
22 |
23 | // Use a header bar when running in GNOME as this is the common style used
24 | // by applications and is the setup most users will be using (e.g. Ubuntu
25 | // desktop).
26 | // If running on X and not using GNOME then just use a traditional title bar
27 | // in case the window manager does more exotic layout, e.g. tiling.
28 | // If running on Wayland assume the header bar will work (may need changing
29 | // if future cases occur).
30 | gboolean use_header_bar = TRUE;
31 | #ifdef GDK_WINDOWING_X11
32 | GdkScreen* screen = gtk_window_get_screen(window);
33 | if (GDK_IS_X11_SCREEN(screen)) {
34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
36 | use_header_bar = FALSE;
37 | }
38 | }
39 | #endif
40 | if (use_header_bar) {
41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
42 | gtk_widget_show(GTK_WIDGET(header_bar));
43 | gtk_header_bar_set_title(header_bar, "smart_home_animation");
44 | gtk_header_bar_set_show_close_button(header_bar, TRUE);
45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
46 | } else {
47 | gtk_window_set_title(window, "smart_home_animation");
48 | }
49 |
50 | gtk_window_set_default_size(window, 1280, 720);
51 | gtk_widget_show(GTK_WIDGET(window));
52 |
53 | g_autoptr(FlDartProject) project = fl_dart_project_new();
54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
55 |
56 | FlView* view = fl_view_new(project);
57 | gtk_widget_show(GTK_WIDGET(view));
58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
59 |
60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view));
61 |
62 | gtk_widget_grab_focus(GTK_WIDGET(view));
63 | }
64 |
65 | // Implements GApplication::local_command_line.
66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
67 | MyApplication* self = MY_APPLICATION(application);
68 | // Strip out the first argument as it is the binary name.
69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
70 |
71 | g_autoptr(GError) error = nullptr;
72 | if (!g_application_register(application, nullptr, &error)) {
73 | g_warning("Failed to register: %s", error->message);
74 | *exit_status = 1;
75 | return TRUE;
76 | }
77 |
78 | g_application_activate(application);
79 | *exit_status = 0;
80 |
81 | return TRUE;
82 | }
83 |
84 | // Implements GObject::dispose.
85 | static void my_application_dispose(GObject* object) {
86 | MyApplication* self = MY_APPLICATION(object);
87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
89 | }
90 |
91 | static void my_application_class_init(MyApplicationClass* klass) {
92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate;
93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
95 | }
96 |
97 | static void my_application_init(MyApplication* self) {}
98 |
99 | MyApplication* my_application_new() {
100 | return MY_APPLICATION(g_object_new(my_application_get_type(),
101 | "application-id", APPLICATION_ID,
102 | "flags", G_APPLICATION_NON_UNIQUE,
103 | nullptr));
104 | }
105 |
--------------------------------------------------------------------------------
/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/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 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | cached_network_image:
21 | dependency: "direct main"
22 | description:
23 | name: cached_network_image
24 | sha256: f98972704692ba679db144261172a8e20feb145636c617af0eb4022132a6797f
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "3.3.0"
28 | cached_network_image_platform_interface:
29 | dependency: transitive
30 | description:
31 | name: cached_network_image_platform_interface
32 | sha256: "56aa42a7a01e3c9db8456d9f3f999931f1e05535b5a424271e9a38cabf066613"
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "3.0.0"
36 | cached_network_image_web:
37 | dependency: transitive
38 | description:
39 | name: cached_network_image_web
40 | sha256: "759b9a9f8f6ccbb66c185df805fac107f05730b1dab9c64626d1008cca532257"
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.1.0"
44 | characters:
45 | dependency: transitive
46 | description:
47 | name: characters
48 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.3.0"
52 | clock:
53 | dependency: transitive
54 | description:
55 | name: clock
56 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
57 | url: "https://pub.dev"
58 | source: hosted
59 | version: "1.1.1"
60 | collection:
61 | dependency: transitive
62 | description:
63 | name: collection
64 | sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
65 | url: "https://pub.dev"
66 | source: hosted
67 | version: "1.17.2"
68 | crypto:
69 | dependency: transitive
70 | description:
71 | name: crypto
72 | sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
73 | url: "https://pub.dev"
74 | source: hosted
75 | version: "3.0.3"
76 | cupertino_icons:
77 | dependency: "direct main"
78 | description:
79 | name: cupertino_icons
80 | sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
81 | url: "https://pub.dev"
82 | source: hosted
83 | version: "1.0.6"
84 | fake_async:
85 | dependency: transitive
86 | description:
87 | name: fake_async
88 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
89 | url: "https://pub.dev"
90 | source: hosted
91 | version: "1.3.1"
92 | ffi:
93 | dependency: transitive
94 | description:
95 | name: ffi
96 | sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
97 | url: "https://pub.dev"
98 | source: hosted
99 | version: "2.1.0"
100 | file:
101 | dependency: transitive
102 | description:
103 | name: file
104 | sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
105 | url: "https://pub.dev"
106 | source: hosted
107 | version: "7.0.0"
108 | flutter:
109 | dependency: "direct main"
110 | description: flutter
111 | source: sdk
112 | version: "0.0.0"
113 | flutter_cache_manager:
114 | dependency: transitive
115 | description:
116 | name: flutter_cache_manager
117 | sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba"
118 | url: "https://pub.dev"
119 | source: hosted
120 | version: "3.3.1"
121 | flutter_lints:
122 | dependency: "direct dev"
123 | description:
124 | name: flutter_lints
125 | sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
126 | url: "https://pub.dev"
127 | source: hosted
128 | version: "2.0.3"
129 | flutter_screenutil:
130 | dependency: transitive
131 | description:
132 | name: flutter_screenutil
133 | sha256: "8cf100b8e4973dc570b6415a2090b0bfaa8756ad333db46939efc3e774ee100d"
134 | url: "https://pub.dev"
135 | source: hosted
136 | version: "5.9.0"
137 | flutter_test:
138 | dependency: "direct dev"
139 | description: flutter
140 | source: sdk
141 | version: "0.0.0"
142 | fluttericon:
143 | dependency: "direct main"
144 | description:
145 | name: fluttericon
146 | sha256: "252fa8043826e93d972a602497a260cb3d62b5aea6d045793e4381590f2c1e99"
147 | url: "https://pub.dev"
148 | source: hosted
149 | version: "2.0.0"
150 | google_fonts:
151 | dependency: "direct main"
152 | description:
153 | name: google_fonts
154 | sha256: e20ff62b158b96f392bfc8afe29dee1503c94fbea2cbe8186fd59b756b8ae982
155 | url: "https://pub.dev"
156 | source: hosted
157 | version: "5.1.0"
158 | http:
159 | dependency: transitive
160 | description:
161 | name: http
162 | sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525"
163 | url: "https://pub.dev"
164 | source: hosted
165 | version: "1.1.0"
166 | http_parser:
167 | dependency: transitive
168 | description:
169 | name: http_parser
170 | sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
171 | url: "https://pub.dev"
172 | source: hosted
173 | version: "4.0.2"
174 | lints:
175 | dependency: transitive
176 | description:
177 | name: lints
178 | sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
179 | url: "https://pub.dev"
180 | source: hosted
181 | version: "2.1.1"
182 | matcher:
183 | dependency: transitive
184 | description:
185 | name: matcher
186 | sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
187 | url: "https://pub.dev"
188 | source: hosted
189 | version: "0.12.16"
190 | material_color_utilities:
191 | dependency: transitive
192 | description:
193 | name: material_color_utilities
194 | sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
195 | url: "https://pub.dev"
196 | source: hosted
197 | version: "0.5.0"
198 | meta:
199 | dependency: transitive
200 | description:
201 | name: meta
202 | sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
203 | url: "https://pub.dev"
204 | source: hosted
205 | version: "1.9.1"
206 | octo_image:
207 | dependency: transitive
208 | description:
209 | name: octo_image
210 | sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d"
211 | url: "https://pub.dev"
212 | source: hosted
213 | version: "2.0.0"
214 | path:
215 | dependency: transitive
216 | description:
217 | name: path
218 | sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
219 | url: "https://pub.dev"
220 | source: hosted
221 | version: "1.8.3"
222 | path_provider:
223 | dependency: transitive
224 | description:
225 | name: path_provider
226 | sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa
227 | url: "https://pub.dev"
228 | source: hosted
229 | version: "2.1.1"
230 | path_provider_android:
231 | dependency: transitive
232 | description:
233 | name: path_provider_android
234 | sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1"
235 | url: "https://pub.dev"
236 | source: hosted
237 | version: "2.2.0"
238 | path_provider_foundation:
239 | dependency: transitive
240 | description:
241 | name: path_provider_foundation
242 | sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d"
243 | url: "https://pub.dev"
244 | source: hosted
245 | version: "2.3.1"
246 | path_provider_linux:
247 | dependency: transitive
248 | description:
249 | name: path_provider_linux
250 | sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
251 | url: "https://pub.dev"
252 | source: hosted
253 | version: "2.2.1"
254 | path_provider_platform_interface:
255 | dependency: transitive
256 | description:
257 | name: path_provider_platform_interface
258 | sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c"
259 | url: "https://pub.dev"
260 | source: hosted
261 | version: "2.1.1"
262 | path_provider_windows:
263 | dependency: transitive
264 | description:
265 | name: path_provider_windows
266 | sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
267 | url: "https://pub.dev"
268 | source: hosted
269 | version: "2.2.1"
270 | platform:
271 | dependency: transitive
272 | description:
273 | name: platform
274 | sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
275 | url: "https://pub.dev"
276 | source: hosted
277 | version: "3.1.2"
278 | plugin_platform_interface:
279 | dependency: transitive
280 | description:
281 | name: plugin_platform_interface
282 | sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
283 | url: "https://pub.dev"
284 | source: hosted
285 | version: "2.1.6"
286 | rxdart:
287 | dependency: transitive
288 | description:
289 | name: rxdart
290 | sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
291 | url: "https://pub.dev"
292 | source: hosted
293 | version: "0.27.7"
294 | sky_engine:
295 | dependency: transitive
296 | description: flutter
297 | source: sdk
298 | version: "0.0.99"
299 | source_span:
300 | dependency: transitive
301 | description:
302 | name: source_span
303 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
304 | url: "https://pub.dev"
305 | source: hosted
306 | version: "1.10.0"
307 | sprintf:
308 | dependency: transitive
309 | description:
310 | name: sprintf
311 | sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
312 | url: "https://pub.dev"
313 | source: hosted
314 | version: "7.0.0"
315 | sqflite:
316 | dependency: transitive
317 | description:
318 | name: sqflite
319 | sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a"
320 | url: "https://pub.dev"
321 | source: hosted
322 | version: "2.3.0"
323 | sqflite_common:
324 | dependency: transitive
325 | description:
326 | name: sqflite_common
327 | sha256: "1b92f368f44b0dee2425bb861cfa17b6f6cf3961f762ff6f941d20b33355660a"
328 | url: "https://pub.dev"
329 | source: hosted
330 | version: "2.5.0"
331 | stack_trace:
332 | dependency: transitive
333 | description:
334 | name: stack_trace
335 | sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
336 | url: "https://pub.dev"
337 | source: hosted
338 | version: "1.11.0"
339 | stream_channel:
340 | dependency: transitive
341 | description:
342 | name: stream_channel
343 | sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
344 | url: "https://pub.dev"
345 | source: hosted
346 | version: "2.1.1"
347 | string_scanner:
348 | dependency: transitive
349 | description:
350 | name: string_scanner
351 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
352 | url: "https://pub.dev"
353 | source: hosted
354 | version: "1.2.0"
355 | synchronized:
356 | dependency: transitive
357 | description:
358 | name: synchronized
359 | sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60"
360 | url: "https://pub.dev"
361 | source: hosted
362 | version: "3.1.0"
363 | term_glyph:
364 | dependency: transitive
365 | description:
366 | name: term_glyph
367 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
368 | url: "https://pub.dev"
369 | source: hosted
370 | version: "1.2.1"
371 | test_api:
372 | dependency: transitive
373 | description:
374 | name: test_api
375 | sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
376 | url: "https://pub.dev"
377 | source: hosted
378 | version: "0.6.0"
379 | typed_data:
380 | dependency: transitive
381 | description:
382 | name: typed_data
383 | sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
384 | url: "https://pub.dev"
385 | source: hosted
386 | version: "1.3.2"
387 | ui_common:
388 | dependency: "direct main"
389 | description:
390 | path: "."
391 | ref: HEAD
392 | resolved-ref: "9b6c28121f84dd313bd2f523ff1f84b6a7cd2483"
393 | url: "https://github.com/brocodev/ui_common.git"
394 | source: git
395 | version: "1.0.0+1"
396 | uuid:
397 | dependency: transitive
398 | description:
399 | name: uuid
400 | sha256: b715b8d3858b6fa9f68f87d20d98830283628014750c2b09b6f516c1da4af2a7
401 | url: "https://pub.dev"
402 | source: hosted
403 | version: "4.1.0"
404 | vector_math:
405 | dependency: transitive
406 | description:
407 | name: vector_math
408 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
409 | url: "https://pub.dev"
410 | source: hosted
411 | version: "2.1.4"
412 | web:
413 | dependency: transitive
414 | description:
415 | name: web
416 | sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
417 | url: "https://pub.dev"
418 | source: hosted
419 | version: "0.1.4-beta"
420 | win32:
421 | dependency: transitive
422 | description:
423 | name: win32
424 | sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3"
425 | url: "https://pub.dev"
426 | source: hosted
427 | version: "5.0.9"
428 | xdg_directories:
429 | dependency: transitive
430 | description:
431 | name: xdg_directories
432 | sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2"
433 | url: "https://pub.dev"
434 | source: hosted
435 | version: "1.0.3"
436 | sdks:
437 | dart: ">=3.1.0 <4.0.0"
438 | flutter: ">=3.10.0"
439 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: smart_home_animation
2 | description: A new Flutter project.
3 |
4 | publish_to: "none"
5 |
6 | version: 1.0.0+1
7 |
8 | environment:
9 | sdk: ">=3.1.0 <4.0.0"
10 |
11 | dependencies:
12 | flutter:
13 | sdk: flutter
14 |
15 | cupertino_icons: ^1.0.2
16 | cached_network_image: ^3.2.3
17 | fluttericon: ^2.0.0
18 | google_fonts: ^5.1.0
19 | ui_common:
20 | git: https://github.com/brocodev/ui_common.git
21 |
22 | dev_dependencies:
23 | flutter_test:
24 | sdk: flutter
25 |
26 | flutter_lints: ^2.0.0
27 |
28 | flutter:
29 | uses-material-design: true
30 | assets:
31 | - assets/images/
32 |
--------------------------------------------------------------------------------
/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 in the flutter_test package. 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 | import 'package:smart_home_animation/core/app/app.dart';
11 |
12 | void main() {
13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
14 | // Build our app and trigger a frame.
15 | await tester.pumpWidget(const SmartHomeApp());
16 |
17 | // Verify that our counter starts at 0.
18 | expect(find.text('0'), findsOneWidget);
19 | expect(find.text('1'), findsNothing);
20 |
21 | // Tap the '+' icon and trigger a frame.
22 | await tester.tap(find.byIcon(Icons.add));
23 | await tester.pump();
24 |
25 | // Verify that our counter has incremented.
26 | expect(find.text('0'), findsNothing);
27 | expect(find.text('1'), findsOneWidget);
28 | });
29 | }
30 |
--------------------------------------------------------------------------------
/ui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abuanwar072/Smart-Home-Animated-App-using-Flutter/7b53829942638617e3e3ab42847fae54526e273b/ui.png
--------------------------------------------------------------------------------