├── .gitignore
├── .gitmodules
├── .metadata
├── README.md
├── android
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── fluttertodo
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── 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
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
└── images
│ └── profile_image.jpg
├── ios
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── 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
│ └── main.m
├── lib
├── category_card.dart
├── category_icon.dart
├── category_info.dart
├── category_progress.dart
├── circular_image.dart
├── create
│ └── create_screen.dart
├── data_provider.dart
├── detail
│ ├── detail_screen.dart
│ └── todo_item.dart
├── detail_reveal.dart
├── list
│ └── list.dart
├── main.dart
├── model.dart
└── projects_screen.dart
├── pubspec.yaml
└── test
└── store_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.lock
4 | *.log
5 | *.pyc
6 | *.swp
7 | .DS_Store
8 | .atom/
9 | .buildlog/
10 | .history
11 | .svn/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # Visual Studio Code related
20 | .vscode/
21 |
22 | # Flutter/Dart/Pub related
23 | **/doc/api/
24 | .dart_tool/
25 | .flutter-plugins
26 | .packages
27 | .pub-cache/
28 | .pub/
29 | build/
30 |
31 | # Android related
32 | **/android/**/gradle-wrapper.jar
33 | **/android/.gradle
34 | **/android/captures/
35 | **/android/gradlew
36 | **/android/gradlew.bat
37 | **/android/local.properties
38 | **/android/**/GeneratedPluginRegistrant.java
39 |
40 | # iOS/XCode related
41 | **/ios/**/*.mode1v3
42 | **/ios/**/*.mode2v3
43 | **/ios/**/*.moved-aside
44 | **/ios/**/*.pbxuser
45 | **/ios/**/*.perspectivev3
46 | **/ios/**/*sync/
47 | **/ios/**/.sconsign.dblite
48 | **/ios/**/.tags*
49 | **/ios/**/.vagrant/
50 | **/ios/**/DerivedData/
51 | **/ios/**/Icon?
52 | **/ios/**/Pods/
53 | **/ios/**/.symlinks/
54 | **/ios/**/profile
55 | **/ios/**/xcuserdata
56 | **/ios/.generated/
57 | **/ios/Flutter/App.framework
58 | **/ios/Flutter/Flutter.framework
59 | **/ios/Flutter/Generated.xcconfig
60 | **/ios/Flutter/app.flx
61 | **/ios/Flutter/app.zip
62 | **/ios/Flutter/flutter_assets/
63 | **/ios/ServiceDefinitions.json
64 | **/ios/Runner/GeneratedPluginRegistrant.*
65 |
66 | # Exceptions to above rules.
67 | !**/ios/**/default.mode1v3
68 | !**/ios/**/default.mode2v3
69 | !**/ios/**/default.pbxuser
70 | !**/ios/**/default.perspectivev3
71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
72 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/.gitmodules
--------------------------------------------------------------------------------
/.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: f37c235c32fc15babe6dc7b7bc2ee4387e5ecf92
8 | channel: beta
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # flutter_todo
2 |
3 | A showcase/portfolio todo app.
4 |
5 | Inspired by https://dribbble.com/shots/3812962-iPhone-X-Todo-Concept
6 |
7 | ## The result
8 |
9 | 
10 |
11 | The app uses my own library [flutter_snaplist](https://github.com/ariedov/flutter_snaplist), for switching todo categories.
12 |
13 | [flutter_redux](https://pub.dartlang.org/packages/flutter_redux) is used for sharing state between different screens and widgets of the app.
14 |
15 | _Feel free to fire issues and pull requests if you find something wrong or just want to experiment!_
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.example.fluttertodo"
37 | minSdkVersion 16
38 | targetSdkVersion 28
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | testImplementation 'junit:junit:4.12'
59 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
61 | }
62 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
15 |
19 |
26 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/example/fluttertodo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.fluttertodo;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.2.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/assets/images/profile_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/assets/images/profile_image.jpg
--------------------------------------------------------------------------------
/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 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
18 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
19 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
20 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
21 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
22 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXCopyFilesBuildPhase section */
26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
27 | isa = PBXCopyFilesBuildPhase;
28 | buildActionMask = 2147483647;
29 | dstPath = "";
30 | dstSubfolderSpec = 10;
31 | files = (
32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
34 | );
35 | name = "Embed Frameworks";
36 | runOnlyForDeploymentPostprocessing = 0;
37 | };
38 | /* End PBXCopyFilesBuildPhase section */
39 |
40 | /* Begin PBXFileReference section */
41 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
42 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
43 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
46 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
47 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
48 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
49 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
50 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
51 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
52 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
53 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
66 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
67 | );
68 | runOnlyForDeploymentPostprocessing = 0;
69 | };
70 | /* End PBXFrameworksBuildPhase section */
71 |
72 | /* Begin PBXGroup section */
73 | 9740EEB11CF90186004384FC /* Flutter */ = {
74 | isa = PBXGroup;
75 | children = (
76 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
77 | 3B80C3931E831B6300D905FE /* App.framework */,
78 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
79 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
80 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
81 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
82 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
83 | );
84 | name = Flutter;
85 | sourceTree = "";
86 | };
87 | 97C146E51CF9000F007C117D = {
88 | isa = PBXGroup;
89 | children = (
90 | 9740EEB11CF90186004384FC /* Flutter */,
91 | 97C146F01CF9000F007C117D /* Runner */,
92 | 97C146EF1CF9000F007C117D /* Products */,
93 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
94 | );
95 | sourceTree = "";
96 | };
97 | 97C146EF1CF9000F007C117D /* Products */ = {
98 | isa = PBXGroup;
99 | children = (
100 | 97C146EE1CF9000F007C117D /* Runner.app */,
101 | );
102 | name = Products;
103 | sourceTree = "";
104 | };
105 | 97C146F01CF9000F007C117D /* Runner */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
109 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
110 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
111 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
112 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
113 | 97C147021CF9000F007C117D /* Info.plist */,
114 | 97C146F11CF9000F007C117D /* Supporting Files */,
115 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
116 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
117 | );
118 | path = Runner;
119 | sourceTree = "";
120 | };
121 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 97C146F21CF9000F007C117D /* main.m */,
125 | );
126 | name = "Supporting Files";
127 | sourceTree = "";
128 | };
129 | /* End PBXGroup section */
130 |
131 | /* Begin PBXNativeTarget section */
132 | 97C146ED1CF9000F007C117D /* Runner */ = {
133 | isa = PBXNativeTarget;
134 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
135 | buildPhases = (
136 | 9740EEB61CF901F6004384FC /* Run Script */,
137 | 97C146EA1CF9000F007C117D /* Sources */,
138 | 97C146EB1CF9000F007C117D /* Frameworks */,
139 | 97C146EC1CF9000F007C117D /* Resources */,
140 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142 | );
143 | buildRules = (
144 | );
145 | dependencies = (
146 | );
147 | name = Runner;
148 | productName = Runner;
149 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
150 | productType = "com.apple.product-type.application";
151 | };
152 | /* End PBXNativeTarget section */
153 |
154 | /* Begin PBXProject section */
155 | 97C146E61CF9000F007C117D /* Project object */ = {
156 | isa = PBXProject;
157 | attributes = {
158 | LastUpgradeCheck = 0910;
159 | ORGANIZATIONNAME = "The Chromium Authors";
160 | TargetAttributes = {
161 | 97C146ED1CF9000F007C117D = {
162 | CreatedOnToolsVersion = 7.3.1;
163 | };
164 | };
165 | };
166 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
167 | compatibilityVersion = "Xcode 3.2";
168 | developmentRegion = English;
169 | hasScannedForEncodings = 0;
170 | knownRegions = (
171 | en,
172 | Base,
173 | );
174 | mainGroup = 97C146E51CF9000F007C117D;
175 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
176 | projectDirPath = "";
177 | projectRoot = "";
178 | targets = (
179 | 97C146ED1CF9000F007C117D /* Runner */,
180 | );
181 | };
182 | /* End PBXProject section */
183 |
184 | /* Begin PBXResourcesBuildPhase section */
185 | 97C146EC1CF9000F007C117D /* Resources */ = {
186 | isa = PBXResourcesBuildPhase;
187 | buildActionMask = 2147483647;
188 | files = (
189 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
190 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
191 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
192 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
193 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | };
198 | /* End PBXResourcesBuildPhase section */
199 |
200 | /* Begin PBXShellScriptBuildPhase section */
201 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
202 | isa = PBXShellScriptBuildPhase;
203 | buildActionMask = 2147483647;
204 | files = (
205 | );
206 | inputPaths = (
207 | );
208 | name = "Thin Binary";
209 | outputPaths = (
210 | );
211 | runOnlyForDeploymentPostprocessing = 0;
212 | shellPath = /bin/sh;
213 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
214 | };
215 | 9740EEB61CF901F6004384FC /* Run Script */ = {
216 | isa = PBXShellScriptBuildPhase;
217 | buildActionMask = 2147483647;
218 | files = (
219 | );
220 | inputPaths = (
221 | );
222 | name = "Run Script";
223 | outputPaths = (
224 | );
225 | runOnlyForDeploymentPostprocessing = 0;
226 | shellPath = /bin/sh;
227 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
228 | };
229 | /* End PBXShellScriptBuildPhase section */
230 |
231 | /* Begin PBXSourcesBuildPhase section */
232 | 97C146EA1CF9000F007C117D /* Sources */ = {
233 | isa = PBXSourcesBuildPhase;
234 | buildActionMask = 2147483647;
235 | files = (
236 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
237 | 97C146F31CF9000F007C117D /* main.m in Sources */,
238 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
239 | );
240 | runOnlyForDeploymentPostprocessing = 0;
241 | };
242 | /* End PBXSourcesBuildPhase section */
243 |
244 | /* Begin PBXVariantGroup section */
245 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
246 | isa = PBXVariantGroup;
247 | children = (
248 | 97C146FB1CF9000F007C117D /* Base */,
249 | );
250 | name = Main.storyboard;
251 | sourceTree = "";
252 | };
253 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
254 | isa = PBXVariantGroup;
255 | children = (
256 | 97C147001CF9000F007C117D /* Base */,
257 | );
258 | name = LaunchScreen.storyboard;
259 | sourceTree = "";
260 | };
261 | /* End PBXVariantGroup section */
262 |
263 | /* Begin XCBuildConfiguration section */
264 | 97C147031CF9000F007C117D /* Debug */ = {
265 | isa = XCBuildConfiguration;
266 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
267 | buildSettings = {
268 | ALWAYS_SEARCH_USER_PATHS = NO;
269 | CLANG_ANALYZER_NONNULL = YES;
270 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
271 | CLANG_CXX_LIBRARY = "libc++";
272 | CLANG_ENABLE_MODULES = YES;
273 | CLANG_ENABLE_OBJC_ARC = YES;
274 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
275 | CLANG_WARN_BOOL_CONVERSION = YES;
276 | CLANG_WARN_COMMA = YES;
277 | CLANG_WARN_CONSTANT_CONVERSION = YES;
278 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
279 | CLANG_WARN_EMPTY_BODY = YES;
280 | CLANG_WARN_ENUM_CONVERSION = YES;
281 | CLANG_WARN_INFINITE_RECURSION = YES;
282 | CLANG_WARN_INT_CONVERSION = YES;
283 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
284 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
285 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
286 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
287 | CLANG_WARN_STRICT_PROTOTYPES = YES;
288 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
289 | CLANG_WARN_UNREACHABLE_CODE = YES;
290 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
291 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
292 | COPY_PHASE_STRIP = NO;
293 | DEBUG_INFORMATION_FORMAT = dwarf;
294 | ENABLE_STRICT_OBJC_MSGSEND = YES;
295 | ENABLE_TESTABILITY = YES;
296 | GCC_C_LANGUAGE_STANDARD = gnu99;
297 | GCC_DYNAMIC_NO_PIC = NO;
298 | GCC_NO_COMMON_BLOCKS = YES;
299 | GCC_OPTIMIZATION_LEVEL = 0;
300 | GCC_PREPROCESSOR_DEFINITIONS = (
301 | "DEBUG=1",
302 | "$(inherited)",
303 | );
304 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
305 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
306 | GCC_WARN_UNDECLARED_SELECTOR = YES;
307 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
308 | GCC_WARN_UNUSED_FUNCTION = YES;
309 | GCC_WARN_UNUSED_VARIABLE = YES;
310 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
311 | MTL_ENABLE_DEBUG_INFO = YES;
312 | ONLY_ACTIVE_ARCH = YES;
313 | SDKROOT = iphoneos;
314 | TARGETED_DEVICE_FAMILY = "1,2";
315 | };
316 | name = Debug;
317 | };
318 | 97C147041CF9000F007C117D /* Release */ = {
319 | isa = XCBuildConfiguration;
320 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
321 | buildSettings = {
322 | ALWAYS_SEARCH_USER_PATHS = NO;
323 | CLANG_ANALYZER_NONNULL = YES;
324 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
325 | CLANG_CXX_LIBRARY = "libc++";
326 | CLANG_ENABLE_MODULES = YES;
327 | CLANG_ENABLE_OBJC_ARC = YES;
328 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
329 | CLANG_WARN_BOOL_CONVERSION = YES;
330 | CLANG_WARN_COMMA = YES;
331 | CLANG_WARN_CONSTANT_CONVERSION = YES;
332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
333 | CLANG_WARN_EMPTY_BODY = YES;
334 | CLANG_WARN_ENUM_CONVERSION = YES;
335 | CLANG_WARN_INFINITE_RECURSION = YES;
336 | CLANG_WARN_INT_CONVERSION = YES;
337 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
338 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
339 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
340 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
341 | CLANG_WARN_STRICT_PROTOTYPES = YES;
342 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
343 | CLANG_WARN_UNREACHABLE_CODE = YES;
344 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
345 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
346 | COPY_PHASE_STRIP = NO;
347 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
348 | ENABLE_NS_ASSERTIONS = NO;
349 | ENABLE_STRICT_OBJC_MSGSEND = YES;
350 | GCC_C_LANGUAGE_STANDARD = gnu99;
351 | GCC_NO_COMMON_BLOCKS = YES;
352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
354 | GCC_WARN_UNDECLARED_SELECTOR = YES;
355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
356 | GCC_WARN_UNUSED_FUNCTION = YES;
357 | GCC_WARN_UNUSED_VARIABLE = YES;
358 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
359 | MTL_ENABLE_DEBUG_INFO = NO;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | VALIDATE_PRODUCT = YES;
363 | };
364 | name = Release;
365 | };
366 | 97C147061CF9000F007C117D /* Debug */ = {
367 | isa = XCBuildConfiguration;
368 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
369 | buildSettings = {
370 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
371 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
372 | ENABLE_BITCODE = NO;
373 | FRAMEWORK_SEARCH_PATHS = (
374 | "$(inherited)",
375 | "$(PROJECT_DIR)/Flutter",
376 | );
377 | INFOPLIST_FILE = Runner/Info.plist;
378 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
379 | LIBRARY_SEARCH_PATHS = (
380 | "$(inherited)",
381 | "$(PROJECT_DIR)/Flutter",
382 | );
383 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTodo;
384 | PRODUCT_NAME = "$(TARGET_NAME)";
385 | VERSIONING_SYSTEM = "apple-generic";
386 | };
387 | name = Debug;
388 | };
389 | 97C147071CF9000F007C117D /* Release */ = {
390 | isa = XCBuildConfiguration;
391 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
392 | buildSettings = {
393 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
394 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
395 | ENABLE_BITCODE = NO;
396 | FRAMEWORK_SEARCH_PATHS = (
397 | "$(inherited)",
398 | "$(PROJECT_DIR)/Flutter",
399 | );
400 | INFOPLIST_FILE = Runner/Info.plist;
401 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
402 | LIBRARY_SEARCH_PATHS = (
403 | "$(inherited)",
404 | "$(PROJECT_DIR)/Flutter",
405 | );
406 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTodo;
407 | PRODUCT_NAME = "$(TARGET_NAME)";
408 | VERSIONING_SYSTEM = "apple-generic";
409 | };
410 | name = Release;
411 | };
412 | /* End XCBuildConfiguration section */
413 |
414 | /* Begin XCConfigurationList section */
415 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
416 | isa = XCConfigurationList;
417 | buildConfigurations = (
418 | 97C147031CF9000F007C117D /* Debug */,
419 | 97C147041CF9000F007C117D /* Release */,
420 | );
421 | defaultConfigurationIsVisible = 0;
422 | defaultConfigurationName = Release;
423 | };
424 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
425 | isa = XCConfigurationList;
426 | buildConfigurations = (
427 | 97C147061CF9000F007C117D /* Debug */,
428 | 97C147071CF9000F007C117D /* Release */,
429 | );
430 | defaultConfigurationIsVisible = 0;
431 | defaultConfigurationName = Release;
432 | };
433 | /* End XCConfigurationList section */
434 | };
435 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
436 | }
437 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildSystemType
6 | Original
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ariedov/flutter_ui_challenge_todo/e210552e0f34ddbc925b8ad91bd742e6016c5808/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 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_todo
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/category_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_todo/category_icon.dart';
3 | import 'package:flutter_todo/category_info.dart';
4 | import 'package:flutter_todo/model.dart';
5 |
6 | class CategoryCard extends StatelessWidget {
7 | final Category category;
8 | final VoidCallback onPressed;
9 |
10 | CategoryCard({
11 | Key key,
12 | @required this.category,
13 | this.onPressed,
14 | }) : super(key: key) {
15 | assert(this.category != null);
16 | }
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return Container(
21 | decoration: BoxDecoration(
22 | color: Colors.white,
23 | borderRadius: BorderRadius.circular(16.0),
24 | boxShadow: [
25 | BoxShadow(
26 | color: Colors.black54, blurRadius: 8.0, offset: Offset(0.0, 12.0))
27 | ],
28 | ),
29 | child: InkWell(
30 | child: Padding(
31 | padding: const EdgeInsets.all(16.0),
32 | child: Column(
33 | crossAxisAlignment: CrossAxisAlignment.start,
34 | children: [
35 | // image
36 | Expanded(
37 | child: Align(
38 | alignment: Alignment.topLeft,
39 | child: Hero(
40 | tag: "categoryIcon${category.title}",
41 | child: CategoryIcon(
42 | icon: category.icon, color: category.color),
43 | ),
44 | ),
45 | ),
46 | Hero(
47 | tag: "categoryInfo${category.title}",
48 | child: CategoryInfo(category: category)),
49 | ],
50 | ),
51 | ),
52 | onTap: onPressed,
53 | ),
54 | );
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/lib/category_icon.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CategoryIcon extends StatelessWidget {
4 |
5 | final IconData icon;
6 | final Color color;
7 |
8 | const CategoryIcon({Key key, this.icon, this.color}) : super(key: key);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container(
13 | padding: EdgeInsets.all(12.0),
14 | decoration: BoxDecoration(
15 | shape: BoxShape.circle,
16 | border: Border.all(color: Colors.black12, style: BorderStyle.solid),
17 | ),
18 | child: Icon(
19 | icon,
20 | color: color,
21 | ),
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/category_info.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_redux/flutter_redux.dart';
3 | import 'package:flutter_todo/category_progress.dart';
4 | import 'package:flutter_todo/data_provider.dart';
5 | import 'package:flutter_todo/model.dart';
6 |
7 | class CategoryInfo extends StatelessWidget {
8 | final Category category;
9 |
10 | const CategoryInfo({Key key, this.category}) : super(key: key);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return SingleChildScrollView(
15 | physics: NeverScrollableScrollPhysics(),
16 | child: StoreConnector(
17 | converter: (store) => store.state.categories
18 | .firstWhere((filtered) => filtered.id == category.id),
19 | builder: (context, category) {
20 | return Column(
21 | crossAxisAlignment: CrossAxisAlignment.start,
22 | children: [
23 | Text("${category.tasks.length} Tasks",
24 | style: Theme.of(context).textTheme.subhead),
25 | SizedBox(height: 4.0),
26 | Text(category.title,
27 | style: Theme.of(context).textTheme.display1),
28 | SizedBox(height: 12.0),
29 | CategoryProgress(category: category),
30 | ],
31 | );
32 | }),
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/category_progress.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_todo/model.dart';
3 |
4 | class CategoryProgress extends StatelessWidget {
5 | final Category category;
6 | const CategoryProgress({Key key, this.category}) : super(key: key);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return ProgressAnimation(
11 | value: _calclulateProgress(),
12 | builder: (context, progress) => Row(
13 | children: [
14 | Expanded(
15 | child: SizedBox(
16 | height: 3.0,
17 | child: LinearProgressIndicator(
18 | value: progress,
19 | backgroundColor: Colors.black12,
20 | valueColor: AlwaysStoppedAnimation(category.color),
21 | ),
22 | ),
23 | ),
24 | SizedBox(
25 | width: 15.0,
26 | ),
27 | Text(
28 | "${(progress * 100).toInt()}%",
29 | style: Theme.of(context).textTheme.subhead,
30 | ),
31 | ],
32 | ),
33 | );
34 | }
35 |
36 | double _calclulateProgress() {
37 | final finishedItems = category.tasks.where((item) => item.done).length;
38 | if (finishedItems == 0) {
39 | return 0.0;
40 | }
41 | return finishedItems.toDouble() / category.tasks.length;
42 | }
43 | }
44 |
45 | class ProgressAnimation extends StatefulWidget {
46 | final double value;
47 | final ProgressBuilder builder;
48 |
49 | const ProgressAnimation({Key key, this.value, this.builder})
50 | : super(key: key);
51 |
52 | @override
53 | State createState() => _ProgressState();
54 | }
55 |
56 | class _ProgressState extends State
57 | with TickerProviderStateMixin {
58 | AnimationController _controller;
59 | Tween _valueTween;
60 | double _value;
61 |
62 | @override
63 | void initState() {
64 | _value = widget.value;
65 |
66 | _controller =
67 | AnimationController(vsync: this, duration: Duration(milliseconds: 100))
68 | ..addListener(() => setState(() {
69 | _value = _valueTween.evaluate(_controller);
70 | }));
71 | super.initState();
72 | }
73 |
74 | @override
75 | void didUpdateWidget(ProgressAnimation oldWidget) {
76 | if (oldWidget.value != widget.value) {
77 | _valueTween = Tween(begin: oldWidget.value, end: widget.value);
78 | _controller.forward(from: 0.0);
79 | }
80 | super.didUpdateWidget(oldWidget);
81 | }
82 |
83 | @override
84 | Widget build(BuildContext context) {
85 | return widget.builder(context, _value);
86 | }
87 | }
88 |
89 | typedef Widget ProgressBuilder(BuildContext context, double value);
90 |
--------------------------------------------------------------------------------
/lib/circular_image.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CircularImage extends StatelessWidget {
4 | final double width;
5 | final double height;
6 | final String path;
7 |
8 | CircularImage({
9 | Key key,
10 | @required this.path,
11 | @required this.width,
12 | @required this.height,
13 | }) : super(key: key) {
14 | assert(this.path != null);
15 | assert(this.width != null);
16 | assert(this.height != null);
17 | }
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | return Container(
22 | decoration: BoxDecoration(
23 | shape: BoxShape.circle,
24 | image: DecorationImage(
25 | image: AssetImage(path),
26 | ),
27 | boxShadow: [
28 | BoxShadow(
29 | color: Colors.black54,
30 | offset: Offset(0.0, 5.0),
31 | blurRadius: 5.0,
32 | )
33 | ],
34 | ),
35 | width: width,
36 | height: height,
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/create/create_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_todo/model.dart';
3 |
4 | class CreateScreen extends StatefulWidget {
5 | final Category category;
6 | final ValueChanged taskChanged;
7 | final VoidCallback onClose;
8 |
9 | const CreateScreen({Key key, this.category, this.taskChanged, this.onClose}) : super(key: key);
10 |
11 | @override
12 | State createState() => _CreateScreenState();
13 | }
14 |
15 | class _CreateScreenState extends State {
16 | TextEditingController _taskController;
17 |
18 | @override
19 | void initState() {
20 | _taskController = TextEditingController();
21 | super.initState();
22 | }
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | return Column(
27 | children: [
28 | Padding(
29 | padding: EdgeInsets.all(8.0),
30 | child: Stack(
31 | children: [
32 | IconButton(
33 | icon: Icon(Icons.close, color: Colors.black87),
34 | onPressed: widget.onClose,
35 | ),
36 | Center(
37 | child: Padding(
38 | padding: EdgeInsets.only(top: 12.0),
39 | child: Text(
40 | "New Task",
41 | style: TextStyle(color: Colors.black87, fontSize: 24.0),
42 | ),
43 | ),
44 | ),
45 | ],
46 | ),
47 | ),
48 | Expanded(
49 | child: Padding(
50 | padding: const EdgeInsets.all(80.0),
51 | child: Column(
52 | children: [
53 | TextField(
54 | onChanged: widget.taskChanged,
55 | controller: _taskController,
56 | style: Theme.of(context).textTheme.title,
57 | decoration: InputDecoration(
58 | labelText: "What task are you planning to perform?",
59 | labelStyle: Theme.of(context).textTheme.subhead),
60 | ),
61 | ],
62 | ),
63 | ),
64 | ),
65 | ],
66 | );
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/lib/data_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_todo/model.dart';
2 |
3 | class CategoryState {
4 | final List categories;
5 |
6 | CategoryState(this.categories);
7 | }
8 |
9 | CategoryState stateReducer(CategoryState oldState, dynamic action) {
10 | if (action is ChangeTaskStatus) {
11 | return CategoryState(oldState.categories.map((category) {
12 | if (category.id == action.category.id) {
13 | return Category(
14 | category.id,
15 | category.icon,
16 | category.color,
17 | category.title,
18 | category.tasks.map((task) {
19 | if (task.id == action.task.id) {
20 | return Task(task.id, task.name, action.status);
21 | }
22 | return task;
23 | }).toList());
24 | }
25 | return category;
26 | }).toList());
27 | }
28 |
29 | if (action is RemoveTask) {
30 | return CategoryState(oldState.categories.map((category) {
31 | if (category.id == action.category.id) {
32 | category.tasks.removeWhere((task) => task.id == action.task.id);
33 | return Category(category.id, category.icon, category.color,
34 | category.title, category.tasks);
35 | }
36 | return category;
37 | }).toList());
38 | }
39 |
40 | if (action is AddTask) {
41 | return CategoryState(
42 | oldState.categories.map((category) {
43 | if (category.id == action.category.id) {
44 | int id = category.tasks.length + 1;
45 | category.tasks.insert(0, Task(id, action.taskTitle, false));
46 | }
47 | return category;
48 | }).toList(),
49 | );
50 | }
51 |
52 | throw "No such action $action";
53 | }
54 |
55 | class ChangeTaskStatus {
56 | final Category category;
57 | final Task task;
58 | final bool status;
59 |
60 | ChangeTaskStatus(this.category, this.task, this.status);
61 | }
62 |
63 | class RemoveTask {
64 | final Category category;
65 | final Task task;
66 |
67 | RemoveTask(this.category, this.task);
68 | }
69 |
70 | class AddTask {
71 | final Category category;
72 | final String taskTitle;
73 |
74 | AddTask(this.category, this.taskTitle);
75 | }
76 |
--------------------------------------------------------------------------------
/lib/detail/detail_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_redux/flutter_redux.dart';
3 | import 'package:flutter_todo/create/create_screen.dart';
4 | import 'package:flutter_todo/data_provider.dart';
5 | import 'package:flutter_todo/list/list.dart';
6 | import 'package:flutter_todo/model.dart';
7 |
8 | class DetailScreen extends StatefulWidget {
9 | final Category category;
10 |
11 | const DetailScreen({Key key, this.category}) : super(key: key);
12 |
13 | @override
14 | State createState() => _DetailScreenState();
15 | }
16 |
17 | class _DetailScreenState extends State
18 | with TickerProviderStateMixin {
19 | bool creatingTask = false;
20 |
21 | AnimationController _transitionAnimation;
22 | Tween buttonSizeTween;
23 | Tween buttonPositionTween;
24 | Tween buttonRadiusTween;
25 |
26 | double buttonSize = 48.0;
27 | double buttonRadius = 48.0;
28 | double buttonPosition = 16.0;
29 |
30 | Tween listOpacityTween;
31 | Tween createOpacityTween;
32 |
33 | double listOpacity;
34 | double createOpacity;
35 |
36 | GlobalKey listKey = GlobalKey();
37 |
38 | String newTaskTitle;
39 |
40 | @override
41 | void initState() {
42 | _transitionAnimation =
43 | AnimationController(vsync: this, duration: Duration(milliseconds: 300))
44 | ..addListener(() => setState(() {
45 | buttonSize = buttonSizeTween.evaluate(_transitionAnimation);
46 | buttonPosition =
47 | buttonPositionTween.evaluate(_transitionAnimation);
48 | buttonRadius = buttonRadiusTween.evaluate(_transitionAnimation);
49 |
50 | listOpacity = listOpacityTween.evaluate(_transitionAnimation);
51 | createOpacity =
52 | createOpacityTween.evaluate(_transitionAnimation);
53 | }))
54 | ..addStatusListener((status) {
55 | if (status == AnimationStatus.completed) {
56 | setState(() {
57 | creatingTask = !creatingTask;
58 | });
59 | }
60 | });
61 |
62 | super.initState();
63 | }
64 |
65 | @override
66 | Widget build(BuildContext context) {
67 | return Scaffold(
68 | resizeToAvoidBottomPadding: true,
69 | body: SafeArea(
70 | child: Stack(
71 | children: [
72 | _buildContent(),
73 | _buildButton(),
74 | ],
75 | ),
76 | ),
77 | );
78 | }
79 |
80 | _startTransitionAnimation() {
81 | final width = MediaQuery.of(context).size.width;
82 | buttonSizeTween = Tween(begin: 48.0, end: width);
83 | buttonPositionTween = Tween(begin: 16.0, end: 0.0);
84 | buttonRadiusTween = Tween(begin: 48.0, end: 0.0);
85 |
86 | listOpacityTween = Tween(begin: 1.0, end: 0.0);
87 | createOpacityTween = Tween(begin: 0.0, end: 1.0);
88 |
89 |
90 | if (creatingTask) {
91 | buttonSizeTween = ReverseTween(buttonSizeTween);
92 | buttonPositionTween = ReverseTween(buttonPositionTween);
93 | buttonRadiusTween = ReverseTween(buttonRadiusTween);
94 |
95 | listOpacityTween = ReverseTween(listOpacityTween);
96 | createOpacityTween = ReverseTween(createOpacityTween);
97 | }
98 |
99 | _transitionAnimation.forward(from: 0.0);
100 | }
101 |
102 | _buildContent() {
103 | if (_transitionAnimation.isAnimating) {
104 | return Stack(
105 | children: [
106 | Opacity(
107 | opacity: createOpacity,
108 | child: _buildCreate(),
109 | ),
110 | Opacity(
111 | opacity: listOpacity,
112 | child: _buildTaskList(),
113 | ),
114 | ],
115 | );
116 | }
117 |
118 | if (creatingTask) {
119 | return _buildCreate();
120 | }
121 | return _buildTaskList();
122 | }
123 |
124 | _buildTaskList() {
125 | return TaskList(key: listKey, category: widget.category);
126 | }
127 |
128 | _buildButton() {
129 | return Positioned(
130 | bottom: buttonPosition,
131 | right: buttonPosition,
132 | child: Container(
133 | width: buttonSize,
134 | height: 48.0,
135 | decoration: BoxDecoration(
136 | shape: BoxShape.rectangle,
137 | color: Colors.purple,
138 | borderRadius: BorderRadius.circular(buttonRadius)),
139 | child: StoreConnector(
140 | converter: (store) =>
141 | () => store.dispatch(AddTask(widget.category, newTaskTitle)),
142 | builder: (context, callback) => IconButton(
143 | icon: Icon(
144 | Icons.add,
145 | color: Colors.white,
146 | ),
147 | onPressed: () {
148 | if (creatingTask &&
149 | newTaskTitle != null &&
150 | newTaskTitle.isNotEmpty) {
151 | callback();
152 | newTaskTitle = null;
153 | }
154 | _startTransitionAnimation();
155 | },
156 | ),
157 | ),
158 | ),
159 | );
160 | }
161 |
162 | _buildCreate() {
163 | return CreateScreen(
164 | category: widget.category,
165 | taskChanged: (value) => newTaskTitle = value,
166 | onClose: _startTransitionAnimation,
167 | );
168 | }
169 | }
170 |
--------------------------------------------------------------------------------
/lib/detail/todo_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_redux/flutter_redux.dart';
3 | import 'package:flutter_todo/data_provider.dart';
4 | import 'package:flutter_todo/model.dart';
5 |
6 | class TodoItem extends StatelessWidget {
7 | final Category category;
8 | final Task task;
9 |
10 | const TodoItem({Key key, this.task, this.category}) : super(key: key);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Row(
15 | children: [
16 | Expanded(
17 | child: Row(
18 | children: [
19 | SizedBox(
20 | width: 24.0,
21 | height: 24.0,
22 | child: StoreConnector(
23 | converter: (store) =>
24 | (value) => store.dispatch(ChangeTaskStatus(category, task, value)),
25 | builder: (context, action) => Checkbox(
26 | onChanged: (value) => action(value),
27 | value: task.done,
28 | activeColor: Colors.black12,
29 | materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
30 | ),
31 | ),
32 | ),
33 | SizedBox(
34 | width: 12.0,
35 | ),
36 | Text(
37 | task.name,
38 | style: TextStyle(
39 | color: task.done ? Colors.black38 : Colors.black87,
40 | fontSize: 18.0,
41 | decoration: task.done
42 | ? TextDecoration.lineThrough
43 | : TextDecoration.none,
44 | ),
45 | ),
46 | ],
47 | ),
48 | ),
49 | SizedBox(
50 | width: 20.0,
51 | height: 20.0,
52 | child: _buildDeleteButton(),
53 | ),
54 | ],
55 | );
56 | }
57 |
58 | _buildDeleteButton() {
59 | if (!task.done) {
60 | return SizedBox();
61 | }
62 | return StoreConnector(
63 | converter: (state) => () => state.dispatch(RemoveTask(category, task)),
64 | builder: (context, action) => IconButton(
65 | padding: EdgeInsets.all(0.0),
66 | icon: Icon(
67 | Icons.delete,
68 | color: Colors.black38,
69 | ),
70 | onPressed: task.done ? action : null,
71 | ),
72 | );
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/lib/detail_reveal.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ScreenTransition extends AnimatedWidget {
4 | final Widget screen;
5 | final Animation animation;
6 | final RevealData revealData;
7 |
8 | const ScreenTransition({
9 | Key key,
10 | this.screen,
11 | this.animation,
12 | this.revealData,
13 | }) : super(key: key, listenable: animation);
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | final cropRect = RRect.fromLTRBXY(
18 | revealData.leftTween.evaluate(animation),
19 | revealData.topTween.evaluate(animation),
20 | revealData.rightTween.evaluate(animation),
21 | revealData.bottomTween.evaluate(animation),
22 | 16.0 - (animation.value * 16.0),
23 | 16.0 - (animation.value * 16.0));
24 | return ClipRRect(
25 | borderRadius: BorderRadius.circular(16.0 - (animation.value * 16.0)),
26 | child: Container(
27 | color: Colors.white,
28 | child: Opacity(
29 | opacity: animation.value,
30 | child: screen,
31 | ),
32 | ),
33 | clipper: TransitionClipper(cropRect),
34 | );
35 | }
36 | }
37 |
38 | class TransitionClipper extends CustomClipper {
39 | final RRect clip;
40 |
41 | TransitionClipper(this.clip);
42 |
43 | @override
44 | RRect getClip(Size size) => clip;
45 |
46 | @override
47 | bool shouldReclip(CustomClipper oldClipper) => true;
48 | }
49 |
50 | class RevealData {
51 | final Rect initial;
52 | final Rect expected;
53 |
54 | RevealData(this.initial, this.expected);
55 |
56 | Tween get leftTween => Tween(begin: initial.left, end: expected.left);
57 | Tween get topTween => Tween(begin: initial.top, end: expected.top);
58 | Tween get rightTween =>
59 | Tween(begin: initial.right, end: expected.right);
60 | Tween get bottomTween =>
61 | Tween(begin: initial.bottom, end: expected.bottom);
62 | }
63 |
--------------------------------------------------------------------------------
/lib/list/list.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_redux/flutter_redux.dart';
3 | import 'package:flutter_todo/category_icon.dart';
4 | import 'package:flutter_todo/category_info.dart';
5 | import 'package:flutter_todo/data_provider.dart';
6 | import 'package:flutter_todo/detail/todo_item.dart';
7 | import 'package:flutter_todo/model.dart';
8 |
9 | class TaskList extends StatefulWidget {
10 | final Category category;
11 |
12 | const TaskList({Key key, this.category}) : super(key: key);
13 |
14 | @override
15 | State createState() => _TaskListState();
16 | }
17 |
18 | class _TaskListState extends State with TickerProviderStateMixin {
19 | AnimationController _revealAnimation;
20 |
21 | Tween opacityTween = Tween(begin: 0.0, end: 1.0);
22 | List itemOpacities;
23 |
24 | @override
25 | void initState() {
26 | itemOpacities = widget.category.tasks.map((_) => 0.0).toList();
27 |
28 | _revealAnimation =
29 | AnimationController(vsync: this, duration: Duration(milliseconds: 300))
30 | ..addListener(() {
31 | setState(() {
32 | for (int i = 0; i < widget.category.tasks.length; ++i) {
33 | final animation = CurvedAnimation(
34 | parent: _revealAnimation,
35 | curve: Interval(i / widget.category.tasks.length, 1.0,
36 | curve: Curves.ease));
37 | itemOpacities[i] = opacityTween.evaluate(animation);
38 | }
39 | });
40 | });
41 |
42 | _revealAnimation.forward(from: 0.0);
43 | super.initState();
44 | }
45 |
46 | @override
47 | Widget build(BuildContext context) {
48 | return Column(
49 | crossAxisAlignment: CrossAxisAlignment.start,
50 | children: [
51 | Padding(
52 | padding: const EdgeInsets.all(8.0),
53 | child: IconButton(
54 | icon: Icon(Icons.arrow_back),
55 | onPressed: () => Navigator.of(context).pop()),
56 | ),
57 | Expanded(
58 | child: Container(
59 | padding: const EdgeInsets.only(left: 80.0, right: 80.0, top: 32.0),
60 | child: Column(
61 | crossAxisAlignment: CrossAxisAlignment.start,
62 | children: [
63 | Hero(
64 | tag: "categoryIcon${widget.category.title}",
65 | child: CategoryIcon(
66 | icon: widget.category.icon,
67 | color: widget.category.color,
68 | ),
69 | ),
70 | SizedBox(
71 | height: 32.0,
72 | ),
73 | Hero(
74 | tag: "categoryInfo${widget.category.title}",
75 | child: CategoryInfo(category: widget.category)),
76 | SizedBox(
77 | height: 24.0,
78 | ),
79 | Text(
80 | "Today",
81 | style: Theme.of(context).textTheme.subhead,
82 | ),
83 | SizedBox(
84 | height: 12.0,
85 | ),
86 | Expanded(
87 | child: StoreConnector>(
88 | converter: (store) => store.state.categories
89 | .firstWhere(
90 | (category) => category.id == widget.category.id)
91 | .tasks,
92 | builder: (context, tasks) {
93 | return ListView.separated(
94 | separatorBuilder: (context, _) => SizedBox(
95 | height: 10.0,
96 | ),
97 | itemBuilder: (BuildContext context, int index) {
98 | final task = tasks[index];
99 | return Opacity(
100 | opacity: itemOpacities[index],
101 | child: TodoItem(
102 | category: widget.category, task: task));
103 | },
104 | itemCount: tasks.length,
105 | );
106 | }),
107 | )
108 | ],
109 | ),
110 | ),
111 | ),
112 | ],
113 | );
114 | }
115 |
116 | @override
117 | void dispose() {
118 | _revealAnimation.dispose();
119 | super.dispose();
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_redux/flutter_redux.dart';
3 | import 'package:flutter_todo/data_provider.dart';
4 | import 'package:flutter_todo/model.dart';
5 | import 'package:flutter_todo/projects_screen.dart';
6 | import 'package:redux/redux.dart';
7 |
8 | void main() {
9 | final store = Store(stateReducer,
10 | initialState: CategoryState([
11 | Category(0, Icons.person, Colors.blue, "Personal", [
12 | Task(0, "Task", false),
13 | ]),
14 | Category(1, Icons.content_paste, Colors.orange, "Work", []),
15 | ]));
16 | runApp(FlutterReduxApp(store: store));
17 | }
18 |
19 | class FlutterReduxApp extends StatelessWidget {
20 | final Store store;
21 | const FlutterReduxApp({Key key, this.store}) : super(key: key);
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | return StoreProvider(
26 | child: MaterialApp(
27 | title: 'Flutter Demo',
28 | theme: ThemeData(
29 | primarySwatch: Colors.blue,
30 | textTheme: TextTheme(
31 | body1: TextStyle(color: Colors.white, fontSize: 28.0),
32 | body2: TextStyle(color: Colors.white54, fontSize: 14.0),
33 | display1: TextStyle(color: Colors.black87, fontSize: 36.0),
34 | caption: TextStyle(
35 | color: Colors.white,
36 | fontSize: 12.0,
37 | fontWeight: FontWeight.bold),
38 | subhead: TextStyle(color: Colors.black54, fontSize: 12.0),
39 | )),
40 | home: MyHomePage(title: 'Flutter Demo Home Page'),
41 | ),
42 | store: store,
43 | );
44 | }
45 | }
46 |
47 | class MyHomePage extends StatefulWidget {
48 | MyHomePage({Key key, this.title}) : super(key: key);
49 |
50 | final String title;
51 |
52 | @override
53 | _MyHomePageState createState() => _MyHomePageState();
54 | }
55 |
56 | class _MyHomePageState extends State {
57 | @override
58 | Widget build(BuildContext context) {
59 | return Scaffold(
60 | body: StoreConnector(
61 | converter: (store) => store.state.categories[0].color,
62 | builder: (context, color) => ProjectsScreen(
63 | backgroundColor: color,
64 | )),
65 | );
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/lib/model.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Category {
4 |
5 | final int id;
6 | final IconData icon;
7 | final Color color;
8 | final String title;
9 | final List tasks;
10 |
11 | Category(this.id, this.icon, this.color, this.title, this.tasks);
12 | }
13 |
14 | class Task {
15 | final int id;
16 | final String name;
17 | final bool done;
18 |
19 | Task(this.id, this.name, this.done);
20 | }
--------------------------------------------------------------------------------
/lib/projects_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_redux/flutter_redux.dart';
3 | import 'package:flutter_todo/category_card.dart';
4 | import 'package:flutter_todo/circular_image.dart';
5 | import 'package:flutter_todo/data_provider.dart';
6 | import 'package:flutter_todo/detail/detail_screen.dart';
7 | import 'package:flutter_todo/detail_reveal.dart';
8 | import 'package:flutter_todo/model.dart';
9 | import 'package:snaplist/snaplist.dart';
10 |
11 | class ProjectsScreen extends StatefulWidget {
12 | final Color backgroundColor;
13 | const ProjectsScreen({Key key, this.backgroundColor}) : super(key: key);
14 |
15 | @override
16 | State createState() => _ProjectScreenState();
17 | }
18 |
19 | class _ProjectScreenState extends State {
20 | ColorTween backgroundTween;
21 | Color backgroundColor;
22 |
23 | RevealData revealData;
24 |
25 | @override
26 | void initState() {
27 | backgroundColor = widget.backgroundColor;
28 |
29 | super.initState();
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | final Size itemSize = Size(280.0, 350.0);
35 |
36 | final screenWidth = MediaQuery.of(context).size.width;
37 | final horizontalPadding = (screenWidth - itemSize.width) / 2;
38 | return Container(
39 | color: backgroundColor,
40 | child: SafeArea(
41 | child: Stack(
42 | children: [
43 | Column(
44 | crossAxisAlignment: CrossAxisAlignment.start,
45 | children: [
46 | Padding(
47 | padding: EdgeInsets.only(left: horizontalPadding),
48 | child: Column(
49 | crossAxisAlignment: CrossAxisAlignment.start,
50 | children: [
51 | SizedBox(
52 | height: 32.0,
53 | ),
54 | CircularImage(
55 | path: "assets/images/profile_image.jpg",
56 | width: 50.0,
57 | height: 60.0,
58 | ),
59 | SizedBox(
60 | height: 24.0,
61 | ),
62 | Text("Hello, Jane.",
63 | style: Theme.of(context).textTheme.body1),
64 | SizedBox(
65 | height: 16.0,
66 | ),
67 | Text("Looks like feel good.",
68 | style: Theme.of(context).textTheme.body2),
69 | StoreConnector(
70 | converter: (store) => store.state.categories.fold(
71 | 0,
72 | (prev, element) =>
73 | prev +
74 | element.tasks
75 | .where((task) => !task.done)
76 | .length),
77 | builder: (context, count) => Text(
78 | "You have $count tasks to do today.",
79 | style: Theme.of(context).textTheme.body2),
80 | ),
81 | ],
82 | ),
83 | ),
84 | // Toobar,
85 |
86 | SizedBox(height: 48.0),
87 | Padding(
88 | padding: EdgeInsets.only(left: horizontalPadding),
89 | child: Text(
90 | "today | 23 september".toUpperCase(),
91 | style: Theme.of(context).textTheme.caption,
92 | ),
93 | ),
94 | SizedBox(height: 8.0),
95 | Expanded(
96 | child: Container(
97 | child: StoreConnector>(
98 | converter: (store) => store.state.categories,
99 | builder: (context, categories) {
100 | return SnapList(
101 | progressUpdate: (progress, center, next) {
102 | setState(() {
103 | backgroundTween = ColorTween(
104 | begin: categories[center].color,
105 | end: categories[next].color);
106 | backgroundColor =
107 | backgroundTween.transform(progress / 100);
108 | });
109 | },
110 | alignment: Alignment.topCenter,
111 | separatorProvider: (position, _) => Size.fromWidth(12.0),
112 | sizeProvider: (position, _) => itemSize,
113 | padding: EdgeInsets.only(
114 | left: horizontalPadding,
115 | right: horizontalPadding),
116 | count: categories.length,
117 | builder: (context, position, _) {
118 | final cardKey = GlobalKey();
119 | return CategoryCard(
120 | key: cardKey,
121 | category: categories[position],
122 | onPressed: () => Navigator.of(context).push(
123 | PageRouteBuilder(pageBuilder:
124 | (BuildContext context,
125 | Animation animation,
126 | Animation secondaryAnimation) {
127 | return DetailScreen(
128 | category: categories[position]);
129 | }, transitionsBuilder: (BuildContext
130 | context,
131 | Animation animation,
132 | Animation secondaryAnimation,
133 | Widget child) {
134 | RevealData revealData =
135 | _captureRevealData(cardKey);
136 |
137 | return ScreenTransition(
138 | animation: animation,
139 | screen: child,
140 | revealData: revealData,
141 | );
142 | }),
143 | ),
144 | );
145 | },
146 | snipDuration: Duration(milliseconds: 300),
147 | );
148 | }),
149 | ),
150 | ),
151 | ],
152 | ),
153 | ],
154 | ),
155 | ),
156 | );
157 | }
158 |
159 | _captureRevealData(GlobalKey key) {
160 | BuildContext context = key.currentContext;
161 | if (context == null) {
162 | return revealData;
163 | }
164 | final RenderBox box = context.findRenderObject();
165 | final pos = box.localToGlobal(Offset.zero);
166 | final size = box.size;
167 |
168 | final screenSize = MediaQuery.of(context).size;
169 |
170 | revealData = RevealData(
171 | Rect.fromLTWH(pos.dx, pos.dy, size.width, size.height),
172 | Rect.fromLTWH(0.0, 0.0, screenSize.width, screenSize.height));
173 | return revealData;
174 | }
175 | }
176 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_todo
2 | description: A new Flutter project.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # Read more about versioning at semver.org.
10 | version: 1.0.0+1
11 |
12 | environment:
13 | sdk: ">=2.0.0-dev.68.0 <3.0.0"
14 |
15 | dependencies:
16 | flutter:
17 | sdk: flutter
18 | flutter_redux: ^0.5.2
19 | snaplist: ^0.1.3
20 |
21 | # The following adds the Cupertino Icons font to your application.
22 | # Use with the CupertinoIcons class for iOS style icons.
23 | cupertino_icons: ^0.1.2
24 |
25 | dev_dependencies:
26 | flutter_test:
27 | sdk: flutter
28 |
29 |
30 | # For information on the generic Dart part of this file, see the
31 | # following page: https://www.dartlang.org/tools/pub/pubspec
32 |
33 | # The following section is specific to Flutter.
34 | flutter:
35 | uses-material-design: true
36 | assets:
37 | - assets/images/profile_image.jpg
38 |
39 | # An image asset can refer to one or more resolution-specific "variants", see
40 | # https://flutter.io/assets-and-images/#resolution-aware.
41 |
42 | # For details regarding adding assets from package dependencies, see
43 | # https://flutter.io/assets-and-images/#from-packages
44 |
45 | # To add custom fonts to your application, add a fonts section here,
46 | # in this "flutter" section. Each entry in this list should have a
47 | # "family" key with the font family name, and a "fonts" key with a
48 | # list giving the asset and other descriptors for the font. For
49 | # example:
50 | # fonts:
51 | # - family: Schyler
52 | # fonts:
53 | # - asset: fonts/Schyler-Regular.ttf
54 | # - asset: fonts/Schyler-Italic.ttf
55 | # style: italic
56 | # - family: Trajan Pro
57 | # fonts:
58 | # - asset: fonts/TrajanPro.ttf
59 | # - asset: fonts/TrajanPro_Bold.ttf
60 | # weight: 700
61 | #
62 | # For details regarding fonts from package dependencies,
63 | # see https://flutter.io/custom-fonts/#from-packages
64 |
--------------------------------------------------------------------------------
/test/store_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter
3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to
4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties
5 | // are correct.
6 |
7 | import 'package:flutter/material.dart';
8 | import 'package:flutter_test/flutter_test.dart';
9 | import 'package:flutter_todo/data_provider.dart';
10 | import 'package:flutter_todo/model.dart';
11 |
12 | void main() {
13 | test("test new task", () {
14 | final category = Category(0, Icons.ac_unit, Colors.black, "Title", []);
15 |
16 | final initialState = CategoryState([category]);
17 |
18 | final newState = stateReducer(initialState, AddTask(category, "New Task"));
19 | expect(newState.categories[0].tasks.length, 1);
20 | expect(newState.categories[0].tasks[0].name, "New Task");
21 | expect(newState.categories[0].tasks[0].done, false);
22 | });
23 |
24 | test("test remove task", () {
25 | final task = Task(0, "Name", true);
26 | final category = Category(0, Icons.ac_unit, Colors.black, "Title", [task]);
27 |
28 | final initialState = CategoryState([category]);
29 |
30 | final newState = stateReducer(initialState, RemoveTask(category, task));
31 | expect(newState.categories[0].tasks.length, 0);
32 | });
33 |
34 | test("test mark task done", () {
35 | final task = Task(0, "Name", false);
36 | final category = Category(0, Icons.ac_unit, Colors.black, "Title", [task]);
37 |
38 | final initialState = CategoryState([category]);
39 |
40 | final newState = stateReducer(initialState, ChangeTaskStatus(category, task, true));
41 | expect(newState.categories[0].tasks.length, 1);
42 | expect(newState.categories[0].tasks[0].done, true);
43 | });
44 |
45 | test("test mark task undone", () {
46 | final task = Task(0, "Name", true);
47 | final category = Category(0, Icons.ac_unit, Colors.black, "Title", [task]);
48 |
49 | final initialState = CategoryState([category]);
50 |
51 | final newState = stateReducer(initialState, ChangeTaskStatus(category, task, false));
52 | expect(newState.categories[0].tasks.length, 1);
53 | expect(newState.categories[0].tasks[0].done, false);
54 | });
55 | }
56 |
--------------------------------------------------------------------------------