Repository: tuannguyendotme/flutter_todo
Branch: master
Commit: 6261e20aab69
Files: 65
Total size: 122.0 KB
Directory structure:
gitextract_ixsgoy7n/
├── .flutter-plugins
├── .gitignore
├── .vscode/
│ └── launch.json
├── LICENSE
├── README.md
├── android/
│ ├── .gitignore
│ ├── app/
│ │ ├── build.gradle
│ │ └── src/
│ │ └── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── me/
│ │ │ └── tuannguyen/
│ │ │ └── fluttertodo/
│ │ │ └── MainActivity.java
│ │ └── res/
│ │ ├── drawable/
│ │ │ └── launch_background.xml
│ │ └── values/
│ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── flutter_todo.iml
├── flutter_todo_android.iml
├── ios/
│ ├── .gitignore
│ ├── Flutter/
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── flutter_export_environment.sh
│ ├── Podfile
│ ├── Runner/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.imageset/
│ │ │ ├── Contents.json
│ │ │ └── README.md
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
│ ├── Runner.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ └── Runner.xcscheme
│ └── Runner.xcworkspace/
│ ├── contents.xcworkspacedata
│ └── xcshareddata/
│ ├── IDEWorkspaceChecks.plist
│ └── WorkspaceSettings.xcsettings
├── lib/
│ ├── main.dart
│ ├── models/
│ │ ├── Priority.dart
│ │ ├── Todo.dart
│ │ ├── filter.dart
│ │ ├── settings.dart
│ │ └── user.dart
│ ├── pages/
│ │ ├── auth/
│ │ │ └── auth_page.dart
│ │ ├── register/
│ │ │ └── register_page.dart
│ │ ├── settings/
│ │ │ └── settings_page.dart
│ │ └── todo/
│ │ ├── todo_editor_page.dart
│ │ └── todo_list_page.dart
│ ├── scoped_models/
│ │ ├── app_model.dart
│ │ └── connected_model.dart
│ └── widgets/
│ ├── form_fields/
│ │ ├── priority_form_field.dart
│ │ └── toggle_form_field.dart
│ ├── helpers/
│ │ ├── confirm_dialog.dart
│ │ ├── message_dialog.dart
│ │ └── priority_helper.dart
│ ├── todo/
│ │ ├── shortcuts_enabled_todo_fab.dart
│ │ ├── todo_card.dart
│ │ └── todo_list_view.dart
│ └── ui_elements/
│ ├── loading_modal.dart
│ └── rounded_button.dart
└── pubspec.yaml
================================================
FILE CONTENTS
================================================
================================================
FILE: .flutter-plugins
================================================
shared_preferences=/Volumes/Storage/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.3+4/
================================================
FILE: .gitignore
================================================
# See https://www.dartlang.org/guides/libraries/private-files
# Files and directories created by pub
.dart_tool/
.packages
.pub/
build/
# If you're building an application, you may want to check-in your pubspec.lock
pubspec.lock
# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/
.DS_Store
.idea/
.env.dart
================================================
FILE: .vscode/launch.json
================================================
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Flutter",
"request": "launch",
"type": "dart"
}
]
}
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
# Flutter Todo
Yet another Todo app, now using Flutter.
## Getting Started
This Todo app is implemented using Flutter (with Scoped Model for state management) and Firebase.
Features:
- Create/edit todo
- Delete todo by swipping
- Mark done/not done in list
- Filter todo list by status (all/done/not done)
- Change theme (light to dark and vice versa) at runtime
- Enable shortcuts to create todo
- Login/logout
- Register new account




To get start, run below command in Terminal
```bash
cp .env.example.dart .env.dart
```
then add Firebase database's URL and API key to .env.dart.
---
For more information about Flutter, visit [Flutter web site](https://flutter.io/).
For more information about Firebase, visit [Firebase web site](https://firebase.google.com/).
================================================
FILE: android/.gitignore
================================================
*.iml
*.class
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
GeneratedPluginRegistrant.java
================================================
FILE: android/app/build.gradle
================================================
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 27
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "me.tuannguyen.fluttertodo"
minSdkVersion 16
targetSdkVersion 27
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
================================================
FILE: android/app/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.tuannguyen.fluttertodo">
<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Flutter Todo"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
================================================
FILE: android/app/src/main/java/me/tuannguyen/fluttertodo/MainActivity.java
================================================
package me.tuannguyen.fluttertodo;
import android.os.Bundle;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
}
================================================
FILE: android/app/src/main/res/drawable/launch_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
================================================
FILE: android/app/src/main/res/values/styles.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
================================================
FILE: android/build.gradle
================================================
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
================================================
FILE: android/gradle/wrapper/gradle-wrapper.properties
================================================
#Wed Sep 26 21:25:02 ICT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
================================================
FILE: android/gradle.properties
================================================
org.gradle.jvmargs=-Xmx1536M
================================================
FILE: android/gradlew
================================================
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
================================================
FILE: android/gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: android/settings.gradle
================================================
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
================================================
FILE: flutter_todo.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
================================================
FILE: flutter_todo_android.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/android/gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/android/gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/android/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/android/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/android/assets" />
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/android/libs" />
<option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/android/proguard_logs" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/android">
<sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/android/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Flutter for Android" level="project" />
</component>
</module>
================================================
FILE: ios/.gitignore
================================================
.idea/
.vagrant/
.sconsign.dblite
.svn/
.DS_Store
*.swp
profile
DerivedData/
build/
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m
.generated/
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
xcuserdata
*.moved-aside
*.pyc
*sync/
Icon?
.tags*
/Flutter/app.flx
/Flutter/app.zip
/Flutter/flutter_assets/
/Flutter/App.framework
/Flutter/Flutter.framework
/Flutter/Generated.xcconfig
/ServiceDefinitions.json
Pods/
.symlinks/
================================================
FILE: ios/Flutter/AppFrameworkInfo.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>
================================================
FILE: ios/Flutter/Debug.xcconfig
================================================
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
================================================
FILE: ios/Flutter/Release.xcconfig
================================================
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
================================================
FILE: ios/Flutter/flutter_export_environment.sh
================================================
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Volumes/Storage/Developer/flutter"
export "FLUTTER_APPLICATION_PATH=/Volumes/Storage/Developer/projects/flutter/flutter_todo"
export "FLUTTER_TARGET=/Volumes/Storage/Developer/projects/flutter/flutter_todo/lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_FRAMEWORK_DIR=/Volumes/Storage/Developer/flutter/bin/cache/artifacts/engine/ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "TRACK_WIDGET_CREATION=true"
================================================
FILE: ios/Podfile
================================================
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
================================================
FILE: ios/Runner/AppDelegate.h
================================================
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : FlutterAppDelegate
@end
================================================
FILE: ios/Runner/AppDelegate.m
================================================
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
================================================
FILE: ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
================================================
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
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.
================================================
FILE: ios/Runner/Base.lproj/LaunchScreen.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>
================================================
FILE: ios/Runner/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
================================================
FILE: ios/Runner/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Flutter Todo</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
================================================
FILE: ios/Runner/main.m
================================================
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char* argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: ios/Runner.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
0A5641A7812B87519C05ECC1 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DB0C7DF3620D65935B7E58F /* libPods-Runner.a */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
3DB0C7DF3620D65935B7E58F /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
754F179BFD22182A355F4A51 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
993FE8798829E0B99204436E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
0A5641A7812B87519C05ECC1 /* libPods-Runner.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
1D06AA122AABD4D2E01E5726 /* Frameworks */ = {
isa = PBXGroup;
children = (
3DB0C7DF3620D65935B7E58F /* libPods-Runner.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
9C7135DC87A1E34F4B5A5400 /* Pods */,
1D06AA122AABD4D2E01E5726 /* Frameworks */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
);
name = Products;
sourceTree = "<group>";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
);
path = Runner;
sourceTree = "<group>";
};
97C146F11CF9000F007C117D /* Supporting Files */ = {
isa = PBXGroup;
children = (
97C146F21CF9000F007C117D /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
9C7135DC87A1E34F4B5A5400 /* Pods */ = {
isa = PBXGroup;
children = (
754F179BFD22182A355F4A51 /* Pods-Runner.debug.xcconfig */,
993FE8798829E0B99204436E /* Pods-Runner.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
8845F48388604A94023546F5 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
96BFAEA7DAC23388AC3603CB /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
};
8845F48388604A94023546F5 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
96BFAEA7DAC23388AC3603CB /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = me.tuannguyen.flutterTodo;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = me.tuannguyen.flutterTodo;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
================================================
FILE: ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: ios/Runner.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
================================================
FILE: ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
</dict>
</plist>
================================================
FILE: lib/main.dart
================================================
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter_todo/.env.dart';
import 'package:flutter_todo/scoped_models/app_model.dart';
import 'package:flutter_todo/pages/register/register_page.dart';
import 'package:flutter_todo/pages/settings/settings_page.dart';
import 'package:flutter_todo/pages/auth/auth_page.dart';
import 'package:flutter_todo/pages/todo/todo_editor_page.dart';
import 'package:flutter_todo/pages/todo/todo_list_page.dart';
void main() async {
runApp(TodoApp());
}
class TodoApp extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _TodoAppState();
}
}
class _TodoAppState extends State<TodoApp> {
AppModel _model;
bool _isAuthenticated = false;
bool _isDarkThemeUsed = false;
@override
void initState() {
_model = AppModel();
_model.loadSettings();
_model.autoAuthentication();
_model.userSubject.listen((bool isAuthenticated) {
setState(() {
_isAuthenticated = isAuthenticated;
});
});
_model.themeSubject.listen((bool isDarkThemeUsed) {
setState(() {
_isDarkThemeUsed = isDarkThemeUsed;
});
});
super.initState();
}
@override
Widget build(BuildContext context) {
return ScopedModel<AppModel>(
model: _model,
child: MaterialApp(
title: Configure.AppName,
debugShowCheckedModeBanner: false,
theme: ThemeData(
accentColor: Colors.blue,
brightness: _isDarkThemeUsed ? Brightness.dark : Brightness.light,
),
routes: {
'/': (BuildContext context) =>
_isAuthenticated ? TodoListPage(_model) : AuthPage(),
'/editor': (BuildContext context) =>
_isAuthenticated ? TodoEditorPage() : AuthPage(),
'/register': (BuildContext context) =>
_isAuthenticated ? TodoListPage(_model) : RegisterPage(),
'/settings': (BuildContext context) =>
_isAuthenticated ? SettingsPage(_model) : AuthPage(),
},
onUnknownRoute: (RouteSettings settings) {
return MaterialPageRoute(
builder: (BuildContext context) =>
_isAuthenticated ? TodoListPage(_model) : AuthPage(),
);
},
),
);
}
}
================================================
FILE: lib/models/Priority.dart
================================================
enum Priority {
High,
Medium,
Low,
}
================================================
FILE: lib/models/Todo.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter_todo/models/priority.dart';
class Todo {
final String id;
final String title;
final String content;
final Priority priority;
final bool isDone;
final String userId;
Todo({
@required this.id,
@required this.title,
this.content,
this.priority = Priority.Low,
this.isDone = false,
@required this.userId,
});
}
================================================
FILE: lib/models/filter.dart
================================================
enum Filter {
All,
Done,
NotDone,
}
================================================
FILE: lib/models/settings.dart
================================================
import 'package:flutter/material.dart';
class Settings {
final bool isShortcutsEnabled;
final bool isDarkThemeUsed;
Settings({
@required this.isShortcutsEnabled,
@required this.isDarkThemeUsed,
});
}
================================================
FILE: lib/models/user.dart
================================================
import 'package:flutter/material.dart';
class User {
final String id;
final String email;
final String token;
User({
@required this.id,
@required this.email,
@required this.token,
});
}
================================================
FILE: lib/pages/auth/auth_page.dart
================================================
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter_todo/.env.dart';
import 'package:flutter_todo/widgets/ui_elements/loading_modal.dart';
import 'package:flutter_todo/widgets/helpers/message_dialog.dart';
import 'package:flutter_todo/scoped_models/app_model.dart';
import 'package:flutter_todo/widgets/ui_elements/rounded_button.dart';
class AuthPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _AuthPageState();
}
}
class _AuthPageState extends State<AuthPage> {
final Map<String, dynamic> _formData = {
'email': null,
'password': null,
};
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
void _authenticate(AppModel model) async {
if (!_formKey.currentState.validate()) {
return;
}
_formKey.currentState.save();
Map<String, dynamic> authResult =
await model.authenticate(_formData['email'], _formData['password']);
if (authResult['success']) {
} else {
MessageDialog.show(context, message: authResult['message']);
}
}
Widget _buildEmailField() {
return TextFormField(
decoration: InputDecoration(labelText: 'Email'),
validator: (value) {
if (value.isEmpty ||
!RegExp(r"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?")
.hasMatch(value)) {
return 'Please enter a valid email';
}
return null;
},
onSaved: (value) {
_formData['email'] = value;
},
);
}
Widget _buildPasswordField() {
return TextFormField(
obscureText: true,
decoration: InputDecoration(labelText: 'Password'),
validator: (value) {
if (value.isEmpty) {
return 'Please enter password';
}
return null;
},
onSaved: (value) {
_formData['password'] = value;
},
);
}
Widget _buildButtonRow(AppModel model) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RoundedButton(
icon: Icon(Icons.edit),
label: 'Register',
onPressed: () {
Navigator.pushNamed(context, '/register');
},
),
SizedBox(
width: 20.0,
),
RoundedButton(
icon: Icon(Icons.lock_open),
label: 'Login',
onPressed: () => _authenticate(model),
),
],
);
}
Widget _buildPageContent(AppModel model) {
final double deviceWidth = MediaQuery.of(context).size.width;
final double targetWidth = deviceWidth > 550 ? 500 : deviceWidth * 0.85;
return Scaffold(
appBar: AppBar(
title: Text(Configure.AppName),
backgroundColor: Colors.blue,
),
body: Container(
padding: EdgeInsets.all(10.0),
child: Center(
child: SingleChildScrollView(
child: Container(
width: targetWidth,
child: Form(
key: _formKey,
child: Column(
children: <Widget>[
_buildEmailField(),
_buildPasswordField(),
SizedBox(
height: 20.0,
),
_buildButtonRow(model),
],
),
),
),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return ScopedModelDescendant<AppModel>(
builder: (BuildContext context, Widget child, AppModel model) {
Stack mainStack = Stack(
children: <Widget>[
_buildPageContent(model),
],
);
if (model.isLoading) {
mainStack.children.add(LoadingModal());
}
return mainStack;
},
);
}
}
================================================
FILE: lib/pages/register/register_page.dart
================================================
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter_todo/.env.dart';
import 'package:flutter_todo/widgets/ui_elements/loading_modal.dart';
import 'package:flutter_todo/widgets/helpers/message_dialog.dart';
import 'package:flutter_todo/scoped_models/app_model.dart';
import 'package:flutter_todo/widgets/ui_elements/rounded_button.dart';
class RegisterPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _RegisterPageState();
}
}
class _RegisterPageState extends State<RegisterPage> {
final Map<String, dynamic> _formData = {
'email': null,
'password': null,
};
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
final TextEditingController _passwordController = TextEditingController();
void _register(AppModel model) async {
if (!_formKey.currentState.validate()) {
return;
}
_formKey.currentState.save();
Map<String, dynamic> authResult =
await model.register(_formData['email'], _formData['password']);
if (authResult['success']) {
Navigator.pop(context);
} else {
MessageDialog.show(context, message: authResult['message']);
}
}
Widget _buildEmailField() {
return TextFormField(
decoration: InputDecoration(labelText: 'Email'),
validator: (value) {
if (value.isEmpty ||
!RegExp(r"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?")
.hasMatch(value)) {
return 'Please enter a valid email';
}
return null;
},
onSaved: (value) {
_formData['email'] = value;
},
);
}
Widget _buildConfirmPasswordField() {
return TextFormField(
obscureText: true,
decoration: InputDecoration(labelText: 'Confirm Password'),
validator: (value) {
if (value != _passwordController.value.text) {
return 'Password and confirm password are not match';
}
return null;
},
);
}
Widget _buildPasswordField() {
return TextFormField(
obscureText: true,
decoration: InputDecoration(labelText: 'Password'),
controller: _passwordController,
validator: (value) {
if (value.isEmpty || value.length < 6) {
return 'Please enter valid password';
}
return null;
},
onSaved: (value) {
_formData['password'] = value;
},
);
}
Widget _buildButtonRow(AppModel model) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RoundedButton(
icon: Icon(Icons.edit),
label: 'Register',
onPressed: () {
_register(model);
},
),
],
);
}
Widget _buildPageContent(AppModel model) {
final double deviceWidth = MediaQuery.of(context).size.width;
final double targetWidth = deviceWidth > 550 ? 500 : deviceWidth * 0.85;
return Scaffold(
appBar: AppBar(
title: Text(Configure.AppName),
backgroundColor: Colors.blue,
),
body: Container(
padding: EdgeInsets.all(10.0),
child: Center(
child: SingleChildScrollView(
child: Container(
width: targetWidth,
child: Form(
key: _formKey,
child: Column(
children: <Widget>[
_buildEmailField(),
_buildPasswordField(),
_buildConfirmPasswordField(),
SizedBox(
height: 20.0,
),
_buildButtonRow(model),
],
),
),
),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return ScopedModelDescendant<AppModel>(
builder: (BuildContext context, Widget child, AppModel model) {
Stack mainStack = Stack(
children: <Widget>[
_buildPageContent(model),
],
);
if (model.isLoading) {
mainStack.children.add(LoadingModal());
}
return mainStack;
},
);
}
}
================================================
FILE: lib/pages/settings/settings_page.dart
================================================
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter_todo/scoped_models/app_model.dart';
import 'package:flutter_todo/widgets/ui_elements/loading_modal.dart';
import 'package:flutter_todo/widgets/helpers/confirm_dialog.dart';
class SettingsPage extends StatefulWidget {
final AppModel model;
SettingsPage(this.model);
@override
State<StatefulWidget> createState() {
return _SettingsPageState();
}
}
class _SettingsPageState extends State<SettingsPage> {
Widget _buildAppBar(BuildContext context, AppModel model) {
return AppBar(
title: Text('Settings'),
backgroundColor: Colors.blue,
actions: <Widget>[
IconButton(
icon: Icon(Icons.lock),
onPressed: () async {
bool confirm = await ConfirmDialog.show(context);
if (confirm) {
Navigator.pop(context);
model.logout();
}
},
),
],
);
}
Widget _buildPageContent(AppModel model) {
return model.isLoading
? LoadingModal()
: Scaffold(
appBar: _buildAppBar(context, model),
body: ListView(
children: <Widget>[
SwitchListTile(
activeColor: Colors.blue,
value: model.settings.isShortcutsEnabled,
onChanged: (value) {
model.toggleIsShortcutEnabled();
},
title: Text('Enable shortcuts'),
),
SwitchListTile(
activeColor: Colors.blue,
value: model.settings.isDarkThemeUsed,
onChanged: (value) {
model.toggleIsDarkThemeUsed();
},
title: Text('Use dark theme'),
)
],
),
);
}
@override
Widget build(BuildContext context) {
return ScopedModelDescendant<AppModel>(
builder: (BuildContext context, Widget child, AppModel model) {
return _buildPageContent(model);
},
);
}
}
================================================
FILE: lib/pages/todo/todo_editor_page.dart
================================================
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter_todo/.env.dart';
import 'package:flutter_todo/models/todo.dart';
import 'package:flutter_todo/models/priority.dart';
import 'package:flutter_todo/scoped_models/app_model.dart';
import 'package:flutter_todo/widgets/helpers/message_dialog.dart';
import 'package:flutter_todo/widgets/helpers/confirm_dialog.dart';
import 'package:flutter_todo/widgets/ui_elements/loading_modal.dart';
import 'package:flutter_todo/widgets/form_fields/priority_form_field.dart';
import 'package:flutter_todo/widgets/form_fields/toggle_form_field.dart';
class TodoEditorPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _TodoEditorPageState();
}
}
class _TodoEditorPageState extends State<TodoEditorPage> {
final Map<String, dynamic> _formData = {
'title': null,
'content': null,
'priority': Priority.Low,
'isDone': false
};
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
Widget _buildAppBar(AppModel model) {
return AppBar(
title: Text(Configure.AppName),
backgroundColor: Colors.blue,
actions: <Widget>[
IconButton(
icon: Icon(Icons.lock),
onPressed: () async {
bool confirm = await ConfirmDialog.show(context);
if (confirm) {
Navigator.pop(context);
model.logout();
}
},
),
],
);
}
Widget _buildFloatingActionButton(AppModel model) {
return FloatingActionButton(
child: Icon(Icons.save),
onPressed: () {
if (!_formKey.currentState.validate()) {
return;
}
_formKey.currentState.save();
if (model.currentTodo != null && model.currentTodo.id != null) {
model
.updateTodo(
_formData['title'],
_formData['content'],
_formData['priority'],
_formData['isDone'],
)
.then((bool success) {
if (success) {
model.setCurrentTodo(null);
Navigator.pop(context);
} else {
MessageDialog.show(context);
}
});
} else {
model
.createTodo(
_formData['title'],
_formData['content'],
_formData['priority'],
_formData['isDone'],
)
.then((bool success) {
if (success) {
Navigator.pop(context);
} else {
MessageDialog.show(context);
}
});
}
},
);
}
Widget _buildTitleField(Todo todo) {
return TextFormField(
decoration: InputDecoration(labelText: 'Title'),
initialValue: todo != null ? todo.title : '',
validator: (value) {
if (value.isEmpty) {
return 'Please enter todo\'s title';
}
return null;
},
onSaved: (value) {
_formData['title'] = value;
},
);
}
Widget _buildContentField(Todo todo) {
return TextFormField(
decoration: InputDecoration(labelText: 'Content'),
initialValue: todo != null ? todo.content : '',
maxLines: 5,
onSaved: (value) {
_formData['content'] = value;
},
);
}
Widget _buildOthers(Todo todo) {
final bool isDone = todo != null && todo.isDone;
final Priority priority = todo != null ? todo.priority : Priority.Low;
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
ToggleFormField(
initialValue: isDone,
onSaved: (bool value) {
_formData['isDone'] = value;
},
),
PriorityFormField(
initialValue: priority,
onSaved: (Priority value) {
_formData['priority'] = value;
},
),
],
);
}
Widget _buildForm(AppModel model) {
Todo todo = model.currentTodo;
_formData['title'] = todo != null ? todo.title : null;
_formData['content'] = todo != null ? todo.content : null;
_formData['priority'] = todo != null ? todo.priority : Priority.Low;
_formData['isDone'] = todo != null ? todo.isDone : false;
return Form(
key: _formKey,
child: ListView(
children: <Widget>[
_buildTitleField(todo),
_buildContentField(todo),
SizedBox(
height: 12.0,
),
_buildOthers(todo),
],
),
);
}
Widget _buildPageContent(AppModel model) {
return Scaffold(
appBar: _buildAppBar(model),
floatingActionButton: _buildFloatingActionButton(model),
body: Container(
padding: EdgeInsets.all(10.0),
child: Center(
child: _buildForm(model),
),
),
);
}
@override
Widget build(BuildContext context) {
return ScopedModelDescendant<AppModel>(
builder: (BuildContext context, Widget child, AppModel model) {
Stack mainStack = Stack(
children: <Widget>[
_buildPageContent(model),
],
);
if (model.isLoading) {
mainStack.children.add(LoadingModal());
}
return mainStack;
},
);
}
}
================================================
FILE: lib/pages/todo/todo_list_page.dart
================================================
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter_todo/.env.dart';
import 'package:flutter_todo/models/filter.dart';
import 'package:flutter_todo/scoped_models/app_model.dart';
import 'package:flutter_todo/widgets/helpers/confirm_dialog.dart';
import 'package:flutter_todo/widgets/ui_elements/loading_modal.dart';
import 'package:flutter_todo/widgets/todo/todo_list_view.dart';
import 'package:flutter_todo/widgets/todo/shortcuts_enabled_todo_fab.dart';
class TodoListPage extends StatefulWidget {
final AppModel model;
TodoListPage(this.model);
@override
State<StatefulWidget> createState() {
return _TodoListPageState();
}
}
class _TodoListPageState extends State<TodoListPage> {
@override
void initState() {
widget.model.fetchTodos();
super.initState();
}
Widget _buildAppBar(AppModel model) {
return AppBar(
title: Text(Configure.AppName),
backgroundColor: Colors.blue,
actions: <Widget>[
IconButton(
icon: Icon(Icons.lock),
onPressed: () async {
bool confirm = await ConfirmDialog.show(context);
if (confirm) {
model.logout();
}
},
),
PopupMenuButton<String>(
onSelected: (String choice) {
switch (choice) {
case 'Settings':
Navigator.pushNamed(context, '/settings');
}
},
itemBuilder: (BuildContext context) {
return [
PopupMenuItem<String>(
value: 'Settings',
child: Text('Settings'),
)
];
},
),
],
);
}
Widget _buildFloatingActionButton(AppModel model) {
if (model.settings.isShortcutsEnabled) {
return ShortcutsEnabledTodoFab(model);
} else {
return FloatingActionButton(
child: Icon(Icons.add),
onPressed: () {
model.setCurrentTodo(null);
Navigator.pushNamed(context, '/editor');
},
);
}
}
Widget _buildAllFlatButton(AppModel model) {
return FlatButton(
child: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.all_inclusive,
color: model.filter == Filter.All ? Colors.white : Colors.black,
),
Text(
'All',
style: TextStyle(
color: model.filter == Filter.All ? Colors.white : Colors.black,
),
)
],
),
),
onPressed: () {
model.applyFilter(Filter.All);
},
);
}
Widget _buildDoneFlatButton(AppModel model) {
return FlatButton(
child: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.check,
color: model.filter == Filter.Done ? Colors.white : Colors.black,
),
Text(
'Done',
style: TextStyle(
color:
model.filter == Filter.Done ? Colors.white : Colors.black,
),
)
],
),
),
onPressed: () {
model.applyFilter(Filter.Done);
},
);
}
Widget _buildNotDoneFlatButton(AppModel model) {
return FlatButton(
child: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.check_box_outline_blank,
color:
model.filter == Filter.NotDone ? Colors.white : Colors.black,
),
Text(
'Not Done',
style: TextStyle(
color: model.filter == Filter.NotDone
? Colors.white
: Colors.black,
),
)
],
),
),
onPressed: () {
model.applyFilter(Filter.NotDone);
},
);
}
Widget _buildBottomAppBar(AppModel model) {
return BottomAppBar(
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
// SizedBox(),
_buildAllFlatButton(model),
_buildDoneFlatButton(model),
_buildNotDoneFlatButton(model),
// SizedBox(
// width: 80.0,
// ),
],
),
color: Colors.blue,
shape: CircularNotchedRectangle(),
);
}
Widget _buildPageContent(AppModel model) {
return Scaffold(
appBar: _buildAppBar(model),
// floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
floatingActionButton: _buildFloatingActionButton(model),
bottomNavigationBar: _buildBottomAppBar(model),
body: TodoListView(),
);
}
@override
Widget build(BuildContext context) {
return ScopedModelDescendant<AppModel>(
builder: (BuildContext context, Widget child, AppModel model) {
Stack stack = Stack(
children: <Widget>[
_buildPageContent(model),
],
);
if (model.isLoading) {
stack.children.add(LoadingModal());
}
return stack;
},
);
}
}
================================================
FILE: lib/scoped_models/app_model.dart
================================================
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter_todo/scoped_models/connected_model.dart';
class AppModel extends Model
with CoreModel, TodosModel, UserModel, SettingsModel {}
================================================
FILE: lib/scoped_models/connected_model.dart
================================================
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:scoped_model/scoped_model.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:rxdart/subjects.dart';
import 'package:flutter_todo/.env.dart';
import 'package:flutter_todo/models/user.dart';
import 'package:flutter_todo/models/filter.dart';
import 'package:flutter_todo/models/priority.dart';
import 'package:flutter_todo/models/todo.dart';
import 'package:flutter_todo/models/settings.dart';
import 'package:flutter_todo/widgets/helpers/priority_helper.dart';
mixin CoreModel on Model {
List<Todo> _todos = [];
Todo _todo;
bool _isLoading = false;
Filter _filter = Filter.All;
User _user;
}
mixin TodosModel on CoreModel {
List<Todo> get todos {
switch (_filter) {
case Filter.All:
return List.from(_todos);
case Filter.Done:
return List.from(_todos.where((todo) => todo.isDone));
case Filter.NotDone:
return List.from(_todos.where((todo) => !todo.isDone));
}
return List.from(_todos);
}
Filter get filter {
return _filter;
}
bool get isLoading {
return _isLoading;
}
Todo get currentTodo {
return _todo;
}
void applyFilter(Filter filter) {
_filter = filter;
notifyListeners();
}
void setCurrentTodo(Todo todo) {
_todo = todo;
}
Future fetchTodos() async {
_isLoading = true;
notifyListeners();
try {
final http.Response response = await http.get(
'${Configure.FirebaseUrl}/todos.json?auth=${_user.token}&orderBy="userId"&equalTo="${_user.id}"');
if (response.statusCode != 200 && response.statusCode != 201) {
_isLoading = false;
notifyListeners();
return;
}
final Map<String, dynamic> todoListData = json.decode(response.body);
if (todoListData == null) {
_isLoading = false;
notifyListeners();
return;
}
todoListData.forEach((String todoId, dynamic todoData) {
final Todo todo = Todo(
id: todoId,
title: todoData['title'],
content: todoData['content'],
priority: PriorityHelper.toPriority(todoData['priority']),
isDone: todoData['isDone'],
userId: _user.id,
);
_todos.add(todo);
});
_isLoading = false;
notifyListeners();
} catch (error) {
_isLoading = false;
notifyListeners();
}
}
Future<bool> createTodo(
String title, String content, Priority priority, bool isDone) async {
_isLoading = true;
notifyListeners();
final Map<String, dynamic> formData = {
'title': title,
'content': content,
'priority': priority.toString(),
'isDone': isDone,
'userId': _user.id,
};
try {
final http.Response response = await http.post(
'${Configure.FirebaseUrl}/todos.json?auth=${_user.token}',
body: json.encode(formData),
);
if (response.statusCode != 200 && response.statusCode != 201) {
_isLoading = false;
notifyListeners();
return false;
}
final Map<String, dynamic> responseData = json.decode(response.body);
Todo todo = Todo(
id: responseData['name'],
title: title,
content: content,
priority: priority,
isDone: isDone,
userId: _user.id,
);
_todos.add(todo);
_isLoading = false;
notifyListeners();
return true;
} catch (error) {
_isLoading = false;
notifyListeners();
return false;
}
}
Future<bool> updateTodo(
String title, String content, Priority priority, bool isDone) async {
_isLoading = true;
notifyListeners();
final Map<String, dynamic> formData = {
'title': title,
'content': content,
'priority': priority.toString(),
'isDone': isDone,
'userId': _user.id,
};
try {
final http.Response response = await http.put(
'${Configure.FirebaseUrl}/todos/${currentTodo.id}.json?auth=${_user.token}',
body: json.encode(formData),
);
if (response.statusCode != 200 && response.statusCode != 201) {
_isLoading = false;
notifyListeners();
return false;
}
Todo todo = Todo(
id: currentTodo.id,
title: title,
content: content,
priority: priority,
isDone: isDone,
userId: _user.id,
);
int todoIndex = _todos.indexWhere((t) => t.id == currentTodo.id);
_todos[todoIndex] = todo;
_isLoading = false;
notifyListeners();
return true;
} catch (error) {
_isLoading = false;
notifyListeners();
return false;
}
}
Future<bool> removeTodo(String id) async {
_isLoading = true;
notifyListeners();
try {
Todo todo = _todos.firstWhere((t) => t.id == id);
int todoIndex = _todos.indexWhere((t) => t.id == id);
_todos.removeAt(todoIndex);
final http.Response response = await http.delete(
'${Configure.FirebaseUrl}/todos/$id.json?auth=${_user.token}');
if (response.statusCode != 200 && response.statusCode != 201) {
_todos[todoIndex] = todo;
_isLoading = false;
notifyListeners();
return false;
}
_isLoading = false;
notifyListeners();
return true;
} catch (error) {
_isLoading = false;
notifyListeners();
return false;
}
}
Future<bool> toggleDone(String id) async {
_isLoading = true;
notifyListeners();
Todo todo = _todos.firstWhere((t) => t.id == id);
final Map<String, dynamic> formData = {
'title': todo.title,
'content': todo.content,
'priority': todo.priority.toString(),
'isDone': !todo.isDone,
'userId': _user.id,
};
try {
final http.Response response = await http.put(
'${Configure.FirebaseUrl}/todos/$id.json?auth=${_user.token}',
body: json.encode(formData),
);
if (response.statusCode != 200 && response.statusCode != 201) {
_isLoading = false;
notifyListeners();
return false;
}
todo = Todo(
id: todo.id,
title: todo.title,
content: todo.content,
priority: todo.priority,
isDone: !todo.isDone,
userId: _user.id,
);
int todoIndex = _todos.indexWhere((t) => t.id == id);
_todos[todoIndex] = todo;
_isLoading = false;
notifyListeners();
return true;
} catch (error) {
_isLoading = false;
notifyListeners();
return false;
}
}
}
mixin UserModel on CoreModel {
Timer _authTimer;
PublishSubject<bool> _userSubject = PublishSubject();
User get user {
return _user;
}
PublishSubject<bool> get userSubject {
return _userSubject;
}
Future<Map<String, dynamic>> authenticate(
String email, String password) async {
_isLoading = true;
notifyListeners();
final Map<String, dynamic> formData = {
'email': email,
'password': password,
'returnSecureToken': true,
};
try {
final http.Response response = await http.post(
'https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=${Configure.ApiKey}',
body: json.encode(formData),
headers: {'Content-Type': 'application/json'},
);
final Map<String, dynamic> responseData = json.decode(response.body);
String message;
if (responseData.containsKey('idToken')) {
_user = User(
id: responseData['localId'],
email: responseData['email'],
token: responseData['idToken'],
);
setAuthTimeout(int.parse(responseData['expiresIn']));
final DateTime now = DateTime.now();
final DateTime expiryTime =
now.add(Duration(seconds: int.parse(responseData['expiresIn'])));
final prefs = await SharedPreferences.getInstance();
prefs.setString('userId', responseData['localId']);
prefs.setString('email', responseData['email']);
prefs.setString('token', responseData['idToken']);
prefs.setString('refreshToken', responseData['refreshToken']);
prefs.setString('expiryTime', expiryTime.toIso8601String());
_userSubject.add(true);
_isLoading = false;
notifyListeners();
return {'success': true};
} else if (responseData['error']['message'] == 'EMAIL_NOT_FOUND') {
message = 'Email is not found.';
} else if (responseData['error']['message'] == 'INVALID_PASSWORD') {
message = 'Password is invalid.';
} else if (responseData['error']['message'] == 'USER_DISABLED') {
message = 'The user account has been disabled.';
}
_isLoading = false;
notifyListeners();
return {
'success': false,
'message': message,
};
} catch (error) {
_isLoading = false;
notifyListeners();
return {'success': false, 'message': error};
}
}
Future<Map<String, dynamic>> register(String email, String password) async {
_isLoading = true;
notifyListeners();
final Map<String, dynamic> formData = {
'email': email,
'password': password,
'returnSecureToken': true,
};
try {
final http.Response response = await http.post(
'https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=${Configure.ApiKey}',
body: json.encode(formData),
headers: {'Content-Type': 'application/json'},
);
final Map<String, dynamic> responseData = json.decode(response.body);
String message;
if (responseData.containsKey('idToken')) {
_user = User(
id: responseData['localId'],
email: responseData['email'],
token: responseData['idToken'],
);
setAuthTimeout(int.parse(responseData['expiresIn']));
final DateTime now = DateTime.now();
final DateTime expiryTime =
now.add(Duration(seconds: int.parse(responseData['expiresIn'])));
final prefs = await SharedPreferences.getInstance();
prefs.setString('userId', responseData['localId']);
prefs.setString('email', responseData['email']);
prefs.setString('token', responseData['idToken']);
prefs.setString('refreshToken', responseData['refreshToken']);
prefs.setString('expiryTime', expiryTime.toIso8601String());
_userSubject.add(true);
_isLoading = false;
notifyListeners();
return {'success': true};
} else if (responseData['error']['message'] == 'EMAIL_EXISTS') {
message = 'Email is already exists.';
} else if (responseData['error']['message'] == 'OPERATION_NOT_ALLOWED') {
message = 'Password sign-in is disabled.';
} else if (responseData['error']['message'] ==
'TOO_MANY_ATTEMPTS_TRY_LATER') {
message =
'We have blocked all requests from this device due to unusual activity. Try again later.';
}
_isLoading = false;
notifyListeners();
return {
'success': false,
'message': message,
};
} catch (error) {
_isLoading = false;
notifyListeners();
return {'success': false, 'message': error};
}
}
void logout() async {
_todos = [];
_todo = null;
_filter = Filter.All;
_user = null;
_authTimer.cancel();
_userSubject.add(false);
final prefs = await SharedPreferences.getInstance();
prefs.clear();
}
void autoAuthentication() async {
final prefs = await SharedPreferences.getInstance();
final String token = prefs.getString('token');
if (token != null) {
final String expiryTimeString = prefs.getString('expiryTime');
final DateTime now = DateTime.now();
final parsedExpiryTime = DateTime.parse(expiryTimeString);
if (parsedExpiryTime.isBefore(now)) {
_user = null;
return;
}
_user = User(
id: prefs.getString('userId'),
email: prefs.getString('email'),
token: token,
);
final int tokenLifespan = parsedExpiryTime.difference(now).inSeconds;
setAuthTimeout(tokenLifespan);
_userSubject.add(true);
}
}
void tryRefreshToken() async {
final prefs = await SharedPreferences.getInstance();
final refreshToken = prefs.getString('refreshToken');
final Map<String, dynamic> formData = {
'grant_type': 'refresh_token',
'refresh_token': refreshToken
};
try {
final http.Response response = await http.post(
'https://securetoken.googleapis.com/v1/token?key=${Configure.ApiKey}',
body: json.encode(formData),
headers: {'Content-Type': 'application/json'},
);
final Map<String, dynamic> responseData = json.decode(response.body);
if (responseData.containsKey('id_token')) {
_user = User(
id: prefs.getString('userId'),
email: prefs.getString('email'),
token: responseData['id_token'],
);
setAuthTimeout(int.parse(responseData['expires_in']));
final DateTime now = DateTime.now();
final DateTime expiryTime =
now.add(Duration(seconds: int.parse(responseData['expires_in'])));
prefs.setString('token', responseData['id_token']);
prefs.setString('expiryTime', expiryTime.toIso8601String());
prefs.setString('refreshToken', responseData['refresh_token']);
return;
}
} catch (error) {}
logout();
}
void setAuthTimeout(int time) {
_authTimer = Timer(Duration(seconds: time), tryRefreshToken);
}
}
mixin SettingsModel on CoreModel {
Settings _settings;
PublishSubject<bool> _themeSubject = PublishSubject();
Settings get settings {
return _settings;
}
PublishSubject<bool> get themeSubject {
return _themeSubject;
}
void loadSettings() async {
final prefs = await SharedPreferences.getInstance();
final isDarkThemeUsed = _loadIsDarkThemeUsed(prefs);
_settings = Settings(
isShortcutsEnabled: _loadIsShortcutsEnabled(prefs),
isDarkThemeUsed: isDarkThemeUsed,
);
_themeSubject.add(isDarkThemeUsed);
}
bool _loadIsShortcutsEnabled(SharedPreferences prefs) {
return prefs.getKeys().contains('isShortcutsEnabled') &&
prefs.getBool('isShortcutsEnabled')
? true
: false;
}
bool _loadIsDarkThemeUsed(SharedPreferences prefs) {
return prefs.getKeys().contains('isDarkThemeUsed') &&
prefs.getBool('isDarkThemeUsed')
? true
: false;
}
Future toggleIsShortcutEnabled() async {
_isLoading = true;
notifyListeners();
final prefs = await SharedPreferences.getInstance();
prefs.setBool('isShortcutsEnabled', !_loadIsShortcutsEnabled(prefs));
_settings = Settings(
isShortcutsEnabled: _loadIsShortcutsEnabled(prefs),
isDarkThemeUsed: _loadIsDarkThemeUsed(prefs),
);
_isLoading = false;
notifyListeners();
}
Future toggleIsDarkThemeUsed() async {
_isLoading = true;
notifyListeners();
final prefs = await SharedPreferences.getInstance();
final isDarkThemeUsed = !_loadIsDarkThemeUsed(prefs);
prefs.setBool('isDarkThemeUsed', isDarkThemeUsed);
_themeSubject.add(isDarkThemeUsed);
_settings = Settings(
isShortcutsEnabled: _loadIsShortcutsEnabled(prefs),
isDarkThemeUsed: _loadIsDarkThemeUsed(prefs),
);
_isLoading = false;
notifyListeners();
}
}
================================================
FILE: lib/widgets/form_fields/priority_form_field.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter_todo/models/priority.dart';
import 'package:flutter_todo/widgets/helpers/priority_helper.dart';
class PriorityFormField extends FormField<Priority> {
PriorityFormField({
FormFieldSetter<Priority> onSaved,
Priority initialValue = Priority.Low,
}) : super(
onSaved: onSaved,
initialValue: initialValue,
builder: (FormFieldState<Priority> state) {
return Row(
children: Priority.values
.map((priority) => Container(
height: 60.0,
child: FlatButton(
color: PriorityHelper.getPriorityColor(priority),
child: state.value == priority
? Icon(Icons.check)
: null,
onPressed: () {
state.didChange(priority);
},
),
))
.toList(),
);
},
);
}
================================================
FILE: lib/widgets/form_fields/toggle_form_field.dart
================================================
import 'package:flutter/material.dart';
class ToggleFormField extends FormField<bool> {
ToggleFormField({
FormFieldSetter<bool> onSaved,
bool initialValue = false,
}) : super(
onSaved: onSaved,
initialValue: initialValue,
builder: (FormFieldState<bool> state) {
return Container(
height: 60.0,
child: FlatButton(
color: Colors.blue,
child: state.value
? Icon(Icons.check)
: Icon(Icons.check_box_outline_blank),
onPressed: () {
state.didChange(!state.value);
},
),
);
},
);
}
================================================
FILE: lib/widgets/helpers/confirm_dialog.dart
================================================
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_todo/widgets/ui_elements/rounded_button.dart';
class ConfirmDialog {
static Future<bool> show(BuildContext context, [String title]) async {
return await showDialog<bool>(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return SimpleDialog(
title: Text(title != null ? title : 'Are you sure to logout?'),
contentPadding: EdgeInsets.all(12.0),
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RoundedButton(
label: 'No',
onPressed: () {
Navigator.pop(context, false);
},
),
SizedBox(
width: 20.0,
),
RoundedButton(
label: 'Yes',
onPressed: () {
Navigator.pop(context, true);
},
),
],
),
],
);
},
);
}
}
================================================
FILE: lib/widgets/helpers/message_dialog.dart
================================================
import 'package:flutter/material.dart';
class MessageDialog {
static void show(
BuildContext context, {
String title = 'Something went wrong',
String message = 'Please try again!',
}) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(title),
content: Text(message),
actions: <Widget>[
FlatButton(
onPressed: () => Navigator.of(context).pop(),
child: Text('Okay'),
)
],
);
},
);
}
}
================================================
FILE: lib/widgets/helpers/priority_helper.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter_todo/models/priority.dart';
class PriorityHelper {
static Color getPriorityColor(Priority priority) {
switch (priority) {
case Priority.High:
return Colors.redAccent;
case Priority.Medium:
return Colors.amber;
default:
return Colors.lightGreen;
}
}
static Priority toPriority(String value) {
return Priority.values
.firstWhere((priority) => priority.toString() == value);
}
}
================================================
FILE: lib/widgets/todo/shortcuts_enabled_todo_fab.dart
================================================
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter_todo/models/priority.dart';
import 'package:flutter_todo/models/todo.dart';
import 'package:flutter_todo/scoped_models/app_model.dart';
class ShortcutsEnabledTodoFab extends StatefulWidget {
final AppModel model;
ShortcutsEnabledTodoFab(this.model);
@override
State<StatefulWidget> createState() {
return _ShortcutsEnabledTodoFabState();
}
}
class _ShortcutsEnabledTodoFabState extends State<ShortcutsEnabledTodoFab>
with TickerProviderStateMixin {
AppModel _model;
AnimationController _controller;
@override
void initState() {
_model = widget.model;
_controller = AnimationController(
vsync: this,
duration: Duration(milliseconds: 200),
);
super.initState();
}
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
height: 50.0,
child: ScaleTransition(
scale: CurvedAnimation(
parent: _controller,
curve: Interval(0.0, 1.0, curve: Curves.easeOut),
),
child: FloatingActionButton(
heroTag: 'low',
backgroundColor: Colors.lightGreen,
child: Icon(Icons.add),
mini: true,
onPressed: () {
_model.setCurrentTodo(Todo(
id: null,
title: '',
userId: _model.user.id,
priority: Priority.Low,
));
Navigator.pushNamed(context, '/editor');
},
),
),
),
Container(
height: 50.0,
child: ScaleTransition(
scale: CurvedAnimation(
parent: _controller,
curve: Interval(0.0, 0.6, curve: Curves.easeOut),
),
child: FloatingActionButton(
heroTag: 'medium',
backgroundColor: Colors.amber,
child: Icon(Icons.add),
mini: true,
onPressed: () {
_model.setCurrentTodo(Todo(
id: null,
title: '',
userId: _model.user.id,
priority: Priority.Medium,
));
Navigator.pushNamed(context, '/editor');
},
),
),
),
Container(
height: 50.0,
child: ScaleTransition(
scale: CurvedAnimation(
parent: _controller,
curve: Interval(0.0, 0.2, curve: Curves.easeOut),
),
child: FloatingActionButton(
heroTag: 'high',
backgroundColor: Colors.redAccent,
child: Icon(Icons.add),
mini: true,
onPressed: () {
_model.setCurrentTodo(Todo(
id: null,
title: '',
userId: _model.user.id,
priority: Priority.High,
));
Navigator.pushNamed(context, '/editor');
},
),
),
),
FloatingActionButton(
heroTag: 'main',
child: AnimatedBuilder(
animation: _controller,
builder: (BuildContext context, Widget child) {
return Transform(
alignment: FractionalOffset.center,
transform:
Matrix4.rotationZ(_controller.value * 0.75 * math.pi),
child: Icon(Icons.add),
);
},
),
onPressed: () {
if (_controller.isDismissed) {
_controller.forward();
} else {
_controller.reverse();
}
},
),
],
);
}
}
================================================
FILE: lib/widgets/todo/todo_card.dart
================================================
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter_todo/scoped_models/app_model.dart';
import 'package:flutter_todo/models/todo.dart';
import 'package:flutter_todo/widgets/helpers/priority_helper.dart';
class TodoCard extends StatelessWidget {
final Todo todo;
TodoCard(this.todo);
@override
Widget build(BuildContext context) {
return ScopedModelDescendant(
builder: (BuildContext context, Widget child, AppModel model) {
return Card(
child: Row(
children: <Widget>[
Container(
decoration: new BoxDecoration(
color: PriorityHelper.getPriorityColor(todo.priority),
borderRadius: new BorderRadius.only(
topLeft: const Radius.circular(4.0),
bottomLeft: const Radius.circular(4.0),
),
),
width: 40.0,
height: 80.0,
child: todo.isDone
? IconButton(
icon: Icon(Icons.check),
onPressed: () {
model.toggleDone(todo.id);
},
)
: IconButton(
icon: Icon(Icons.check_box_outline_blank),
onPressed: () {
model.toggleDone(todo.id);
},
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10.0),
child: Text(
todo.title,
style: TextStyle(
fontSize: 24.0,
decoration: todo.isDone
? TextDecoration.lineThrough
: TextDecoration.none),
),
),
),
IconButton(
icon: Icon(Icons.edit),
onPressed: () {
model.setCurrentTodo(todo);
Navigator.pushNamed(context, '/editor');
},
)
],
),
);
},
);
}
}
================================================
FILE: lib/widgets/todo/todo_list_view.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_todo/models/filter.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter_todo/scoped_models/app_model.dart';
import 'package:flutter_todo/models/todo.dart';
import 'package:flutter_todo/widgets/todo/todo_card.dart';
class TodoListView extends StatelessWidget {
Widget _buildEmptyText(AppModel model) {
String emptyText;
switch (model.filter) {
case Filter.All:
emptyText = 'This is boring here. \r\nCreate a todo to make it crowd.';
break;
case Filter.Done:
emptyText =
'This is boring here. \r\nCreate a Done todo to make it crowd.';
break;
case Filter.NotDone:
emptyText =
'This is boring here. \r\nCreate a Not Done todo to make it crowd.';
break;
}
Widget svg = new SvgPicture.asset(
'assets/todo_list.svg',
width: 200,
);
return Container(
color: Color.fromARGB(16, 0, 0, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
svg,
SizedBox(
height: 40.0,
),
Text(
emptyText,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20,
),
),
],
),
);
}
Widget _buildListView(AppModel model) {
return ListView.builder(
itemCount: model.todos.length,
itemBuilder: (BuildContext context, int index) {
Todo todo = model.todos[index];
return Dismissible(
key: Key(todo.id),
onDismissed: (DismissDirection direction) {
model.removeTodo(todo.id);
},
child: TodoCard(todo),
background: Container(color: Colors.red),
);
},
);
}
@override
Widget build(BuildContext context) {
return ScopedModelDescendant<AppModel>(
builder: (BuildContext context, Widget child, AppModel model) {
Widget todoCards = model.todos.length > 0
? _buildListView(model)
: _buildEmptyText(model);
return todoCards;
},
);
}
}
================================================
FILE: lib/widgets/ui_elements/loading_modal.dart
================================================
import 'package:flutter/material.dart';
class LoadingModal extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Stack(
children: [
new Opacity(
opacity: 0.3,
child: const ModalBarrier(dismissible: false, color: Colors.grey),
),
Center(
child: new CircularProgressIndicator(),
),
],
);
}
}
================================================
FILE: lib/widgets/ui_elements/rounded_button.dart
================================================
import 'package:flutter/material.dart';
class RoundedButton extends StatelessWidget {
final String label;
final Icon icon;
final Function onPressed;
RoundedButton({
this.icon,
@required this.label,
@required this.onPressed,
});
@override
Widget build(BuildContext context) {
return SizedBox(
width: 120.0,
child: this.icon != null
? FlatButton.icon(
color: Colors.blue,
icon: icon,
label: Text(label),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(8.0)),
),
onPressed: onPressed,
)
: FlatButton(
color: Colors.blue,
child: Text(label),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(8.0)),
),
onPressed: onPressed,
),
);
}
}
================================================
FILE: pubspec.yaml
================================================
name: flutter_todo
description: A new Flutter project.
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1
environment:
sdk: '>=2.0.0-dev.68.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
http:
cupertino_icons: ^0.1.2
scoped_model: ^1.0.1
shared_preferences: ^0.5.3+4
rxdart: ^0.22.2
flutter_svg: ^0.14.1
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/todo_list.svg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.io/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages
gitextract_ixsgoy7n/ ├── .flutter-plugins ├── .gitignore ├── .vscode/ │ └── launch.json ├── LICENSE ├── README.md ├── android/ │ ├── .gitignore │ ├── app/ │ │ ├── build.gradle │ │ └── src/ │ │ └── main/ │ │ ├── AndroidManifest.xml │ │ ├── java/ │ │ │ └── me/ │ │ │ └── tuannguyen/ │ │ │ └── fluttertodo/ │ │ │ └── MainActivity.java │ │ └── res/ │ │ ├── drawable/ │ │ │ └── launch_background.xml │ │ └── values/ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle/ │ │ └── wrapper/ │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradle.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── flutter_todo.iml ├── flutter_todo_android.iml ├── ios/ │ ├── .gitignore │ ├── Flutter/ │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── flutter_export_environment.sh │ ├── Podfile │ ├── Runner/ │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.imageset/ │ │ │ ├── Contents.json │ │ │ └── README.md │ │ ├── Base.lproj/ │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── main.m │ ├── Runner.xcodeproj/ │ │ ├── project.pbxproj │ │ ├── project.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── xcschemes/ │ │ └── Runner.xcscheme │ └── Runner.xcworkspace/ │ ├── contents.xcworkspacedata │ └── xcshareddata/ │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings ├── lib/ │ ├── main.dart │ ├── models/ │ │ ├── Priority.dart │ │ ├── Todo.dart │ │ ├── filter.dart │ │ ├── settings.dart │ │ └── user.dart │ ├── pages/ │ │ ├── auth/ │ │ │ └── auth_page.dart │ │ ├── register/ │ │ │ └── register_page.dart │ │ ├── settings/ │ │ │ └── settings_page.dart │ │ └── todo/ │ │ ├── todo_editor_page.dart │ │ └── todo_list_page.dart │ ├── scoped_models/ │ │ ├── app_model.dart │ │ └── connected_model.dart │ └── widgets/ │ ├── form_fields/ │ │ ├── priority_form_field.dart │ │ └── toggle_form_field.dart │ ├── helpers/ │ │ ├── confirm_dialog.dart │ │ ├── message_dialog.dart │ │ └── priority_helper.dart │ ├── todo/ │ │ ├── shortcuts_enabled_todo_fab.dart │ │ ├── todo_card.dart │ │ └── todo_list_view.dart │ └── ui_elements/ │ ├── loading_modal.dart │ └── rounded_button.dart └── pubspec.yaml
SYMBOL INDEX (104 symbols across 24 files)
FILE: android/app/src/main/java/me/tuannguyen/fluttertodo/MainActivity.java
class MainActivity (line 7) | public class MainActivity extends FlutterActivity {
method onCreate (line 8) | @Override
FILE: lib/main.dart
function main (line 13) | void main()
class TodoApp (line 17) | class TodoApp extends StatefulWidget {
method createState (line 19) | State<StatefulWidget> createState()
class _TodoAppState (line 24) | class _TodoAppState extends State<TodoApp> {
method initState (line 30) | void initState()
method build (line 52) | Widget build(BuildContext context)
FILE: lib/models/Priority.dart
type Priority (line 1) | enum Priority {
FILE: lib/models/Todo.dart
class Todo (line 5) | class Todo {
FILE: lib/models/filter.dart
type Filter (line 1) | enum Filter {
FILE: lib/models/settings.dart
class Settings (line 3) | class Settings {
FILE: lib/models/user.dart
class User (line 3) | class User {
FILE: lib/pages/auth/auth_page.dart
class AuthPage (line 11) | class AuthPage extends StatefulWidget {
method createState (line 13) | State<StatefulWidget> createState()
class _AuthPageState (line 18) | class _AuthPageState extends State<AuthPage> {
method _authenticate (line 26) | void _authenticate(AppModel model)
method _buildEmailField (line 42) | Widget _buildEmailField()
method _buildPasswordField (line 60) | Widget _buildPasswordField()
method _buildButtonRow (line 77) | Widget _buildButtonRow(AppModel model)
method _buildPageContent (line 100) | Widget _buildPageContent(AppModel model)
method build (line 136) | Widget build(BuildContext context)
FILE: lib/pages/register/register_page.dart
class RegisterPage (line 11) | class RegisterPage extends StatefulWidget {
method createState (line 13) | State<StatefulWidget> createState()
class _RegisterPageState (line 18) | class _RegisterPageState extends State<RegisterPage> {
method _register (line 27) | void _register(AppModel model)
method _buildEmailField (line 44) | Widget _buildEmailField()
method _buildConfirmPasswordField (line 62) | Widget _buildConfirmPasswordField()
method _buildPasswordField (line 76) | Widget _buildPasswordField()
method _buildButtonRow (line 94) | Widget _buildButtonRow(AppModel model)
method _buildPageContent (line 109) | Widget _buildPageContent(AppModel model)
method build (line 146) | Widget build(BuildContext context)
FILE: lib/pages/settings/settings_page.dart
class SettingsPage (line 9) | class SettingsPage extends StatefulWidget {
method createState (line 15) | State<StatefulWidget> createState()
class _SettingsPageState (line 20) | class _SettingsPageState extends State<SettingsPage> {
method _buildAppBar (line 21) | Widget _buildAppBar(BuildContext context, AppModel model)
method _buildPageContent (line 42) | Widget _buildPageContent(AppModel model)
method build (line 71) | Widget build(BuildContext context)
FILE: lib/pages/todo/todo_editor_page.dart
class TodoEditorPage (line 15) | class TodoEditorPage extends StatefulWidget {
method createState (line 17) | State<StatefulWidget> createState()
class _TodoEditorPageState (line 22) | class _TodoEditorPageState extends State<TodoEditorPage> {
method _buildAppBar (line 31) | Widget _buildAppBar(AppModel model)
method _buildFloatingActionButton (line 52) | Widget _buildFloatingActionButton(AppModel model)
method _buildTitleField (line 99) | Widget _buildTitleField(Todo todo)
method _buildContentField (line 116) | Widget _buildContentField(Todo todo)
method _buildOthers (line 127) | Widget _buildOthers(Todo todo)
method _buildForm (line 150) | Widget _buildForm(AppModel model)
method _buildPageContent (line 173) | Widget _buildPageContent(AppModel model)
method build (line 187) | Widget build(BuildContext context)
FILE: lib/pages/todo/todo_list_page.dart
class TodoListPage (line 13) | class TodoListPage extends StatefulWidget {
method createState (line 19) | State<StatefulWidget> createState()
class _TodoListPageState (line 24) | class _TodoListPageState extends State<TodoListPage> {
method initState (line 26) | void initState()
method _buildAppBar (line 32) | Widget _buildAppBar(AppModel model)
method _buildFloatingActionButton (line 67) | Widget _buildFloatingActionButton(AppModel model)
method _buildAllFlatButton (line 82) | Widget _buildAllFlatButton(AppModel model)
method _buildDoneFlatButton (line 107) | Widget _buildDoneFlatButton(AppModel model)
method _buildNotDoneFlatButton (line 133) | Widget _buildNotDoneFlatButton(AppModel model)
method _buildBottomAppBar (line 161) | Widget _buildBottomAppBar(AppModel model)
method _buildPageContent (line 181) | Widget _buildPageContent(AppModel model)
method build (line 192) | Widget build(BuildContext context)
FILE: lib/scoped_models/app_model.dart
class AppModel (line 5) | class AppModel extends Model
FILE: lib/scoped_models/connected_model.dart
function applyFilter (line 53) | void applyFilter(Filter filter)
function setCurrentTodo (line 58) | void setCurrentTodo(Todo todo)
function fetchTodos (line 62) | Future fetchTodos()
function createTodo (line 107) | Future<bool> createTodo(
function updateTodo (line 157) | Future<bool> updateTodo(
function removeTodo (line 206) | Future<bool> removeTodo(String id)
function toggleDone (line 239) | Future<bool> toggleDone(String id)
function authenticate (line 302) | Future<Map<String, dynamic>> authenticate(
function register (line 372) | Future<Map<String, dynamic>> register(String email, String password)
function logout (line 443) | void logout()
function autoAuthentication (line 457) | void autoAuthentication()
function tryRefreshToken (line 485) | void tryRefreshToken()
function setAuthTimeout (line 527) | void setAuthTimeout(int time)
function loadSettings (line 544) | void loadSettings()
function _loadIsShortcutsEnabled (line 556) | bool _loadIsShortcutsEnabled(SharedPreferences prefs)
function _loadIsDarkThemeUsed (line 563) | bool _loadIsDarkThemeUsed(SharedPreferences prefs)
function toggleIsShortcutEnabled (line 570) | Future toggleIsShortcutEnabled()
function toggleIsDarkThemeUsed (line 586) | Future toggleIsDarkThemeUsed()
FILE: lib/widgets/form_fields/priority_form_field.dart
class PriorityFormField (line 6) | class PriorityFormField extends FormField<Priority> {
FILE: lib/widgets/form_fields/toggle_form_field.dart
class ToggleFormField (line 3) | class ToggleFormField extends FormField<bool> {
FILE: lib/widgets/helpers/confirm_dialog.dart
class ConfirmDialog (line 7) | class ConfirmDialog {
method show (line 8) | Future<bool> show(BuildContext context, [String title])
FILE: lib/widgets/helpers/message_dialog.dart
class MessageDialog (line 3) | class MessageDialog {
method show (line 4) | void show(
FILE: lib/widgets/helpers/priority_helper.dart
class PriorityHelper (line 5) | class PriorityHelper {
method getPriorityColor (line 6) | Color getPriorityColor(Priority priority)
method toPriority (line 19) | Priority toPriority(String value)
FILE: lib/widgets/todo/shortcuts_enabled_todo_fab.dart
class ShortcutsEnabledTodoFab (line 9) | class ShortcutsEnabledTodoFab extends StatefulWidget {
method createState (line 15) | State<StatefulWidget> createState()
class _ShortcutsEnabledTodoFabState (line 20) | class _ShortcutsEnabledTodoFabState extends State<ShortcutsEnabledTodoFab>
method initState (line 26) | void initState()
method build (line 38) | Widget build(BuildContext context)
FILE: lib/widgets/todo/todo_card.dart
class TodoCard (line 9) | class TodoCard extends StatelessWidget {
method build (line 15) | Widget build(BuildContext context)
FILE: lib/widgets/todo/todo_list_view.dart
class TodoListView (line 11) | class TodoListView extends StatelessWidget {
method _buildEmptyText (line 12) | Widget _buildEmptyText(AppModel model)
method _buildListView (line 58) | Widget _buildListView(AppModel model)
method build (line 77) | Widget build(BuildContext context)
FILE: lib/widgets/ui_elements/loading_modal.dart
class LoadingModal (line 3) | class LoadingModal extends StatelessWidget {
method build (line 5) | Widget build(BuildContext context)
FILE: lib/widgets/ui_elements/rounded_button.dart
class RoundedButton (line 3) | class RoundedButton extends StatelessWidget {
method build (line 15) | Widget build(BuildContext context)
Condensed preview — 65 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (136K chars).
[
{
"path": ".flutter-plugins",
"chars": 117,
"preview": "shared_preferences=/Volumes/Storage/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.3+4/\n"
},
{
"path": ".gitignore",
"chars": 370,
"preview": "# See https://www.dartlang.org/guides/libraries/private-files\n\n# Files and directories created by pub\n.dart_tool/\n.packa"
},
{
"path": ".vscode/launch.json",
"chars": 369,
"preview": "{\n // Use IntelliSense to learn about possible attributes.\n // Hover to view descriptions of existing attributes.\n"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.md",
"chars": 911,
"preview": "# Flutter Todo\n\nYet another Todo app, now using Flutter.\n\n## Getting Started\n\nThis Todo app is implemented using Flutter"
},
{
"path": "android/.gitignore",
"chars": 136,
"preview": "*.iml\n*.class\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\nGeneratedPlugin"
},
{
"path": "android/app/build.gradle",
"chars": 1874,
"preview": "def localProperties = new Properties()\ndef localPropertiesFile = rootProject.file('local.properties')\nif (localPropertie"
},
{
"path": "android/app/src/main/AndroidManifest.xml",
"chars": 1994,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"me.tuannguyen.fluttertodo\">\n\n <!-- "
},
{
"path": "android/app/src/main/java/me/tuannguyen/fluttertodo/MainActivity.java",
"chars": 370,
"preview": "package me.tuannguyen.fluttertodo;\n\nimport android.os.Bundle;\nimport io.flutter.app.FlutterActivity;\nimport io.flutter.p"
},
{
"path": "android/app/src/main/res/drawable/launch_background.xml",
"chars": 434,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmln"
},
{
"path": "android/app/src/main/res/values/styles.xml",
"chars": 361,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Black.NoTi"
},
{
"path": "android/build.gradle",
"chars": 470,
"preview": "buildscript {\n repositories {\n google()\n jcenter()\n }\n\n dependencies {\n classpath 'com.and"
},
{
"path": "android/gradle/wrapper/gradle-wrapper.properties",
"chars": 230,
"preview": "#Wed Sep 26 21:25:02 ICT 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
},
{
"path": "android/gradle.properties",
"chars": 29,
"preview": "org.gradle.jvmargs=-Xmx1536M\n"
},
{
"path": "android/gradlew",
"chars": 4971,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "android/gradlew.bat",
"chars": 2314,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
},
{
"path": "android/settings.gradle",
"chars": 484,
"preview": "include ':app'\n\ndef flutterProjectRoot = rootProject.projectDir.parentFile.toPath()\n\ndef plugins = new Properties()\ndef "
},
{
"path": "flutter_todo.iml",
"chars": 896,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "flutter_todo_android.iml",
"chars": 1451,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"FacetManager\">\n <fa"
},
{
"path": "ios/.gitignore",
"chars": 512,
"preview": ".idea/\n.vagrant/\n.sconsign.dblite\n.svn/\n\n.DS_Store\n*.swp\nprofile\n\nDerivedData/\nbuild/\nGeneratedPluginRegistrant.h\nGenera"
},
{
"path": "ios/Flutter/AppFrameworkInfo.plist",
"chars": 773,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Flutter/Debug.xcconfig",
"chars": 106,
"preview": "#include \"Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"\n#include \"Generated.xcconfig\"\n"
},
{
"path": "ios/Flutter/Release.xcconfig",
"chars": 108,
"preview": "#include \"Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"\n#include \"Generated.xcconfig\"\n"
},
{
"path": "ios/Flutter/flutter_export_environment.sh",
"chars": 601,
"preview": "#!/bin/sh\n# This is a generated file; do not edit or check into version control.\nexport \"FLUTTER_ROOT=/Volumes/Storage/D"
},
{
"path": "ios/Podfile",
"chars": 2114,
"preview": "# Uncomment this line to define a global platform for your project\n# platform :ios, '9.0'\n\n# CocoaPods analytics sends n"
},
{
"path": "ios/Runner/AppDelegate.h",
"chars": 103,
"preview": "#import <Flutter/Flutter.h>\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : FlutterAppDelegate\n\n@end\n"
},
{
"path": "ios/Runner/AppDelegate.m",
"chars": 424,
"preview": "#include \"AppDelegate.h\"\n#include \"GeneratedPluginRegistrant.h\"\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApp"
},
{
"path": "ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 2519,
"preview": "{\n \"images\" : [\n {\n \"size\" : \"20x20\",\n \"idiom\" : \"iphone\",\n \"filename\" : \"Icon-App-20x20@2x.png\",\n "
},
{
"path": "ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json",
"chars": 391,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"LaunchImage.png\",\n \"scale\" : \"1x\"\n },\n "
},
{
"path": "ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md",
"chars": 336,
"preview": "# Launch Screen Assets\n\nYou can customize the launch screen with your own desired assets by replacing the image files in"
},
{
"path": "ios/Runner/Base.lproj/LaunchScreen.storyboard",
"chars": 2377,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "ios/Runner/Base.lproj/Main.storyboard",
"chars": 1605,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "ios/Runner/Info.plist",
"chars": 1510,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Runner/main.m",
"chars": 226,
"preview": "#import <Flutter/Flutter.h>\n#import <UIKit/UIKit.h>\n#import \"AppDelegate.h\"\n\nint main(int argc, char* argv[]) {\n @autor"
},
{
"path": "ios/Runner.xcodeproj/project.pbxproj",
"chars": 21184,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 152,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:Runner.xcodepr"
},
{
"path": "ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
"chars": 3331,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0910\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "ios/Runner.xcworkspace/contents.xcworkspacedata",
"chars": 224,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:Runner.xcodepr"
},
{
"path": "ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
"chars": 243,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "lib/main.dart",
"chars": 2328,
"preview": "import 'package:flutter/material.dart';\n\nimport 'package:scoped_model/scoped_model.dart';\n\nimport 'package:flutter_todo/"
},
{
"path": "lib/models/Priority.dart",
"chars": 43,
"preview": "enum Priority {\n High,\n Medium,\n Low,\n}\n"
},
{
"path": "lib/models/Todo.dart",
"chars": 414,
"preview": "import 'package:flutter/material.dart';\n\nimport 'package:flutter_todo/models/priority.dart';\n\nclass Todo {\n final Strin"
},
{
"path": "lib/models/filter.dart",
"chars": 42,
"preview": "enum Filter {\n All,\n Done,\n NotDone,\n}\n"
},
{
"path": "lib/models/settings.dart",
"chars": 218,
"preview": "import 'package:flutter/material.dart';\n\nclass Settings {\n final bool isShortcutsEnabled;\n final bool isDarkThemeUsed;"
},
{
"path": "lib/models/user.dart",
"chars": 210,
"preview": "import 'package:flutter/material.dart';\n\nclass User {\n final String id;\n final String email;\n final String token;\n\n "
},
{
"path": "lib/pages/auth/auth_page.dart",
"chars": 3961,
"preview": "import 'package:flutter/material.dart';\n\nimport 'package:scoped_model/scoped_model.dart';\n\nimport 'package:flutter_todo/"
},
{
"path": "lib/pages/register/register_page.dart",
"chars": 4322,
"preview": "import 'package:flutter/material.dart';\n\nimport 'package:scoped_model/scoped_model.dart';\n\nimport 'package:flutter_todo/"
},
{
"path": "lib/pages/settings/settings_page.dart",
"chars": 2148,
"preview": "import 'package:flutter/material.dart';\n\nimport 'package:scoped_model/scoped_model.dart';\n\nimport 'package:flutter_todo/"
},
{
"path": "lib/pages/todo/todo_editor_page.dart",
"chars": 5343,
"preview": "import 'package:flutter/material.dart';\n\nimport 'package:scoped_model/scoped_model.dart';\n\nimport 'package:flutter_todo/"
},
{
"path": "lib/pages/todo/todo_list_page.dart",
"chars": 5397,
"preview": "import 'package:flutter/material.dart';\n\nimport 'package:scoped_model/scoped_model.dart';\n\nimport 'package:flutter_todo/"
},
{
"path": "lib/scoped_models/app_model.dart",
"chars": 206,
"preview": "import 'package:scoped_model/scoped_model.dart';\n\nimport 'package:flutter_todo/scoped_models/connected_model.dart';\n\ncla"
},
{
"path": "lib/scoped_models/connected_model.dart",
"chars": 15695,
"preview": "import 'dart:async';\nimport 'dart:convert';\n\nimport 'package:http/http.dart' as http;\nimport 'package:scoped_model/scope"
},
{
"path": "lib/widgets/form_fields/priority_form_field.dart",
"chars": 1115,
"preview": "import 'package:flutter/material.dart';\n\nimport 'package:flutter_todo/models/priority.dart';\nimport 'package:flutter_tod"
},
{
"path": "lib/widgets/form_fields/toggle_form_field.dart",
"chars": 724,
"preview": "import 'package:flutter/material.dart';\n\nclass ToggleFormField extends FormField<bool> {\n ToggleFormField({\n FormFie"
},
{
"path": "lib/widgets/helpers/confirm_dialog.dart",
"chars": 1181,
"preview": "import 'dart:async';\n\nimport 'package:flutter/material.dart';\n\nimport 'package:flutter_todo/widgets/ui_elements/rounded_"
},
{
"path": "lib/widgets/helpers/message_dialog.dart",
"chars": 583,
"preview": "import 'package:flutter/material.dart';\n\nclass MessageDialog {\n static void show(\n BuildContext context, {\n Strin"
},
{
"path": "lib/widgets/helpers/priority_helper.dart",
"chars": 515,
"preview": "import 'package:flutter/material.dart';\n\nimport 'package:flutter_todo/models/priority.dart';\n\nclass PriorityHelper {\n s"
},
{
"path": "lib/widgets/todo/shortcuts_enabled_todo_fab.dart",
"chars": 3921,
"preview": "import 'dart:math' as math;\n\nimport 'package:flutter/material.dart';\n\nimport 'package:flutter_todo/models/priority.dart'"
},
{
"path": "lib/widgets/todo/todo_card.dart",
"chars": 2286,
"preview": "import 'package:flutter/material.dart';\n\nimport 'package:scoped_model/scoped_model.dart';\n\nimport 'package:flutter_todo/"
},
{
"path": "lib/widgets/todo/todo_list_view.dart",
"chars": 2312,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter_svg/flutter_svg.dart';\nimport 'package:flutter_todo/mode"
},
{
"path": "lib/widgets/ui_elements/loading_modal.dart",
"chars": 405,
"preview": "import 'package:flutter/material.dart';\n\nclass LoadingModal extends StatelessWidget {\n @override\n Widget build(BuildCo"
},
{
"path": "lib/widgets/ui_elements/rounded_button.dart",
"chars": 969,
"preview": "import 'package:flutter/material.dart';\n\nclass RoundedButton extends StatelessWidget {\n final String label;\n final Ico"
},
{
"path": "pubspec.yaml",
"chars": 2358,
"preview": "name: flutter_todo\ndescription: A new Flutter project.\n\n# The following defines the version and build number for your ap"
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the tuannguyendotme/flutter_todo GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 65 files (122.0 KB), approximately 33.3k tokens, and a symbol index with 104 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.