From 21a1d7ed3a8562f525a9ef104c1eee52fa4e2830 Mon Sep 17 00:00:00 2001 From: Eric Windmill Date: Wed, 29 May 2024 13:39:15 -0400 Subject: [PATCH 1/3] fix icon related error in recipe gen ai --- .../lib/widgets/icon_loading_indicator.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ai_recipe_generation/lib/widgets/icon_loading_indicator.dart b/ai_recipe_generation/lib/widgets/icon_loading_indicator.dart index cc98a3d467f..16dbc660eae 100644 --- a/ai_recipe_generation/lib/widgets/icon_loading_indicator.dart +++ b/ai_recipe_generation/lib/widgets/icon_loading_indicator.dart @@ -30,7 +30,6 @@ class IconLoadingAnimator extends StatefulWidget { var rand = Random(); class _IconLoadingAnimatorState extends State { - late List notYetSeenIcons; late IconData currentIcon; late Color currentColor; late Timer timer; @@ -38,10 +37,8 @@ class _IconLoadingAnimatorState extends State { @override void initState() { super.initState(); - notYetSeenIcons = widget.icons; - currentIcon = - notYetSeenIcons.removeAt(rand.nextInt(notYetSeenIcons.length)); + currentIcon = widget.icons[rand.nextInt(widget.icons.length)]; currentColor = widget.colors[rand.nextInt(widget.colors.length)]; timer = Timer.periodic( @@ -53,10 +50,9 @@ class _IconLoadingAnimatorState extends State { } void nextIcon() { - if (notYetSeenIcons.length == 1) notYetSeenIcons = widget.icons; setState(() { currentIcon = - notYetSeenIcons.removeAt(rand.nextInt(notYetSeenIcons.length)); + widget.icons[rand.nextInt(widget.icons.length)]; currentColor = widget.colors[rand.nextInt(widget.colors.length)]; }); } From 6d4029642687343efed19eac5de5c37a06a0275e Mon Sep 17 00:00:00 2001 From: Eric Windmill Date: Mon, 1 Jul 2024 09:49:15 -0400 Subject: [PATCH 2/3] add to app update tips --- add_to_app/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/add_to_app/README.md b/add_to_app/README.md index 4963ede3aac..b820e15f3ae 100644 --- a/add_to_app/README.md +++ b/add_to_app/README.md @@ -62,3 +62,19 @@ iOS or Android app, the best places to go are: If you run into an issue with the sample itself, please file an issue in the [main Flutter repo](https://github.com/flutter/flutter/issues). + +## Updating Android samples and its dependencies + +* Open the top level build.gradle file in android studio +* Open “Upgrade Assistant” and click upgrade +* If after upgrading it fails to build try upgrading to a slightly less new version +* If you get an unknown class version exception 61, 66, etc, try setting the version of Java used by modifying JAVA_HOME +* If it still fails to build try checking if the Flutter code referenced in the build is up-to-date and doesn't use discontinued plugins. (Common cases include “namespace”) +* The 'project structure' -> 'modules' view can be helpful in understanding the dependency tree. +* Once the app builds with the latest gradle/agp update any deprecated usages in app/build.gradle + +* compileSdkVersion -> sdkVersion +* Update the target sdk version and read through each target sdk update +* Export broadcast receivers +* Update the way flutter is imported to use flutter gradle plugin +* https://flutter.dev/go/flutter-gradle-plugin-apply \ No newline at end of file From 004155c7b8ba1fe6b830d819c5ebe7aa0925fb17 Mon Sep 17 00:00:00 2001 From: Eric Windmill Date: Mon, 1 Jul 2024 09:50:25 -0400 Subject: [PATCH 3/3] add todo --- add_to_app/README.md | 2 ++ .../Flutter/ephemeral/Flutter-Generated.xcconfig | 11 +++++++++++ .../Flutter/ephemeral/flutter_export_environment.sh | 12 ++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 compass_app/macos/Flutter/ephemeral/Flutter-Generated.xcconfig create mode 100755 compass_app/macos/Flutter/ephemeral/flutter_export_environment.sh diff --git a/add_to_app/README.md b/add_to_app/README.md index b820e15f3ae..84762ec731c 100644 --- a/add_to_app/README.md +++ b/add_to_app/README.md @@ -65,6 +65,8 @@ in the [main Flutter repo](https://github.com/flutter/flutter/issues). ## Updating Android samples and its dependencies +TODO @ewindmill: Expand these instructions for those of us with little Android experience :) + * Open the top level build.gradle file in android studio * Open “Upgrade Assistant” and click upgrade * If after upgrading it fails to build try upgrading to a slightly less new version diff --git a/compass_app/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/compass_app/macos/Flutter/ephemeral/Flutter-Generated.xcconfig new file mode 100644 index 00000000000..4bdd72375a5 --- /dev/null +++ b/compass_app/macos/Flutter/ephemeral/Flutter-Generated.xcconfig @@ -0,0 +1,11 @@ +// This is a generated file; do not edit or check into version control. +FLUTTER_ROOT=/Users/ewindmill/development/flutter +FLUTTER_APPLICATION_PATH=/Users/ewindmill/development/samples/compass_app +COCOAPODS_PARALLEL_CODE_SIGN=true +FLUTTER_BUILD_DIR=build +FLUTTER_BUILD_NAME=0.1.0 +FLUTTER_BUILD_NUMBER=0.1.0 +DART_OBFUSCATION=false +TRACK_WIDGET_CREATION=true +TREE_SHAKE_ICONS=false +PACKAGE_CONFIG=.dart_tool/package_config.json diff --git a/compass_app/macos/Flutter/ephemeral/flutter_export_environment.sh b/compass_app/macos/Flutter/ephemeral/flutter_export_environment.sh new file mode 100755 index 00000000000..7f088380f41 --- /dev/null +++ b/compass_app/macos/Flutter/ephemeral/flutter_export_environment.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=/Users/ewindmill/development/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/ewindmill/development/samples/compass_app" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" +export "FLUTTER_BUILD_DIR=build" +export "FLUTTER_BUILD_NAME=0.1.0" +export "FLUTTER_BUILD_NUMBER=0.1.0" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=true" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=.dart_tool/package_config.json"