diff --git a/best_flutter_ui_templates/.DS_Store b/best_flutter_ui_templates/.DS_Store new file mode 100644 index 00000000..f63c9a00 Binary files /dev/null and b/best_flutter_ui_templates/.DS_Store differ diff --git a/best_flutter_ui_templates/.gitignore b/best_flutter_ui_templates/.gitignore deleted file mode 100644 index 1ba9c339..00000000 --- a/best_flutter_ui_templates/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Exceptions to above rules. -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/best_flutter_ui_templates/.metadata b/best_flutter_ui_templates/.metadata deleted file mode 100644 index 0c50e4f8..00000000 --- a/best_flutter_ui_templates/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f - channel: stable - -project_type: app diff --git a/best_flutter_ui_templates/android/.DS_Store b/best_flutter_ui_templates/android/.DS_Store new file mode 100644 index 00000000..f4ece81c Binary files /dev/null and b/best_flutter_ui_templates/android/.DS_Store differ diff --git a/best_flutter_ui_templates/android/.gitignore b/best_flutter_ui_templates/android/.gitignore deleted file mode 100644 index bc2100d8..00000000 --- a/best_flutter_ui_templates/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/best_flutter_ui_templates/android/app/.DS_Store b/best_flutter_ui_templates/android/app/.DS_Store new file mode 100644 index 00000000..08547a46 Binary files /dev/null and b/best_flutter_ui_templates/android/app/.DS_Store differ diff --git a/best_flutter_ui_templates/android/app/build.gradle b/best_flutter_ui_templates/android/app/build.gradle index 6b6405c4..cd5401e8 100644 --- a/best_flutter_ui_templates/android/app/build.gradle +++ b/best_flutter_ui_templates/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -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' @@ -21,14 +22,10 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + compileSdkVersion 34 + // Removed: ndkVersion flutter.ndkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -46,8 +43,8 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.best_flutter_ui_templates" - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion + minSdkVersion 21 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } @@ -61,10 +58,6 @@ android { } } -flutter { - source '../..' -} - dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } diff --git a/best_flutter_ui_templates/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/best_flutter_ui_templates/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java new file mode 100644 index 00000000..539ab022 --- /dev/null +++ b/best_flutter_ui_templates/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -0,0 +1,19 @@ +package io.flutter.plugins; + +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import io.flutter.Log; + +import io.flutter.embedding.engine.FlutterEngine; + +/** + * Generated file. Do not edit. + * This file is generated by the Flutter tool based on the + * plugins that support the Android platform. + */ +@Keep +public final class GeneratedPluginRegistrant { + private static final String TAG = "GeneratedPluginRegistrant"; + public static void registerWith(@NonNull FlutterEngine flutterEngine) { + } +} diff --git a/best_flutter_ui_templates/android/build.gradle b/best_flutter_ui_templates/android/build.gradle index 31e95773..d40b1b76 100644 --- a/best_flutter_ui_templates/android/build.gradle +++ b/best_flutter_ui_templates/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.10' repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -14,7 +14,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } } @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { - delete rootProject.buildDir +tasks.register("clean", Delete) { + delete rootProject.layout.buildDirectory } diff --git a/best_flutter_ui_templates/android/gradle/wrapper/gradle-wrapper.jar b/best_flutter_ui_templates/android/gradle/wrapper/gradle-wrapper.jar new file mode 100755 index 00000000..13372aef Binary files /dev/null and b/best_flutter_ui_templates/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/best_flutter_ui_templates/android/gradle/wrapper/gradle-wrapper.properties b/best_flutter_ui_templates/android/gradle/wrapper/gradle-wrapper.properties index cc5527d7..db18181a 100644 --- a/best_flutter_ui_templates/android/gradle/wrapper/gradle-wrapper.properties +++ b/best_flutter_ui_templates/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/best_flutter_ui_templates/android/gradlew b/best_flutter_ui_templates/android/gradlew new file mode 100755 index 00000000..9d82f789 --- /dev/null +++ b/best_flutter_ui_templates/android/gradlew @@ -0,0 +1,160 @@ +#!/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 "$@" diff --git a/best_flutter_ui_templates/android/gradlew.bat b/best_flutter_ui_templates/android/gradlew.bat new file mode 100755 index 00000000..aec99730 --- /dev/null +++ b/best_flutter_ui_templates/android/gradlew.bat @@ -0,0 +1,90 @@ +@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 diff --git a/best_flutter_ui_templates/android/local.properties b/best_flutter_ui_templates/android/local.properties new file mode 100644 index 00000000..a249bf39 --- /dev/null +++ b/best_flutter_ui_templates/android/local.properties @@ -0,0 +1,5 @@ +sdk.dir=/Users/sidney/Library/Android/sdk +flutter.sdk=/Users/sidney/Develop/flutter +flutter.buildMode=debug +flutter.versionName=1.0.0 +flutter.versionCode=1 \ No newline at end of file diff --git a/best_flutter_ui_templates/android/settings.gradle b/best_flutter_ui_templates/android/settings.gradle index 5a2f14fb..f414deaf 100644 --- a/best_flutter_ui_templates/android/settings.gradle +++ b/best_flutter_ui_templates/android/settings.gradle @@ -1,3 +1,21 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + include ':app' def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() diff --git a/best_flutter_ui_templates/assets/.DS_Store b/best_flutter_ui_templates/assets/.DS_Store new file mode 100644 index 00000000..0908f19b Binary files /dev/null and b/best_flutter_ui_templates/assets/.DS_Store differ diff --git a/best_flutter_ui_templates/ios/.DS_Store b/best_flutter_ui_templates/ios/.DS_Store new file mode 100644 index 00000000..1e74ea72 Binary files /dev/null and b/best_flutter_ui_templates/ios/.DS_Store differ diff --git a/best_flutter_ui_templates/lib/.DS_Store b/best_flutter_ui_templates/lib/.DS_Store new file mode 100644 index 00000000..8ccade2d Binary files /dev/null and b/best_flutter_ui_templates/lib/.DS_Store differ diff --git a/best_flutter_ui_templates/lib/app_theme.dart b/best_flutter_ui_templates/lib/app_theme.dart index 0946edc3..ee54db4b 100644 --- a/best_flutter_ui_templates/lib/app_theme.dart +++ b/best_flutter_ui_templates/lib/app_theme.dart @@ -20,16 +20,17 @@ class AppTheme { static const String fontName = 'WorkSans'; static const TextTheme textTheme = TextTheme( - headline4: display1, - headline5: headline, - headline6: title, - subtitle2: subtitle, - bodyText2: body2, - bodyText1: body1, - caption: caption, + headlineMedium: display1, // headline4 -> headlineMedium + headlineSmall: headline, // headline5 -> headlineSmall + titleLarge: title, // headline6 -> titleLarge + titleSmall: subtitle, // subtitle2 -> titleSmall + bodyMedium: body2, // bodyText2 -> bodyMedium + bodyLarge: body1, // bodyText1 -> bodyLarge + bodySmall: caption, // caption -> bodySmall ); - static const TextStyle display1 = TextStyle( // h4 -> display1 + static const TextStyle display1 = TextStyle( + // h4 -> display1 fontFamily: fontName, fontWeight: FontWeight.bold, fontSize: 36, @@ -38,7 +39,8 @@ class AppTheme { color: darkerText, ); - static const TextStyle headline = TextStyle( // h5 -> headline + static const TextStyle headline = TextStyle( + // h5 -> headline fontFamily: fontName, fontWeight: FontWeight.bold, fontSize: 24, @@ -46,7 +48,8 @@ class AppTheme { color: darkerText, ); - static const TextStyle title = TextStyle( // h6 -> title + static const TextStyle title = TextStyle( + // h6 -> title fontFamily: fontName, fontWeight: FontWeight.bold, fontSize: 16, @@ -54,7 +57,8 @@ class AppTheme { color: darkerText, ); - static const TextStyle subtitle = TextStyle( // subtitle2 -> subtitle + static const TextStyle subtitle = TextStyle( + // subtitle2 -> subtitle fontFamily: fontName, fontWeight: FontWeight.w400, fontSize: 14, @@ -62,7 +66,8 @@ class AppTheme { color: darkText, ); - static const TextStyle body2 = TextStyle( // body1 -> body2 + static const TextStyle body2 = TextStyle( + // body1 -> body2 fontFamily: fontName, fontWeight: FontWeight.w400, fontSize: 14, @@ -70,7 +75,8 @@ class AppTheme { color: darkText, ); - static const TextStyle body1 = TextStyle( // body2 -> body1 + static const TextStyle body1 = TextStyle( + // body2 -> body1 fontFamily: fontName, fontWeight: FontWeight.w400, fontSize: 16, @@ -78,12 +84,12 @@ class AppTheme { color: darkText, ); - static const TextStyle caption = TextStyle( // Caption -> caption + static const TextStyle caption = TextStyle( + // Caption -> caption fontFamily: fontName, fontWeight: FontWeight.w400, fontSize: 12, letterSpacing: 0.2, color: lightText, // was lightText ); - } diff --git a/best_flutter_ui_templates/lib/design_course/design_course_app_theme.dart b/best_flutter_ui_templates/lib/design_course/design_course_app_theme.dart index 3604e505..52e45b3a 100644 --- a/best_flutter_ui_templates/lib/design_course/design_course_app_theme.dart +++ b/best_flutter_ui_templates/lib/design_course/design_course_app_theme.dart @@ -19,13 +19,13 @@ class DesignCourseAppTheme { static const Color spacer = Color(0xFFF2F2F2); static const TextTheme textTheme = TextTheme( - headline4: display1, - headline5: headline, - headline6: title, - subtitle2: subtitle, - bodyText1: body2, - bodyText2: body1, - caption: caption, + headlineMedium: display1, // headline4 -> headlineMedium + headlineSmall: headline, // headline5 -> headlineSmall + titleLarge: title, // headline6 -> titleLarge + titleSmall: subtitle, // subtitle2 -> titleSmall + bodyLarge: body2, // bodyText1 -> bodyLarge + bodyMedium: body1, // bodyText2 -> bodyMedium + bodySmall: caption, // caption -> bodySmall ); static const TextStyle display1 = TextStyle( diff --git a/best_flutter_ui_templates/lib/fitness_app/fitness_app_theme.dart b/best_flutter_ui_templates/lib/fitness_app/fitness_app_theme.dart index 2c9a99d3..b711b1bf 100644 --- a/best_flutter_ui_templates/lib/fitness_app/fitness_app_theme.dart +++ b/best_flutter_ui_templates/lib/fitness_app/fitness_app_theme.dart @@ -21,13 +21,13 @@ class FitnessAppTheme { static const String fontName = 'Roboto'; static const TextTheme textTheme = TextTheme( - headline4: display1, - headline5: headline, - headline6: title, - subtitle2: subtitle, - bodyText2: body2, - bodyText1: body1, - caption: caption, + headlineMedium: display1, // headline4 -> headlineMedium + headlineSmall: headline, // headline5 -> headlineSmall + titleLarge: title, // headline6 -> titleLarge + titleSmall: subtitle, // subtitle2 -> titleSmall + bodyMedium: body2, // bodyText2 -> bodyMedium + bodyLarge: body1, // bodyText1 -> bodyLarge + bodySmall: caption, // caption -> bodySmall ); static const TextStyle display1 = TextStyle( diff --git a/best_flutter_ui_templates/lib/fitness_app/ui_view/title_view.dart b/best_flutter_ui_templates/lib/fitness_app/ui_view/title_view.dart index c59a2895..41514557 100644 --- a/best_flutter_ui_templates/lib/fitness_app/ui_view/title_view.dart +++ b/best_flutter_ui_templates/lib/fitness_app/ui_view/title_view.dart @@ -9,8 +9,8 @@ class TitleView extends StatelessWidget { const TitleView( {Key? key, - this.titleTxt: "", - this.subTxt: "", + this.titleTxt = "", + this.subTxt = "", this.animationController, this.animation}) : super(key: key); diff --git a/best_flutter_ui_templates/lib/hotel_booking/calendar_popup_view.dart b/best_flutter_ui_templates/lib/hotel_booking/calendar_popup_view.dart index b93bbbda..1f9e44dc 100644 --- a/best_flutter_ui_templates/lib/hotel_booking/calendar_popup_view.dart +++ b/best_flutter_ui_templates/lib/hotel_booking/calendar_popup_view.dart @@ -80,7 +80,7 @@ class _CalendarPopupViewState extends State padding: const EdgeInsets.all(24.0), child: Container( decoration: BoxDecoration( - color: HotelAppTheme.buildLightTheme().backgroundColor, + color: HotelAppTheme.backgroundColor, borderRadius: const BorderRadius.all(Radius.circular(24.0)), boxShadow: [ @@ -214,7 +214,8 @@ class _CalendarPopupViewState extends State // animationController.reverse().then((f) { // }); - widget.onApplyClick!(startDate!, endDate!); + widget.onApplyClick!( + startDate!, endDate!); Navigator.pop(context); } catch (_) {} }, diff --git a/best_flutter_ui_templates/lib/hotel_booking/filters_screen.dart b/best_flutter_ui_templates/lib/hotel_booking/filters_screen.dart index f1a33ade..d5fa1084 100644 --- a/best_flutter_ui_templates/lib/hotel_booking/filters_screen.dart +++ b/best_flutter_ui_templates/lib/hotel_booking/filters_screen.dart @@ -22,7 +22,7 @@ class _FiltersScreenState extends State { @override Widget build(BuildContext context) { return Container( - color: HotelAppTheme.buildLightTheme().backgroundColor, + color: HotelAppTheme.backgroundColor, child: Scaffold( backgroundColor: Colors.transparent, body: Column( @@ -366,7 +366,7 @@ class _FiltersScreenState extends State { Widget getAppBarUI() { return Container( decoration: BoxDecoration( - color: HotelAppTheme.buildLightTheme().backgroundColor, + color: HotelAppTheme.backgroundColor, boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.2), diff --git a/best_flutter_ui_templates/lib/hotel_booking/hotel_app_theme.dart b/best_flutter_ui_templates/lib/hotel_booking/hotel_app_theme.dart index bf93f5b6..969bfb4e 100644 --- a/best_flutter_ui_templates/lib/hotel_booking/hotel_app_theme.dart +++ b/best_flutter_ui_templates/lib/hotel_booking/hotel_app_theme.dart @@ -2,22 +2,37 @@ import 'package:best_flutter_ui_templates/main.dart'; import 'package:flutter/material.dart'; class HotelAppTheme { + static const Color backgroundColor = Color(0xFFFFFFFF); + static TextTheme _buildTextTheme(TextTheme base) { const String fontName = 'WorkSans'; return base.copyWith( - headline1: base.headline1?.copyWith(fontFamily: fontName), - headline2: base.headline2?.copyWith(fontFamily: fontName), - headline3: base.headline3?.copyWith(fontFamily: fontName), - headline4: base.headline4?.copyWith(fontFamily: fontName), - headline5: base.headline5?.copyWith(fontFamily: fontName), - headline6: base.headline6?.copyWith(fontFamily: fontName), - button: base.button?.copyWith(fontFamily: fontName), - caption: base.caption?.copyWith(fontFamily: fontName), - bodyText1: base.bodyText1?.copyWith(fontFamily: fontName), - bodyText2: base.bodyText2?.copyWith(fontFamily: fontName), - subtitle1: base.subtitle1?.copyWith(fontFamily: fontName), - subtitle2: base.subtitle2?.copyWith(fontFamily: fontName), - overline: base.overline?.copyWith(fontFamily: fontName), + displayLarge: base.displayLarge + ?.copyWith(fontFamily: fontName), // headline1 -> displayLarge + displayMedium: base.displayMedium + ?.copyWith(fontFamily: fontName), // headline2 -> displayMedium + displaySmall: base.displaySmall + ?.copyWith(fontFamily: fontName), // headline3 -> displaySmall + headlineMedium: base.headlineMedium + ?.copyWith(fontFamily: fontName), // headline4 -> headlineMedium + headlineSmall: base.headlineSmall + ?.copyWith(fontFamily: fontName), // headline5 -> headlineSmall + titleLarge: base.titleLarge + ?.copyWith(fontFamily: fontName), // headline6 -> titleLarge + labelLarge: base.labelLarge + ?.copyWith(fontFamily: fontName), // button -> labelLarge + bodySmall: base.bodySmall + ?.copyWith(fontFamily: fontName), // caption -> bodySmall + bodyLarge: base.bodyLarge + ?.copyWith(fontFamily: fontName), // bodyText1 -> bodyLarge + bodyMedium: base.bodyMedium + ?.copyWith(fontFamily: fontName), // bodyText2 -> bodyMedium + titleMedium: base.titleMedium + ?.copyWith(fontFamily: fontName), // subtitle1 -> titleMedium + titleSmall: base.titleSmall + ?.copyWith(fontFamily: fontName), // subtitle2 -> titleSmall + labelSmall: base.labelSmall + ?.copyWith(fontFamily: fontName), // overline -> labelSmall ); } @@ -27,6 +42,8 @@ class HotelAppTheme { final ColorScheme colorScheme = const ColorScheme.light().copyWith( primary: primaryColor, secondary: secondaryColor, + surface: const Color(0xFFFFFFFF), + error: const Color(0xFFB00020), ); final ThemeData base = ThemeData.light(); return base.copyWith( @@ -36,9 +53,7 @@ class HotelAppTheme { splashColor: Colors.white24, splashFactory: InkRipple.splashFactory, canvasColor: Colors.white, - backgroundColor: const Color(0xFFFFFFFF), scaffoldBackgroundColor: const Color(0xFFF6F6F6), - errorColor: const Color(0xFFB00020), buttonTheme: ButtonThemeData( colorScheme: colorScheme, textTheme: ButtonTextTheme.primary, diff --git a/best_flutter_ui_templates/lib/hotel_booking/hotel_home_screen.dart b/best_flutter_ui_templates/lib/hotel_booking/hotel_home_screen.dart index b5ffdeab..6e0d9d2a 100644 --- a/best_flutter_ui_templates/lib/hotel_booking/hotel_home_screen.dart +++ b/best_flutter_ui_templates/lib/hotel_booking/hotel_home_screen.dart @@ -85,8 +85,7 @@ class _HotelHomeScreenState extends State ]; }, body: Container( - color: - HotelAppTheme.buildLightTheme().backgroundColor, + color: HotelAppTheme.backgroundColor, child: ListView.builder( itemCount: hotelList.length, padding: const EdgeInsets.only(top: 8), @@ -126,7 +125,7 @@ class _HotelHomeScreenState extends State Widget getListUI() { return Container( decoration: BoxDecoration( - color: HotelAppTheme.buildLightTheme().backgroundColor, + color: HotelAppTheme.backgroundColor, boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.2), @@ -329,7 +328,7 @@ class _HotelHomeScreenState extends State padding: const EdgeInsets.only(right: 16, top: 8, bottom: 8), child: Container( decoration: BoxDecoration( - color: HotelAppTheme.buildLightTheme().backgroundColor, + color: HotelAppTheme.backgroundColor, borderRadius: const BorderRadius.all( Radius.circular(38.0), ), @@ -383,8 +382,7 @@ class _HotelHomeScreenState extends State child: Padding( padding: const EdgeInsets.all(16.0), child: Icon(FontAwesomeIcons.magnifyingGlass, - size: 20, - color: HotelAppTheme.buildLightTheme().backgroundColor), + size: 20, color: HotelAppTheme.backgroundColor), ), ), ), @@ -404,7 +402,7 @@ class _HotelHomeScreenState extends State child: Container( height: 24, decoration: BoxDecoration( - color: HotelAppTheme.buildLightTheme().backgroundColor, + color: HotelAppTheme.backgroundColor, boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.2), @@ -415,7 +413,7 @@ class _HotelHomeScreenState extends State ), ), Container( - color: HotelAppTheme.buildLightTheme().backgroundColor, + color: HotelAppTheme.backgroundColor, child: Padding( padding: const EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 4), @@ -513,7 +511,7 @@ class _HotelHomeScreenState extends State Widget getAppBarUI() { return Container( decoration: BoxDecoration( - color: HotelAppTheme.buildLightTheme().backgroundColor, + color: HotelAppTheme.backgroundColor, boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.2), diff --git a/best_flutter_ui_templates/lib/hotel_booking/hotel_list_view.dart b/best_flutter_ui_templates/lib/hotel_booking/hotel_list_view.dart index 47f5bc2c..dee30c8b 100644 --- a/best_flutter_ui_templates/lib/hotel_booking/hotel_list_view.dart +++ b/best_flutter_ui_templates/lib/hotel_booking/hotel_list_view.dart @@ -60,8 +60,7 @@ class HotelListView extends StatelessWidget { ), ), Container( - color: HotelAppTheme.buildLightTheme() - .backgroundColor, + color: HotelAppTheme.backgroundColor, child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, diff --git a/best_flutter_ui_templates/pubspec.lock b/best_flutter_ui_templates/pubspec.lock index 3e00a3e3..377265a3 100644 --- a/best_flutter_ui_templates/pubspec.lock +++ b/best_flutter_ui_templates/pubspec.lock @@ -5,58 +5,66 @@ packages: dependency: "direct main" description: name: animations - url: "https://pub.dartlang.org" + sha256: d3d6dcfb218225bbe68e87ccf6378bbb2e32a94900722c5f81611dad089911cb + url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.0.11" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.12.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.4.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.19.1" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.8" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" flutter: dependency: "direct main" description: flutter @@ -66,7 +74,8 @@ packages: dependency: "direct main" description: name: flutter_rating_bar - url: "https://pub.dartlang.org" + sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93 + url: "https://pub.dev" source: hosted version: "4.0.1" flutter_test: @@ -78,98 +87,143 @@ packages: dependency: "direct main" description: name: font_awesome_flutter - url: "https://pub.dartlang.org" + sha256: d3a89184101baec7f4600d58840a764d2ef760fe1c5a20ef9e6b0e9b24a07a3a + url: "https://pub.dev" source: hosted - version: "10.1.0" + version: "10.8.0" intl: dependency: "direct main" description: name: intl - url: "https://pub.dartlang.org" + sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" + url: "https://pub.dev" + source: hosted + version: "0.20.2" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.17" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.11.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.16.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.1" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.7.4" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" sdks: - dart: ">=2.17.5 <3.0.0" - flutter: ">=3.0.0" + dart: ">=3.7.0-0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/best_flutter_ui_templates/pubspec.yaml b/best_flutter_ui_templates/pubspec.yaml index 6f57e4c3..c3579605 100644 --- a/best_flutter_ui_templates/pubspec.yaml +++ b/best_flutter_ui_templates/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.17.5 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: flutter: @@ -30,7 +30,7 @@ dependencies: cupertino_icons: ^1.0.2 font_awesome_flutter: ^10.1.0 flutter_rating_bar: ^4.0.1 - intl: ^0.17.0 + intl: ^0.20.2 animations: ^2.0.3 dev_dependencies: diff --git a/best_flutter_ui_templates/userinput.py b/best_flutter_ui_templates/userinput.py new file mode 100644 index 00000000..3302051a --- /dev/null +++ b/best_flutter_ui_templates/userinput.py @@ -0,0 +1 @@ +user_input = input("prompt: ") \ No newline at end of file