├── .gitignore ├── .metadata ├── README.md ├── android ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── resocoder │ │ │ │ └── moor_tutorial │ │ │ │ └── MainActivity.kt │ │ └── 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 │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── 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 ├── lib ├── data │ ├── moor_database.dart │ └── moor_database.g.dart ├── main.dart └── ui │ ├── home_page.dart │ └── widget │ ├── new_tag_input_widget.dart │ └── new_task_input_widget.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | /build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | 65 | # Exceptions to above rules. 66 | !**/ios/**/default.mode1v3 67 | !**/ios/**/default.mode2v3 68 | !**/ios/**/default.pbxuser 69 | !**/ios/**/default.perspectivev3 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | -------------------------------------------------------------------------------- /.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: 7a4c33425ddd78c54aba07d86f3f9a4a0051769b 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # moor_tutorial 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /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 plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.resocoder.moor_tutorial" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 66 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 67 | } 68 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/resocoder/moor_tutorial/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.resocoder.moor_tutorial 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.2.71' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.2.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 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 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /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.2-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 | -------------------------------------------------------------------------------- /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 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 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 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 19 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 20 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXCopyFilesBuildPhase section */ 24 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 25 | isa = PBXCopyFilesBuildPhase; 26 | buildActionMask = 2147483647; 27 | dstPath = ""; 28 | dstSubfolderSpec = 10; 29 | files = ( 30 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 31 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 32 | ); 33 | name = "Embed Frameworks"; 34 | runOnlyForDeploymentPostprocessing = 0; 35 | }; 36 | /* End PBXCopyFilesBuildPhase section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 40 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 41 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 42 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 43 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 44 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 45 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 46 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 47 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 48 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 49 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 62 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 9740EEB11CF90186004384FC /* Flutter */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 3B80C3931E831B6300D905FE /* App.framework */, 73 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 74 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 75 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 76 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 77 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 78 | ); 79 | name = Flutter; 80 | sourceTree = ""; 81 | }; 82 | 97C146E51CF9000F007C117D = { 83 | isa = PBXGroup; 84 | children = ( 85 | 9740EEB11CF90186004384FC /* Flutter */, 86 | 97C146F01CF9000F007C117D /* Runner */, 87 | 97C146EF1CF9000F007C117D /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | 97C146EF1CF9000F007C117D /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 97C146EE1CF9000F007C117D /* Runner.app */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | 97C146F01CF9000F007C117D /* Runner */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 103 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 104 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 105 | 97C147021CF9000F007C117D /* Info.plist */, 106 | 97C146F11CF9000F007C117D /* Supporting Files */, 107 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 108 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 109 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 110 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 111 | ); 112 | path = Runner; 113 | sourceTree = ""; 114 | }; 115 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | ); 119 | name = "Supporting Files"; 120 | sourceTree = ""; 121 | }; 122 | /* End PBXGroup section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | 97C146ED1CF9000F007C117D /* Runner */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 128 | buildPhases = ( 129 | 9740EEB61CF901F6004384FC /* Run Script */, 130 | 97C146EA1CF9000F007C117D /* Sources */, 131 | 97C146EB1CF9000F007C117D /* Frameworks */, 132 | 97C146EC1CF9000F007C117D /* Resources */, 133 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 134 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 135 | ); 136 | buildRules = ( 137 | ); 138 | dependencies = ( 139 | ); 140 | name = Runner; 141 | productName = Runner; 142 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 143 | productType = "com.apple.product-type.application"; 144 | }; 145 | /* End PBXNativeTarget section */ 146 | 147 | /* Begin PBXProject section */ 148 | 97C146E61CF9000F007C117D /* Project object */ = { 149 | isa = PBXProject; 150 | attributes = { 151 | LastUpgradeCheck = 0910; 152 | ORGANIZATIONNAME = "The Chromium Authors"; 153 | TargetAttributes = { 154 | 97C146ED1CF9000F007C117D = { 155 | CreatedOnToolsVersion = 7.3.1; 156 | LastSwiftMigration = 0910; 157 | }; 158 | }; 159 | }; 160 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 161 | compatibilityVersion = "Xcode 3.2"; 162 | developmentRegion = English; 163 | hasScannedForEncodings = 0; 164 | knownRegions = ( 165 | en, 166 | Base, 167 | ); 168 | mainGroup = 97C146E51CF9000F007C117D; 169 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 170 | projectDirPath = ""; 171 | projectRoot = ""; 172 | targets = ( 173 | 97C146ED1CF9000F007C117D /* Runner */, 174 | ); 175 | }; 176 | /* End PBXProject section */ 177 | 178 | /* Begin PBXResourcesBuildPhase section */ 179 | 97C146EC1CF9000F007C117D /* Resources */ = { 180 | isa = PBXResourcesBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 184 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 185 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 186 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 187 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXResourcesBuildPhase section */ 192 | 193 | /* Begin PBXShellScriptBuildPhase section */ 194 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Thin Binary"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 207 | }; 208 | 9740EEB61CF901F6004384FC /* Run Script */ = { 209 | isa = PBXShellScriptBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | ); 213 | inputPaths = ( 214 | ); 215 | name = "Run Script"; 216 | outputPaths = ( 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | shellPath = /bin/sh; 220 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 221 | }; 222 | /* End PBXShellScriptBuildPhase section */ 223 | 224 | /* Begin PBXSourcesBuildPhase section */ 225 | 97C146EA1CF9000F007C117D /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 230 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXSourcesBuildPhase section */ 235 | 236 | /* Begin PBXVariantGroup section */ 237 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 238 | isa = PBXVariantGroup; 239 | children = ( 240 | 97C146FB1CF9000F007C117D /* Base */, 241 | ); 242 | name = Main.storyboard; 243 | sourceTree = ""; 244 | }; 245 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 246 | isa = PBXVariantGroup; 247 | children = ( 248 | 97C147001CF9000F007C117D /* Base */, 249 | ); 250 | name = LaunchScreen.storyboard; 251 | sourceTree = ""; 252 | }; 253 | /* End PBXVariantGroup section */ 254 | 255 | /* Begin XCBuildConfiguration section */ 256 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 257 | isa = XCBuildConfiguration; 258 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 259 | buildSettings = { 260 | ALWAYS_SEARCH_USER_PATHS = NO; 261 | CLANG_ANALYZER_NONNULL = YES; 262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 263 | CLANG_CXX_LIBRARY = "libc++"; 264 | CLANG_ENABLE_MODULES = YES; 265 | CLANG_ENABLE_OBJC_ARC = YES; 266 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 267 | CLANG_WARN_BOOL_CONVERSION = YES; 268 | CLANG_WARN_COMMA = YES; 269 | CLANG_WARN_CONSTANT_CONVERSION = YES; 270 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 271 | CLANG_WARN_EMPTY_BODY = YES; 272 | CLANG_WARN_ENUM_CONVERSION = YES; 273 | CLANG_WARN_INFINITE_RECURSION = YES; 274 | CLANG_WARN_INT_CONVERSION = YES; 275 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 279 | CLANG_WARN_STRICT_PROTOTYPES = YES; 280 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 281 | CLANG_WARN_UNREACHABLE_CODE = YES; 282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 284 | COPY_PHASE_STRIP = NO; 285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 286 | ENABLE_NS_ASSERTIONS = NO; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | GCC_C_LANGUAGE_STANDARD = gnu99; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 297 | MTL_ENABLE_DEBUG_INFO = NO; 298 | SDKROOT = iphoneos; 299 | TARGETED_DEVICE_FAMILY = "1,2"; 300 | VALIDATE_PRODUCT = YES; 301 | }; 302 | name = Profile; 303 | }; 304 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 305 | isa = XCBuildConfiguration; 306 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 307 | buildSettings = { 308 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 309 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 310 | DEVELOPMENT_TEAM = S8QB4VV633; 311 | ENABLE_BITCODE = NO; 312 | FRAMEWORK_SEARCH_PATHS = ( 313 | "$(inherited)", 314 | "$(PROJECT_DIR)/Flutter", 315 | ); 316 | INFOPLIST_FILE = Runner/Info.plist; 317 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 318 | LIBRARY_SEARCH_PATHS = ( 319 | "$(inherited)", 320 | "$(PROJECT_DIR)/Flutter", 321 | ); 322 | PRODUCT_BUNDLE_IDENTIFIER = com.resocoder.moorTutorial; 323 | PRODUCT_NAME = "$(TARGET_NAME)"; 324 | SWIFT_VERSION = 4.0; 325 | VERSIONING_SYSTEM = "apple-generic"; 326 | }; 327 | name = Profile; 328 | }; 329 | 97C147031CF9000F007C117D /* Debug */ = { 330 | isa = XCBuildConfiguration; 331 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 332 | buildSettings = { 333 | ALWAYS_SEARCH_USER_PATHS = NO; 334 | CLANG_ANALYZER_NONNULL = YES; 335 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 336 | CLANG_CXX_LIBRARY = "libc++"; 337 | CLANG_ENABLE_MODULES = YES; 338 | CLANG_ENABLE_OBJC_ARC = YES; 339 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 340 | CLANG_WARN_BOOL_CONVERSION = YES; 341 | CLANG_WARN_COMMA = YES; 342 | CLANG_WARN_CONSTANT_CONVERSION = YES; 343 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 344 | CLANG_WARN_EMPTY_BODY = YES; 345 | CLANG_WARN_ENUM_CONVERSION = YES; 346 | CLANG_WARN_INFINITE_RECURSION = YES; 347 | CLANG_WARN_INT_CONVERSION = YES; 348 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 349 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 350 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 351 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 352 | CLANG_WARN_STRICT_PROTOTYPES = YES; 353 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 354 | CLANG_WARN_UNREACHABLE_CODE = YES; 355 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 356 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 357 | COPY_PHASE_STRIP = NO; 358 | DEBUG_INFORMATION_FORMAT = dwarf; 359 | ENABLE_STRICT_OBJC_MSGSEND = YES; 360 | ENABLE_TESTABILITY = YES; 361 | GCC_C_LANGUAGE_STANDARD = gnu99; 362 | GCC_DYNAMIC_NO_PIC = NO; 363 | GCC_NO_COMMON_BLOCKS = YES; 364 | GCC_OPTIMIZATION_LEVEL = 0; 365 | GCC_PREPROCESSOR_DEFINITIONS = ( 366 | "DEBUG=1", 367 | "$(inherited)", 368 | ); 369 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 370 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 371 | GCC_WARN_UNDECLARED_SELECTOR = YES; 372 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 373 | GCC_WARN_UNUSED_FUNCTION = YES; 374 | GCC_WARN_UNUSED_VARIABLE = YES; 375 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 376 | MTL_ENABLE_DEBUG_INFO = YES; 377 | ONLY_ACTIVE_ARCH = YES; 378 | SDKROOT = iphoneos; 379 | TARGETED_DEVICE_FAMILY = "1,2"; 380 | }; 381 | name = Debug; 382 | }; 383 | 97C147041CF9000F007C117D /* Release */ = { 384 | isa = XCBuildConfiguration; 385 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 386 | buildSettings = { 387 | ALWAYS_SEARCH_USER_PATHS = NO; 388 | CLANG_ANALYZER_NONNULL = YES; 389 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 390 | CLANG_CXX_LIBRARY = "libc++"; 391 | CLANG_ENABLE_MODULES = YES; 392 | CLANG_ENABLE_OBJC_ARC = YES; 393 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 394 | CLANG_WARN_BOOL_CONVERSION = YES; 395 | CLANG_WARN_COMMA = YES; 396 | CLANG_WARN_CONSTANT_CONVERSION = YES; 397 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 398 | CLANG_WARN_EMPTY_BODY = YES; 399 | CLANG_WARN_ENUM_CONVERSION = YES; 400 | CLANG_WARN_INFINITE_RECURSION = YES; 401 | CLANG_WARN_INT_CONVERSION = YES; 402 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 403 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 404 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 405 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 406 | CLANG_WARN_STRICT_PROTOTYPES = YES; 407 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 408 | CLANG_WARN_UNREACHABLE_CODE = YES; 409 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 410 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 411 | COPY_PHASE_STRIP = NO; 412 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 413 | ENABLE_NS_ASSERTIONS = NO; 414 | ENABLE_STRICT_OBJC_MSGSEND = YES; 415 | GCC_C_LANGUAGE_STANDARD = gnu99; 416 | GCC_NO_COMMON_BLOCKS = YES; 417 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 418 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 419 | GCC_WARN_UNDECLARED_SELECTOR = YES; 420 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 421 | GCC_WARN_UNUSED_FUNCTION = YES; 422 | GCC_WARN_UNUSED_VARIABLE = YES; 423 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 424 | MTL_ENABLE_DEBUG_INFO = NO; 425 | SDKROOT = iphoneos; 426 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 427 | TARGETED_DEVICE_FAMILY = "1,2"; 428 | VALIDATE_PRODUCT = YES; 429 | }; 430 | name = Release; 431 | }; 432 | 97C147061CF9000F007C117D /* Debug */ = { 433 | isa = XCBuildConfiguration; 434 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 435 | buildSettings = { 436 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 437 | CLANG_ENABLE_MODULES = YES; 438 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 439 | ENABLE_BITCODE = NO; 440 | FRAMEWORK_SEARCH_PATHS = ( 441 | "$(inherited)", 442 | "$(PROJECT_DIR)/Flutter", 443 | ); 444 | INFOPLIST_FILE = Runner/Info.plist; 445 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 446 | LIBRARY_SEARCH_PATHS = ( 447 | "$(inherited)", 448 | "$(PROJECT_DIR)/Flutter", 449 | ); 450 | PRODUCT_BUNDLE_IDENTIFIER = com.resocoder.moorTutorial; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 453 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 454 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 455 | SWIFT_VERSION = 4.0; 456 | VERSIONING_SYSTEM = "apple-generic"; 457 | }; 458 | name = Debug; 459 | }; 460 | 97C147071CF9000F007C117D /* Release */ = { 461 | isa = XCBuildConfiguration; 462 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 463 | buildSettings = { 464 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 465 | CLANG_ENABLE_MODULES = YES; 466 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 467 | ENABLE_BITCODE = NO; 468 | FRAMEWORK_SEARCH_PATHS = ( 469 | "$(inherited)", 470 | "$(PROJECT_DIR)/Flutter", 471 | ); 472 | INFOPLIST_FILE = Runner/Info.plist; 473 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 474 | LIBRARY_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | PRODUCT_BUNDLE_IDENTIFIER = com.resocoder.moorTutorial; 479 | PRODUCT_NAME = "$(TARGET_NAME)"; 480 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 481 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 482 | SWIFT_VERSION = 4.0; 483 | VERSIONING_SYSTEM = "apple-generic"; 484 | }; 485 | name = Release; 486 | }; 487 | /* End XCBuildConfiguration section */ 488 | 489 | /* Begin XCConfigurationList section */ 490 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 491 | isa = XCConfigurationList; 492 | buildConfigurations = ( 493 | 97C147031CF9000F007C117D /* Debug */, 494 | 97C147041CF9000F007C117D /* Release */, 495 | 249021D3217E4FDB00AE95B9 /* Profile */, 496 | ); 497 | defaultConfigurationIsVisible = 0; 498 | defaultConfigurationName = Release; 499 | }; 500 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 501 | isa = XCConfigurationList; 502 | buildConfigurations = ( 503 | 97C147061CF9000F007C117D /* Debug */, 504 | 97C147071CF9000F007C117D /* Release */, 505 | 249021D4217E4FDB00AE95B9 /* Profile */, 506 | ); 507 | defaultConfigurationIsVisible = 0; 508 | defaultConfigurationName = Release; 509 | }; 510 | /* End XCConfigurationList section */ 511 | 512 | }; 513 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 514 | } 515 | -------------------------------------------------------------------------------- /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/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: [UIApplicationLaunchOptionsKey: 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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ResoCoder/flutter-moor-tutorial/d5f5d31a055fa035aa3a7dc3d1744599027b1bbb/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 | moor_tutorial 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/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /lib/data/moor_database.dart: -------------------------------------------------------------------------------- 1 | import 'package:moor_flutter/moor_flutter.dart'; 2 | 3 | part 'moor_database.g.dart'; 4 | 5 | class Tasks extends Table { 6 | // autoIncrement automatically sets this to be the primary key 7 | IntColumn get id => integer().autoIncrement()(); 8 | TextColumn get tagName => 9 | text().nullable().customConstraint('NULL REFERENCES tags(name)')(); 10 | TextColumn get name => text().withLength(min: 1, max: 50)(); 11 | DateTimeColumn get dueDate => dateTime().nullable()(); 12 | BoolColumn get completed => boolean().withDefault(Constant(false))(); 13 | } 14 | 15 | class Tags extends Table { 16 | TextColumn get name => text().withLength(min: 1, max: 10)(); 17 | IntColumn get color => integer()(); 18 | 19 | @override 20 | Set get primaryKey => {name}; 21 | } 22 | 23 | class TaskWithTag { 24 | final Task task; 25 | final Tag tag; 26 | 27 | TaskWithTag({ 28 | @required this.task, 29 | @required this.tag, 30 | }); 31 | } 32 | 33 | @UseMoor(tables: [Tasks, Tags], daos: [TaskDao, TagDao]) 34 | class AppDatabase extends _$AppDatabase { 35 | AppDatabase() 36 | : super(FlutterQueryExecutor.inDatabaseFolder( 37 | path: 'db.sqlite', logStatements: true)); 38 | 39 | @override 40 | int get schemaVersion => 2; 41 | 42 | @override 43 | MigrationStrategy get migration => MigrationStrategy( 44 | onUpgrade: (migrator, from, to) async { 45 | if (from == 1) { 46 | await migrator.addColumn(tasks, tasks.tagName); 47 | await migrator.createTable(tags); 48 | } 49 | }, 50 | beforeOpen: (db, details) async { 51 | await db.customStatement('PRAGMA foreign_keys = ON'); 52 | }, 53 | ); 54 | } 55 | 56 | @UseDao( 57 | tables: [Tasks, Tags], 58 | ) 59 | class TaskDao extends DatabaseAccessor with _$TaskDaoMixin { 60 | final AppDatabase db; 61 | 62 | TaskDao(this.db) : super(db); 63 | 64 | Stream> watchAllTasks() { 65 | return (select(tasks) 66 | ..orderBy( 67 | [ 68 | (t) => 69 | OrderingTerm(expression: t.dueDate, mode: OrderingMode.desc), 70 | (t) => OrderingTerm(expression: t.name), 71 | ], 72 | )) 73 | .join( 74 | [ 75 | leftOuterJoin(tags, tags.name.equalsExp(tasks.tagName)), 76 | ], 77 | ) 78 | .watch() 79 | .map((rows) => rows.map( 80 | (row) { 81 | return TaskWithTag( 82 | task: row.readTable(tasks), 83 | tag: row.readTable(tags), 84 | ); 85 | }, 86 | ).toList()); 87 | } 88 | 89 | Future insertTask(Insertable task) => into(tasks).insert(task); 90 | Future updateTask(Insertable task) => update(tasks).replace(task); 91 | Future deleteTask(Insertable task) => delete(tasks).delete(task); 92 | } 93 | 94 | @UseDao(tables: [Tags]) 95 | class TagDao extends DatabaseAccessor with _$TagDaoMixin { 96 | final AppDatabase db; 97 | 98 | TagDao(this.db) : super(db); 99 | 100 | Stream> watchTags() => select(tags).watch(); 101 | Future insertTag(Insertable tag) => into(tags).insert(tag); 102 | } 103 | -------------------------------------------------------------------------------- /lib/data/moor_database.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'moor_database.dart'; 4 | 5 | // ************************************************************************** 6 | // MoorGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: unnecessary_brace_in_string_interps 10 | class Task extends DataClass implements Insertable { 11 | final int id; 12 | final String tagName; 13 | final String name; 14 | final DateTime dueDate; 15 | final bool completed; 16 | Task( 17 | {@required this.id, 18 | this.tagName, 19 | @required this.name, 20 | this.dueDate, 21 | @required this.completed}); 22 | factory Task.fromData(Map data, GeneratedDatabase db, 23 | {String prefix}) { 24 | final effectivePrefix = prefix ?? ''; 25 | final intType = db.typeSystem.forDartType(); 26 | final stringType = db.typeSystem.forDartType(); 27 | final dateTimeType = db.typeSystem.forDartType(); 28 | final boolType = db.typeSystem.forDartType(); 29 | return Task( 30 | id: intType.mapFromDatabaseResponse(data['${effectivePrefix}id']), 31 | tagName: stringType 32 | .mapFromDatabaseResponse(data['${effectivePrefix}tag_name']), 33 | name: stringType.mapFromDatabaseResponse(data['${effectivePrefix}name']), 34 | dueDate: dateTimeType 35 | .mapFromDatabaseResponse(data['${effectivePrefix}due_date']), 36 | completed: 37 | boolType.mapFromDatabaseResponse(data['${effectivePrefix}completed']), 38 | ); 39 | } 40 | factory Task.fromJson(Map json, 41 | {ValueSerializer serializer = const ValueSerializer.defaults()}) { 42 | return Task( 43 | id: serializer.fromJson(json['id']), 44 | tagName: serializer.fromJson(json['tagName']), 45 | name: serializer.fromJson(json['name']), 46 | dueDate: serializer.fromJson(json['dueDate']), 47 | completed: serializer.fromJson(json['completed']), 48 | ); 49 | } 50 | @override 51 | Map toJson( 52 | {ValueSerializer serializer = const ValueSerializer.defaults()}) { 53 | return { 54 | 'id': serializer.toJson(id), 55 | 'tagName': serializer.toJson(tagName), 56 | 'name': serializer.toJson(name), 57 | 'dueDate': serializer.toJson(dueDate), 58 | 'completed': serializer.toJson(completed), 59 | }; 60 | } 61 | 62 | @override 63 | T createCompanion>(bool nullToAbsent) { 64 | return TasksCompanion( 65 | id: id == null && nullToAbsent ? const Value.absent() : Value(id), 66 | tagName: tagName == null && nullToAbsent 67 | ? const Value.absent() 68 | : Value(tagName), 69 | name: name == null && nullToAbsent ? const Value.absent() : Value(name), 70 | dueDate: dueDate == null && nullToAbsent 71 | ? const Value.absent() 72 | : Value(dueDate), 73 | completed: completed == null && nullToAbsent 74 | ? const Value.absent() 75 | : Value(completed), 76 | ) as T; 77 | } 78 | 79 | Task copyWith( 80 | {int id, 81 | String tagName, 82 | String name, 83 | DateTime dueDate, 84 | bool completed}) => 85 | Task( 86 | id: id ?? this.id, 87 | tagName: tagName ?? this.tagName, 88 | name: name ?? this.name, 89 | dueDate: dueDate ?? this.dueDate, 90 | completed: completed ?? this.completed, 91 | ); 92 | @override 93 | String toString() { 94 | return (StringBuffer('Task(') 95 | ..write('id: $id, ') 96 | ..write('tagName: $tagName, ') 97 | ..write('name: $name, ') 98 | ..write('dueDate: $dueDate, ') 99 | ..write('completed: $completed') 100 | ..write(')')) 101 | .toString(); 102 | } 103 | 104 | @override 105 | int get hashCode => $mrjf($mrjc( 106 | $mrjc( 107 | $mrjc($mrjc($mrjc(0, id.hashCode), tagName.hashCode), name.hashCode), 108 | dueDate.hashCode), 109 | completed.hashCode)); 110 | @override 111 | bool operator ==(other) => 112 | identical(this, other) || 113 | (other is Task && 114 | other.id == id && 115 | other.tagName == tagName && 116 | other.name == name && 117 | other.dueDate == dueDate && 118 | other.completed == completed); 119 | } 120 | 121 | class TasksCompanion extends UpdateCompanion { 122 | final Value id; 123 | final Value tagName; 124 | final Value name; 125 | final Value dueDate; 126 | final Value completed; 127 | const TasksCompanion({ 128 | this.id = const Value.absent(), 129 | this.tagName = const Value.absent(), 130 | this.name = const Value.absent(), 131 | this.dueDate = const Value.absent(), 132 | this.completed = const Value.absent(), 133 | }); 134 | } 135 | 136 | class $TasksTable extends Tasks with TableInfo<$TasksTable, Task> { 137 | final GeneratedDatabase _db; 138 | final String _alias; 139 | $TasksTable(this._db, [this._alias]); 140 | final VerificationMeta _idMeta = const VerificationMeta('id'); 141 | GeneratedIntColumn _id; 142 | @override 143 | GeneratedIntColumn get id => _id ??= _constructId(); 144 | GeneratedIntColumn _constructId() { 145 | return GeneratedIntColumn('id', $tableName, false, hasAutoIncrement: true); 146 | } 147 | 148 | final VerificationMeta _tagNameMeta = const VerificationMeta('tagName'); 149 | GeneratedTextColumn _tagName; 150 | @override 151 | GeneratedTextColumn get tagName => _tagName ??= _constructTagName(); 152 | GeneratedTextColumn _constructTagName() { 153 | return GeneratedTextColumn('tag_name', $tableName, true, 154 | $customConstraints: 'NULL REFERENCES tags(name)'); 155 | } 156 | 157 | final VerificationMeta _nameMeta = const VerificationMeta('name'); 158 | GeneratedTextColumn _name; 159 | @override 160 | GeneratedTextColumn get name => _name ??= _constructName(); 161 | GeneratedTextColumn _constructName() { 162 | return GeneratedTextColumn('name', $tableName, false, 163 | minTextLength: 1, maxTextLength: 50); 164 | } 165 | 166 | final VerificationMeta _dueDateMeta = const VerificationMeta('dueDate'); 167 | GeneratedDateTimeColumn _dueDate; 168 | @override 169 | GeneratedDateTimeColumn get dueDate => _dueDate ??= _constructDueDate(); 170 | GeneratedDateTimeColumn _constructDueDate() { 171 | return GeneratedDateTimeColumn( 172 | 'due_date', 173 | $tableName, 174 | true, 175 | ); 176 | } 177 | 178 | final VerificationMeta _completedMeta = const VerificationMeta('completed'); 179 | GeneratedBoolColumn _completed; 180 | @override 181 | GeneratedBoolColumn get completed => _completed ??= _constructCompleted(); 182 | GeneratedBoolColumn _constructCompleted() { 183 | return GeneratedBoolColumn('completed', $tableName, false, 184 | defaultValue: Constant(false)); 185 | } 186 | 187 | @override 188 | List get $columns => [id, tagName, name, dueDate, completed]; 189 | @override 190 | $TasksTable get asDslTable => this; 191 | @override 192 | String get $tableName => _alias ?? 'tasks'; 193 | @override 194 | final String actualTableName = 'tasks'; 195 | @override 196 | VerificationContext validateIntegrity(TasksCompanion d, 197 | {bool isInserting = false}) { 198 | final context = VerificationContext(); 199 | if (d.id.present) { 200 | context.handle(_idMeta, id.isAcceptableValue(d.id.value, _idMeta)); 201 | } else if (id.isRequired && isInserting) { 202 | context.missing(_idMeta); 203 | } 204 | if (d.tagName.present) { 205 | context.handle(_tagNameMeta, 206 | tagName.isAcceptableValue(d.tagName.value, _tagNameMeta)); 207 | } else if (tagName.isRequired && isInserting) { 208 | context.missing(_tagNameMeta); 209 | } 210 | if (d.name.present) { 211 | context.handle( 212 | _nameMeta, name.isAcceptableValue(d.name.value, _nameMeta)); 213 | } else if (name.isRequired && isInserting) { 214 | context.missing(_nameMeta); 215 | } 216 | if (d.dueDate.present) { 217 | context.handle(_dueDateMeta, 218 | dueDate.isAcceptableValue(d.dueDate.value, _dueDateMeta)); 219 | } else if (dueDate.isRequired && isInserting) { 220 | context.missing(_dueDateMeta); 221 | } 222 | if (d.completed.present) { 223 | context.handle(_completedMeta, 224 | completed.isAcceptableValue(d.completed.value, _completedMeta)); 225 | } else if (completed.isRequired && isInserting) { 226 | context.missing(_completedMeta); 227 | } 228 | return context; 229 | } 230 | 231 | @override 232 | Set get $primaryKey => {id}; 233 | @override 234 | Task map(Map data, {String tablePrefix}) { 235 | final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; 236 | return Task.fromData(data, _db, prefix: effectivePrefix); 237 | } 238 | 239 | @override 240 | Map entityToSql(TasksCompanion d) { 241 | final map = {}; 242 | if (d.id.present) { 243 | map['id'] = Variable(d.id.value); 244 | } 245 | if (d.tagName.present) { 246 | map['tag_name'] = Variable(d.tagName.value); 247 | } 248 | if (d.name.present) { 249 | map['name'] = Variable(d.name.value); 250 | } 251 | if (d.dueDate.present) { 252 | map['due_date'] = Variable(d.dueDate.value); 253 | } 254 | if (d.completed.present) { 255 | map['completed'] = Variable(d.completed.value); 256 | } 257 | return map; 258 | } 259 | 260 | @override 261 | $TasksTable createAlias(String alias) { 262 | return $TasksTable(_db, alias); 263 | } 264 | } 265 | 266 | class Tag extends DataClass implements Insertable { 267 | final String name; 268 | final int color; 269 | Tag({@required this.name, @required this.color}); 270 | factory Tag.fromData(Map data, GeneratedDatabase db, 271 | {String prefix}) { 272 | final effectivePrefix = prefix ?? ''; 273 | final stringType = db.typeSystem.forDartType(); 274 | final intType = db.typeSystem.forDartType(); 275 | return Tag( 276 | name: stringType.mapFromDatabaseResponse(data['${effectivePrefix}name']), 277 | color: intType.mapFromDatabaseResponse(data['${effectivePrefix}color']), 278 | ); 279 | } 280 | factory Tag.fromJson(Map json, 281 | {ValueSerializer serializer = const ValueSerializer.defaults()}) { 282 | return Tag( 283 | name: serializer.fromJson(json['name']), 284 | color: serializer.fromJson(json['color']), 285 | ); 286 | } 287 | @override 288 | Map toJson( 289 | {ValueSerializer serializer = const ValueSerializer.defaults()}) { 290 | return { 291 | 'name': serializer.toJson(name), 292 | 'color': serializer.toJson(color), 293 | }; 294 | } 295 | 296 | @override 297 | T createCompanion>(bool nullToAbsent) { 298 | return TagsCompanion( 299 | name: name == null && nullToAbsent ? const Value.absent() : Value(name), 300 | color: 301 | color == null && nullToAbsent ? const Value.absent() : Value(color), 302 | ) as T; 303 | } 304 | 305 | Tag copyWith({String name, int color}) => Tag( 306 | name: name ?? this.name, 307 | color: color ?? this.color, 308 | ); 309 | @override 310 | String toString() { 311 | return (StringBuffer('Tag(') 312 | ..write('name: $name, ') 313 | ..write('color: $color') 314 | ..write(')')) 315 | .toString(); 316 | } 317 | 318 | @override 319 | int get hashCode => $mrjf($mrjc($mrjc(0, name.hashCode), color.hashCode)); 320 | @override 321 | bool operator ==(other) => 322 | identical(this, other) || 323 | (other is Tag && other.name == name && other.color == color); 324 | } 325 | 326 | class TagsCompanion extends UpdateCompanion { 327 | final Value name; 328 | final Value color; 329 | const TagsCompanion({ 330 | this.name = const Value.absent(), 331 | this.color = const Value.absent(), 332 | }); 333 | } 334 | 335 | class $TagsTable extends Tags with TableInfo<$TagsTable, Tag> { 336 | final GeneratedDatabase _db; 337 | final String _alias; 338 | $TagsTable(this._db, [this._alias]); 339 | final VerificationMeta _nameMeta = const VerificationMeta('name'); 340 | GeneratedTextColumn _name; 341 | @override 342 | GeneratedTextColumn get name => _name ??= _constructName(); 343 | GeneratedTextColumn _constructName() { 344 | return GeneratedTextColumn('name', $tableName, false, 345 | minTextLength: 1, maxTextLength: 10); 346 | } 347 | 348 | final VerificationMeta _colorMeta = const VerificationMeta('color'); 349 | GeneratedIntColumn _color; 350 | @override 351 | GeneratedIntColumn get color => _color ??= _constructColor(); 352 | GeneratedIntColumn _constructColor() { 353 | return GeneratedIntColumn( 354 | 'color', 355 | $tableName, 356 | false, 357 | ); 358 | } 359 | 360 | @override 361 | List get $columns => [name, color]; 362 | @override 363 | $TagsTable get asDslTable => this; 364 | @override 365 | String get $tableName => _alias ?? 'tags'; 366 | @override 367 | final String actualTableName = 'tags'; 368 | @override 369 | VerificationContext validateIntegrity(TagsCompanion d, 370 | {bool isInserting = false}) { 371 | final context = VerificationContext(); 372 | if (d.name.present) { 373 | context.handle( 374 | _nameMeta, name.isAcceptableValue(d.name.value, _nameMeta)); 375 | } else if (name.isRequired && isInserting) { 376 | context.missing(_nameMeta); 377 | } 378 | if (d.color.present) { 379 | context.handle( 380 | _colorMeta, color.isAcceptableValue(d.color.value, _colorMeta)); 381 | } else if (color.isRequired && isInserting) { 382 | context.missing(_colorMeta); 383 | } 384 | return context; 385 | } 386 | 387 | @override 388 | Set get $primaryKey => {name}; 389 | @override 390 | Tag map(Map data, {String tablePrefix}) { 391 | final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; 392 | return Tag.fromData(data, _db, prefix: effectivePrefix); 393 | } 394 | 395 | @override 396 | Map entityToSql(TagsCompanion d) { 397 | final map = {}; 398 | if (d.name.present) { 399 | map['name'] = Variable(d.name.value); 400 | } 401 | if (d.color.present) { 402 | map['color'] = Variable(d.color.value); 403 | } 404 | return map; 405 | } 406 | 407 | @override 408 | $TagsTable createAlias(String alias) { 409 | return $TagsTable(_db, alias); 410 | } 411 | } 412 | 413 | abstract class _$AppDatabase extends GeneratedDatabase { 414 | _$AppDatabase(QueryExecutor e) : super(const SqlTypeSystem.withDefaults(), e); 415 | $TasksTable _tasks; 416 | $TasksTable get tasks => _tasks ??= $TasksTable(this); 417 | $TagsTable _tags; 418 | $TagsTable get tags => _tags ??= $TagsTable(this); 419 | TaskDao _taskDao; 420 | TaskDao get taskDao => _taskDao ??= TaskDao(this as AppDatabase); 421 | TagDao _tagDao; 422 | TagDao get tagDao => _tagDao ??= TagDao(this as AppDatabase); 423 | @override 424 | List get allTables => [tasks, tags]; 425 | } 426 | 427 | // ************************************************************************** 428 | // DaoGenerator 429 | // ************************************************************************** 430 | 431 | mixin _$TaskDaoMixin on DatabaseAccessor { 432 | $TasksTable get tasks => db.tasks; 433 | $TagsTable get tags => db.tags; 434 | } 435 | 436 | mixin _$TagDaoMixin on DatabaseAccessor { 437 | $TagsTable get tags => db.tags; 438 | } 439 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | 4 | import 'data/moor_database.dart'; 5 | import 'ui/home_page.dart'; 6 | 7 | void main() => runApp(MyApp()); 8 | 9 | class MyApp extends StatelessWidget { 10 | @override 11 | Widget build(BuildContext context) { 12 | final db = AppDatabase(); 13 | return MultiProvider( 14 | providers: [ 15 | Provider(builder: (_) => db.taskDao), 16 | Provider(builder: (_) => db.tagDao), 17 | ], 18 | child: MaterialApp( 19 | title: 'Material App', 20 | home: HomePage(), 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/ui/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:flutter_slidable/flutter_slidable.dart'; 4 | 5 | import '../data/moor_database.dart'; 6 | import 'widget/new_tag_input_widget.dart'; 7 | import 'widget/new_task_input_widget.dart'; 8 | 9 | class HomePage extends StatefulWidget { 10 | @override 11 | _HomePageState createState() => _HomePageState(); 12 | } 13 | 14 | class _HomePageState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | appBar: AppBar( 19 | title: Text('Tasks'), 20 | ), 21 | body: Column( 22 | children: [ 23 | Expanded(child: _buildTaskList(context)), 24 | NewTaskInput(), 25 | NewTagInput(), 26 | ], 27 | )); 28 | } 29 | 30 | StreamBuilder> _buildTaskList(BuildContext context) { 31 | final dao = Provider.of(context); 32 | return StreamBuilder( 33 | stream: dao.watchAllTasks(), 34 | builder: (context, AsyncSnapshot> snapshot) { 35 | final tasks = snapshot.data ?? List(); 36 | 37 | return ListView.builder( 38 | itemCount: tasks.length, 39 | itemBuilder: (_, index) { 40 | final item = tasks[index]; 41 | return _buildListItem(item, dao); 42 | }, 43 | ); 44 | }, 45 | ); 46 | } 47 | 48 | Widget _buildListItem(TaskWithTag item, TaskDao dao) { 49 | return Slidable( 50 | actionPane: SlidableDrawerActionPane(), 51 | secondaryActions: [ 52 | IconSlideAction( 53 | caption: 'Delete', 54 | color: Colors.red, 55 | icon: Icons.delete, 56 | onTap: () => dao.deleteTask(item.task), 57 | ) 58 | ], 59 | child: CheckboxListTile( 60 | title: Text(item.task.name), 61 | subtitle: Text(item.task.dueDate?.toString() ?? 'No date'), 62 | secondary: _buildTag(item.tag), 63 | value: item.task.completed, 64 | onChanged: (newValue) { 65 | dao.updateTask(item.task.copyWith(completed: newValue)); 66 | }, 67 | ), 68 | ); 69 | } 70 | 71 | Column _buildTag(Tag tag) { 72 | return Column( 73 | mainAxisAlignment: MainAxisAlignment.center, 74 | crossAxisAlignment: CrossAxisAlignment.start, 75 | children: [ 76 | if (tag != null) ...[ 77 | Container( 78 | width: 10, 79 | height: 10, 80 | decoration: BoxDecoration( 81 | shape: BoxShape.circle, 82 | color: Color(tag.color), 83 | ), 84 | ), 85 | Text( 86 | tag.name, 87 | style: TextStyle( 88 | color: Colors.black.withOpacity(0.5), 89 | ), 90 | ), 91 | ], 92 | ], 93 | ); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/ui/widget/new_tag_input_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_material_color_picker/flutter_material_color_picker.dart'; 3 | import 'package:moor/moor.dart'; 4 | import 'package:provider/provider.dart'; 5 | 6 | import '../../data/moor_database.dart'; 7 | 8 | class NewTagInput extends StatefulWidget { 9 | const NewTagInput({ 10 | Key key, 11 | }) : super(key: key); 12 | 13 | @override 14 | _NewTagInputState createState() => _NewTagInputState(); 15 | } 16 | 17 | class _NewTagInputState extends State { 18 | static const Color DEFAULT_COLOR = Colors.red; 19 | 20 | Color pickedTagColor = DEFAULT_COLOR; 21 | TextEditingController controller; 22 | 23 | @override 24 | void initState() { 25 | super.initState(); 26 | controller = TextEditingController(); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return Container( 32 | padding: const EdgeInsets.all(8.0), 33 | child: Row( 34 | children: [ 35 | _buildTextField(context), 36 | _buildColorPickerButton(context), 37 | ], 38 | ), 39 | ); 40 | } 41 | 42 | Flexible _buildTextField(BuildContext context) { 43 | return Flexible( 44 | flex: 1, 45 | child: TextField( 46 | controller: controller, 47 | decoration: InputDecoration(hintText: 'Tag Name'), 48 | onSubmitted: (inputName) { 49 | final dao = Provider.of(context); 50 | final tag = Tag( 51 | name: inputName, 52 | color: pickedTagColor.value, 53 | ); 54 | dao.insertTag(tag); 55 | resetValuesAfterSubmit(); 56 | }, 57 | ), 58 | ); 59 | } 60 | 61 | Widget _buildColorPickerButton(BuildContext context) { 62 | return Flexible( 63 | flex: 1, 64 | child: GestureDetector( 65 | child: Container( 66 | width: 25, 67 | height: 25, 68 | decoration: BoxDecoration( 69 | shape: BoxShape.circle, 70 | color: pickedTagColor, 71 | ), 72 | ), 73 | onTap: () { 74 | _showColorPickerDialog(context); 75 | }, 76 | ), 77 | ); 78 | } 79 | 80 | Future _showColorPickerDialog(BuildContext context) { 81 | return showDialog( 82 | context: context, 83 | builder: (context) { 84 | return AlertDialog( 85 | content: MaterialColorPicker( 86 | allowShades: false, 87 | selectedColor: DEFAULT_COLOR, 88 | onMainColorChange: (colorSwatch) { 89 | setState(() { 90 | pickedTagColor = colorSwatch; 91 | }); 92 | Navigator.of(context).pop(); 93 | }, 94 | ), 95 | ); 96 | }, 97 | ); 98 | } 99 | 100 | void resetValuesAfterSubmit() { 101 | setState(() { 102 | pickedTagColor = DEFAULT_COLOR; 103 | controller.clear(); 104 | }); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /lib/ui/widget/new_task_input_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:moor_flutter/moor_flutter.dart'; 3 | import 'package:provider/provider.dart'; 4 | 5 | import '../../data/moor_database.dart'; 6 | 7 | class NewTaskInput extends StatefulWidget { 8 | const NewTaskInput({ 9 | Key key, 10 | }) : super(key: key); 11 | 12 | @override 13 | _NewTaskInputState createState() => _NewTaskInputState(); 14 | } 15 | 16 | class _NewTaskInputState extends State { 17 | DateTime newTaskDate; 18 | Tag selectedTag; 19 | TextEditingController controller; 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | controller = TextEditingController(); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return Container( 30 | padding: const EdgeInsets.all(8.0), 31 | child: Row( 32 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 33 | children: [ 34 | _buildTextField(context), 35 | _buildTagSelector(context), 36 | _buildDateButton(context), 37 | ], 38 | ), 39 | ); 40 | } 41 | 42 | Expanded _buildTextField(BuildContext context) { 43 | return Expanded( 44 | flex: 1, 45 | child: TextField( 46 | controller: controller, 47 | decoration: InputDecoration(hintText: 'Task Name'), 48 | onSubmitted: (inputName) { 49 | final dao = Provider.of(context); 50 | final task = TasksCompanion( 51 | name: Value(inputName), 52 | dueDate: Value(newTaskDate), 53 | tagName: Value(selectedTag?.name), 54 | ); 55 | dao.insertTask(task); 56 | resetValuesAfterSubmit(); 57 | }, 58 | ), 59 | ); 60 | } 61 | 62 | StreamBuilder> _buildTagSelector(BuildContext context) { 63 | return StreamBuilder>( 64 | stream: Provider.of(context).watchTags(), 65 | builder: (context, snapshot) { 66 | final tags = snapshot.data ?? List(); 67 | 68 | DropdownMenuItem dropdownFromTag(Tag tag) { 69 | return DropdownMenuItem( 70 | value: tag, 71 | child: Row( 72 | children: [ 73 | Text(tag.name), 74 | SizedBox(width: 5), 75 | Container( 76 | width: 15, 77 | height: 15, 78 | decoration: BoxDecoration( 79 | shape: BoxShape.circle, 80 | color: Color(tag.color), 81 | ), 82 | ), 83 | ], 84 | ), 85 | ); 86 | } 87 | 88 | final dropdownMenuItems = 89 | tags.map((tag) => dropdownFromTag(tag)).toList() 90 | // Add a "no tag" item as the first element of the list 91 | ..insert( 92 | 0, 93 | DropdownMenuItem( 94 | value: null, 95 | child: Text('No Tag'), 96 | ), 97 | ); 98 | 99 | return Expanded( 100 | child: DropdownButton( 101 | onChanged: (Tag tag) { 102 | setState(() { 103 | selectedTag = tag; 104 | }); 105 | }, 106 | isExpanded: true, 107 | value: selectedTag, 108 | items: dropdownMenuItems, 109 | ), 110 | ); 111 | }, 112 | ); 113 | } 114 | 115 | IconButton _buildDateButton(BuildContext context) { 116 | return IconButton( 117 | icon: Icon(Icons.calendar_today), 118 | onPressed: () async { 119 | newTaskDate = await showDatePicker( 120 | context: context, 121 | initialDate: DateTime.now(), 122 | firstDate: DateTime(2010), 123 | lastDate: DateTime(2050), 124 | ); 125 | }, 126 | ); 127 | } 128 | 129 | void resetValuesAfterSubmit() { 130 | setState(() { 131 | newTaskDate = null; 132 | selectedTag = null; 133 | controller.clear(); 134 | }); 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "0.36.3" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.2.0" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.4" 32 | build: 33 | dependency: transitive 34 | description: 35 | name: build 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.4" 39 | build_config: 40 | dependency: transitive 41 | description: 42 | name: build_config 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "0.4.0" 46 | build_daemon: 47 | dependency: transitive 48 | description: 49 | name: build_daemon 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.1.0" 53 | build_resolvers: 54 | dependency: transitive 55 | description: 56 | name: build_resolvers 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.0.5" 60 | build_runner: 61 | dependency: "direct dev" 62 | description: 63 | name: build_runner 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.6.0" 67 | build_runner_core: 68 | dependency: transitive 69 | description: 70 | name: build_runner_core 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "3.0.6" 74 | built_collection: 75 | dependency: transitive 76 | description: 77 | name: built_collection 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "4.2.2" 81 | built_value: 82 | dependency: transitive 83 | description: 84 | name: built_value 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "6.6.0" 88 | charcode: 89 | dependency: transitive 90 | description: 91 | name: charcode 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.1.2" 95 | code_builder: 96 | dependency: transitive 97 | description: 98 | name: code_builder 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "3.2.0" 102 | collection: 103 | dependency: transitive 104 | description: 105 | name: collection 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.14.11" 109 | convert: 110 | dependency: transitive 111 | description: 112 | name: convert 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "2.1.1" 116 | crypto: 117 | dependency: transitive 118 | description: 119 | name: crypto 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "2.0.6" 123 | csslib: 124 | dependency: transitive 125 | description: 126 | name: csslib 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "0.16.0" 130 | cupertino_icons: 131 | dependency: "direct main" 132 | description: 133 | name: cupertino_icons 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "0.1.2" 137 | dart_style: 138 | dependency: transitive 139 | description: 140 | name: dart_style 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "1.2.7" 144 | fixnum: 145 | dependency: transitive 146 | description: 147 | name: fixnum 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "0.10.9" 151 | flutter: 152 | dependency: "direct main" 153 | description: flutter 154 | source: sdk 155 | version: "0.0.0" 156 | flutter_material_color_picker: 157 | dependency: "direct main" 158 | description: 159 | name: flutter_material_color_picker 160 | url: "https://pub.dartlang.org" 161 | source: hosted 162 | version: "1.0.0" 163 | flutter_slidable: 164 | dependency: "direct main" 165 | description: 166 | name: flutter_slidable 167 | url: "https://pub.dartlang.org" 168 | source: hosted 169 | version: "0.5.3" 170 | flutter_test: 171 | dependency: "direct dev" 172 | description: flutter 173 | source: sdk 174 | version: "0.0.0" 175 | front_end: 176 | dependency: transitive 177 | description: 178 | name: front_end 179 | url: "https://pub.dartlang.org" 180 | source: hosted 181 | version: "0.1.18" 182 | glob: 183 | dependency: transitive 184 | description: 185 | name: glob 186 | url: "https://pub.dartlang.org" 187 | source: hosted 188 | version: "1.1.7" 189 | graphs: 190 | dependency: transitive 191 | description: 192 | name: graphs 193 | url: "https://pub.dartlang.org" 194 | source: hosted 195 | version: "0.2.0" 196 | html: 197 | dependency: transitive 198 | description: 199 | name: html 200 | url: "https://pub.dartlang.org" 201 | source: hosted 202 | version: "0.14.0+2" 203 | http: 204 | dependency: transitive 205 | description: 206 | name: http 207 | url: "https://pub.dartlang.org" 208 | source: hosted 209 | version: "0.12.0+2" 210 | http_multi_server: 211 | dependency: transitive 212 | description: 213 | name: http_multi_server 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "2.1.0" 217 | http_parser: 218 | dependency: transitive 219 | description: 220 | name: http_parser 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "3.1.3" 224 | io: 225 | dependency: transitive 226 | description: 227 | name: io 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "0.3.3" 231 | js: 232 | dependency: transitive 233 | description: 234 | name: js 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "0.6.1+1" 238 | json_annotation: 239 | dependency: transitive 240 | description: 241 | name: json_annotation 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "2.4.0" 245 | kernel: 246 | dependency: transitive 247 | description: 248 | name: kernel 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "0.3.18" 252 | logging: 253 | dependency: transitive 254 | description: 255 | name: logging 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "0.11.3+2" 259 | matcher: 260 | dependency: transitive 261 | description: 262 | name: matcher 263 | url: "https://pub.dartlang.org" 264 | source: hosted 265 | version: "0.12.5" 266 | meta: 267 | dependency: transitive 268 | description: 269 | name: meta 270 | url: "https://pub.dartlang.org" 271 | source: hosted 272 | version: "1.1.6" 273 | mime: 274 | dependency: transitive 275 | description: 276 | name: mime 277 | url: "https://pub.dartlang.org" 278 | source: hosted 279 | version: "0.9.6+3" 280 | moor: 281 | dependency: transitive 282 | description: 283 | name: moor 284 | url: "https://pub.dartlang.org" 285 | source: hosted 286 | version: "1.6.0" 287 | moor_flutter: 288 | dependency: "direct main" 289 | description: 290 | name: moor_flutter 291 | url: "https://pub.dartlang.org" 292 | source: hosted 293 | version: "1.6.0" 294 | moor_generator: 295 | dependency: "direct dev" 296 | description: 297 | name: moor_generator 298 | url: "https://pub.dartlang.org" 299 | source: hosted 300 | version: "1.6.0+1" 301 | package_config: 302 | dependency: transitive 303 | description: 304 | name: package_config 305 | url: "https://pub.dartlang.org" 306 | source: hosted 307 | version: "1.0.5" 308 | package_resolver: 309 | dependency: transitive 310 | description: 311 | name: package_resolver 312 | url: "https://pub.dartlang.org" 313 | source: hosted 314 | version: "1.0.10" 315 | path: 316 | dependency: transitive 317 | description: 318 | name: path 319 | url: "https://pub.dartlang.org" 320 | source: hosted 321 | version: "1.6.2" 322 | pedantic: 323 | dependency: transitive 324 | description: 325 | name: pedantic 326 | url: "https://pub.dartlang.org" 327 | source: hosted 328 | version: "1.7.0" 329 | pool: 330 | dependency: transitive 331 | description: 332 | name: pool 333 | url: "https://pub.dartlang.org" 334 | source: hosted 335 | version: "1.4.0" 336 | provider: 337 | dependency: "direct main" 338 | description: 339 | name: provider 340 | url: "https://pub.dartlang.org" 341 | source: hosted 342 | version: "3.0.0+1" 343 | pub_semver: 344 | dependency: transitive 345 | description: 346 | name: pub_semver 347 | url: "https://pub.dartlang.org" 348 | source: hosted 349 | version: "1.4.2" 350 | pubspec_parse: 351 | dependency: transitive 352 | description: 353 | name: pubspec_parse 354 | url: "https://pub.dartlang.org" 355 | source: hosted 356 | version: "0.1.4" 357 | quiver: 358 | dependency: transitive 359 | description: 360 | name: quiver 361 | url: "https://pub.dartlang.org" 362 | source: hosted 363 | version: "2.0.3" 364 | recase: 365 | dependency: transitive 366 | description: 367 | name: recase 368 | url: "https://pub.dartlang.org" 369 | source: hosted 370 | version: "2.0.1" 371 | shelf: 372 | dependency: transitive 373 | description: 374 | name: shelf 375 | url: "https://pub.dartlang.org" 376 | source: hosted 377 | version: "0.7.5" 378 | shelf_web_socket: 379 | dependency: transitive 380 | description: 381 | name: shelf_web_socket 382 | url: "https://pub.dartlang.org" 383 | source: hosted 384 | version: "0.2.3" 385 | sky_engine: 386 | dependency: transitive 387 | description: flutter 388 | source: sdk 389 | version: "0.0.99" 390 | source_gen: 391 | dependency: transitive 392 | description: 393 | name: source_gen 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "0.9.4+2" 397 | source_span: 398 | dependency: transitive 399 | description: 400 | name: source_span 401 | url: "https://pub.dartlang.org" 402 | source: hosted 403 | version: "1.5.5" 404 | sqflite: 405 | dependency: transitive 406 | description: 407 | name: sqflite 408 | url: "https://pub.dartlang.org" 409 | source: hosted 410 | version: "1.1.5" 411 | sqlparser: 412 | dependency: transitive 413 | description: 414 | name: sqlparser 415 | url: "https://pub.dartlang.org" 416 | source: hosted 417 | version: "0.1.2" 418 | stack_trace: 419 | dependency: transitive 420 | description: 421 | name: stack_trace 422 | url: "https://pub.dartlang.org" 423 | source: hosted 424 | version: "1.9.3" 425 | stream_channel: 426 | dependency: transitive 427 | description: 428 | name: stream_channel 429 | url: "https://pub.dartlang.org" 430 | source: hosted 431 | version: "2.0.0" 432 | stream_transform: 433 | dependency: transitive 434 | description: 435 | name: stream_transform 436 | url: "https://pub.dartlang.org" 437 | source: hosted 438 | version: "0.0.19" 439 | string_scanner: 440 | dependency: transitive 441 | description: 442 | name: string_scanner 443 | url: "https://pub.dartlang.org" 444 | source: hosted 445 | version: "1.0.4" 446 | synchronized: 447 | dependency: transitive 448 | description: 449 | name: synchronized 450 | url: "https://pub.dartlang.org" 451 | source: hosted 452 | version: "2.1.0+1" 453 | term_glyph: 454 | dependency: transitive 455 | description: 456 | name: term_glyph 457 | url: "https://pub.dartlang.org" 458 | source: hosted 459 | version: "1.1.0" 460 | test_api: 461 | dependency: transitive 462 | description: 463 | name: test_api 464 | url: "https://pub.dartlang.org" 465 | source: hosted 466 | version: "0.2.5" 467 | timing: 468 | dependency: transitive 469 | description: 470 | name: timing 471 | url: "https://pub.dartlang.org" 472 | source: hosted 473 | version: "0.1.1+1" 474 | typed_data: 475 | dependency: transitive 476 | description: 477 | name: typed_data 478 | url: "https://pub.dartlang.org" 479 | source: hosted 480 | version: "1.1.6" 481 | vector_math: 482 | dependency: transitive 483 | description: 484 | name: vector_math 485 | url: "https://pub.dartlang.org" 486 | source: hosted 487 | version: "2.0.8" 488 | watcher: 489 | dependency: transitive 490 | description: 491 | name: watcher 492 | url: "https://pub.dartlang.org" 493 | source: hosted 494 | version: "0.9.7+10" 495 | web_socket_channel: 496 | dependency: transitive 497 | description: 498 | name: web_socket_channel 499 | url: "https://pub.dartlang.org" 500 | source: hosted 501 | version: "1.0.13" 502 | yaml: 503 | dependency: transitive 504 | description: 505 | name: yaml 506 | url: "https://pub.dartlang.org" 507 | source: hosted 508 | version: "2.1.16" 509 | sdks: 510 | dart: ">=2.3.0-dev.0.1 <3.0.0" 511 | flutter: ">=1.2.1 <2.0.0" 512 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: moor_tutorial 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 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.2.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | moor_flutter: ^1.6.0 23 | # For the UI 24 | provider: ^3.0.0+1 25 | flutter_slidable: ^0.5.3 26 | flutter_material_color_picker: ^1.0.0 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^0.1.2 31 | 32 | dev_dependencies: 33 | flutter_test: 34 | sdk: flutter 35 | moor_generator: ^1.6.0 36 | build_runner: 37 | 38 | 39 | # For information on the generic Dart part of this file, see the 40 | # following page: https://www.dartlang.org/tools/pub/pubspec 41 | 42 | # The following section is specific to Flutter. 43 | flutter: 44 | 45 | # The following line ensures that the Material Icons font is 46 | # included with your application, so that you can use the icons in 47 | # the material Icons class. 48 | uses-material-design: true 49 | 50 | # To add assets to your application, add an assets section, like this: 51 | # assets: 52 | # - images/a_dot_burr.jpeg 53 | # - images/a_dot_ham.jpeg 54 | 55 | # An image asset can refer to one or more resolution-specific "variants", see 56 | # https://flutter.dev/assets-and-images/#resolution-aware. 57 | 58 | # For details regarding adding assets from package dependencies, see 59 | # https://flutter.dev/assets-and-images/#from-packages 60 | 61 | # To add custom fonts to your application, add a fonts section here, 62 | # in this "flutter" section. Each entry in this list should have a 63 | # "family" key with the font family name, and a "fonts" key with a 64 | # list giving the asset and other descriptors for the font. For 65 | # example: 66 | # fonts: 67 | # - family: Schyler 68 | # fonts: 69 | # - asset: fonts/Schyler-Regular.ttf 70 | # - asset: fonts/Schyler-Italic.ttf 71 | # style: italic 72 | # - family: Trajan Pro 73 | # fonts: 74 | # - asset: fonts/TrajanPro.ttf 75 | # - asset: fonts/TrajanPro_Bold.ttf 76 | # weight: 700 77 | # 78 | # For details regarding fonts from package dependencies, 79 | # see https://flutter.dev/custom-fonts/#from-packages 80 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:moor_tutorial/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------