diff --git a/add_to_app/books/android_books/app/build.gradle b/add_to_app/books/android_books/app/build.gradle index 46cfa3909..cd3f6cfd9 100644 --- a/add_to_app/books/android_books/app/build.gradle +++ b/add_to_app/books/android_books/app/build.gradle @@ -17,9 +17,13 @@ android { } buildTypes { + profile { + initWith debug + } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + signingConfig debug.signingConfig } } compileOptions { diff --git a/add_to_app/books/android_books/app/src/main/java/dev/flutter/example/books/MainActivity.kt b/add_to_app/books/android_books/app/src/main/java/dev/flutter/example/books/MainActivity.kt index 57d429887..c81526bde 100644 --- a/add_to_app/books/android_books/app/src/main/java/dev/flutter/example/books/MainActivity.kt +++ b/add_to_app/books/android_books/app/src/main/java/dev/flutter/example/books/MainActivity.kt @@ -94,6 +94,9 @@ class MainActivity : AppCompatActivity() { book.summary = volumeInfoJson.get("description").asString book.publishDate = volumeInfoJson.get("publishedDate").asString book.pageCount = volumeInfoJson.get("pageCount").asLong + val thumbnail = Api.Thumbnail() + thumbnail.url = volumeInfoJson.getAsJsonObject("imageLinks").get("thumbnail").asString + book.thumbnail = thumbnail books.add(book) } catch (e: Exception) { println("Failed to parse book:") diff --git a/add_to_app/books/flutter_module_books/lib/main.dart b/add_to_app/books/flutter_module_books/lib/main.dart index 588eda016..b56b2a8a5 100644 --- a/add_to_app/books/flutter_module_books/lib/main.dart +++ b/add_to_app/books/flutter_module_books/lib/main.dart @@ -96,6 +96,9 @@ class _BookDetailState extends State { })); } + // Not overriding didUpdateWidget because the Android program can't change + // the book given to Flutter on the Android side. + void clear() { book = null; // Keep focus if going to the home screen but unfocus if leaving @@ -209,21 +212,29 @@ class BookForm extends StatelessWidget { ), const Divider(), const SizedBox(height: 32), - const Center( - child: Text( - 'BOOK DESCRIPTION', - style: TextStyle( - fontSize: 15, - fontWeight: FontWeight.bold, - decoration: TextDecoration.underline, + if (book.thumbnail?.url != null) ... [ + Center( + child: Image.network(book.thumbnail!.url!), + ), + const SizedBox(height: 32), + ], + if (book.summary != null) ... [ + const Center( + child: Text( + 'BOOK DESCRIPTION', + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.bold, + decoration: TextDecoration.underline, + ), ), ), - ), - const SizedBox(height: 12), - Text( - book.summary ?? '', - style: TextStyle(color: Colors.grey.shade600, height: 1.24), - ), + const SizedBox(height: 12), + Text( + book.summary ?? '', + style: TextStyle(color: Colors.grey.shade600, height: 1.24), + ), + ] ], ), ); diff --git a/add_to_app/books/ios_books/IosBooks.xcodeproj/project.pbxproj b/add_to_app/books/ios_books/IosBooks.xcodeproj/project.pbxproj index 45f955f78..cda644b78 100644 --- a/add_to_app/books/ios_books/IosBooks.xcodeproj/project.pbxproj +++ b/add_to_app/books/ios_books/IosBooks.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -113,7 +113,7 @@ 0DDE4C3325E0390700389930 /* Sources */, 0DDE4C3425E0390700389930 /* Frameworks */, 0DDE4C3525E0390700389930 /* Resources */, - F82F2089B06A5489DA98C8B9 /* [CP] Embed Pods Frameworks */, + CA4628050A0CDB5CBFD737AD /* [CP-User] Embed Flutter Build flutter_module_books Script */, ); buildRules = ( ); @@ -203,22 +203,15 @@ shellPath = /bin/sh; shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../flutter_module_books/.ios/Flutter/flutter_export_environment.sh\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build"; }; - F82F2089B06A5489DA98C8B9 /* [CP] Embed Pods Frameworks */ = { + CA4628050A0CDB5CBFD737AD /* [CP-User] Embed Flutter Build flutter_module_books Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-IosBooks/Pods-IosBooks-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-IosBooks/Pods-IosBooks-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); + name = "[CP-User] Embed Flutter Build flutter_module_books Script"; runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-IosBooks/Pods-IosBooks-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../flutter_module_books/.ios/Flutter/flutter_export_environment.sh\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh embed_and_thin"; }; /* End PBXShellScriptBuildPhase section */ @@ -381,6 +374,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = IosBooks/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -403,6 +397,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = IosBooks/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/add_to_app/books/ios_books/IosBooks.xcodeproj/xcshareddata/xcschemes/IosBooks.xcscheme b/add_to_app/books/ios_books/IosBooks.xcodeproj/xcshareddata/xcschemes/IosBooks.xcscheme new file mode 100644 index 000000000..98b9ae62a --- /dev/null +++ b/add_to_app/books/ios_books/IosBooks.xcodeproj/xcshareddata/xcschemes/IosBooks.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/add_to_app/books/ios_books/IosBooks/ViewController.swift b/add_to_app/books/ios_books/IosBooks/ViewController.swift index f28cf5f85..210ad76ef 100644 --- a/add_to_app/books/ios_books/IosBooks/ViewController.swift +++ b/add_to_app/books/ios_books/IosBooks/ViewController.swift @@ -47,7 +47,10 @@ class ViewController: UITableViewController, BKHostBookApi { let authors = (volumeInfo["authors"] as! [String]).joined(separator: " & ") let pageCount = volumeInfo["pageCount"] as! Int32 let publishedDate = volumeInfo["publishedDate"] as! String - let summary = volumeInfo["description"] as! String + let summary = volumeInfo["description"] as! String? + let imageLinks = volumeInfo["imageLinks"] as! [String: Any] + let thumbnail: BKThumbnail = BKThumbnail.init() + thumbnail.url = imageLinks["thumbnail"] as! String? let book: BKBook = BKBook.init() book.author = authors book.title = title @@ -56,6 +59,7 @@ class ViewController: UITableViewController, BKHostBookApi { book.pageCount = NSNumber.init(value: pageCount) book.publishDate = publishedDate book.summary = summary + book.thumbnail = thumbnail newBooks.append(book) } DispatchQueue.main.async { diff --git a/experimental/web_dashboard/lib/src/pages/home.dart b/experimental/web_dashboard/lib/src/pages/home.dart index a2f45f52b..8a895fbb4 100644 --- a/experimental/web_dashboard/lib/src/pages/home.dart +++ b/experimental/web_dashboard/lib/src/pages/home.dart @@ -34,7 +34,10 @@ class _HomePageState extends State { Padding( padding: const EdgeInsets.all(8.0), child: TextButton( - style: TextButton.styleFrom(primary: Colors.white), + style: TextButton.styleFrom( + // ignore: deprecated_member_use + primary: Colors.white, + ), onPressed: () => _handleSignOut(), child: const Text('Sign Out'), ), diff --git a/form_app/lib/src/validation.dart b/form_app/lib/src/validation.dart index 8e6e7f3fe..4d0f899f3 100644 --- a/form_app/lib/src/validation.dart +++ b/form_app/lib/src/validation.dart @@ -27,7 +27,10 @@ class _FormValidationDemoState extends State { Padding( padding: const EdgeInsets.all(8), child: TextButton( - style: TextButton.styleFrom(primary: Colors.white), + style: TextButton.styleFrom( + // ignore: deprecated_member_use + primary: Colors.white, + ), child: const Text('Submit'), onPressed: () { // Validate the form by getting the FormState from the GlobalKey diff --git a/material_3_demo/lib/component_screen.dart b/material_3_demo/lib/component_screen.dart index 3dd190f92..32ef5b5c5 100644 --- a/material_3_demo/lib/component_screen.dart +++ b/material_3_demo/lib/component_screen.dart @@ -114,8 +114,10 @@ class ButtonsWithoutIcon extends StatelessWidget { ElevatedButton( style: ElevatedButton.styleFrom( // Foreground color + // ignore: deprecated_member_use onPrimary: Theme.of(context).colorScheme.onPrimary, // Background color + // ignore: deprecated_member_use primary: Theme.of(context).colorScheme.primary, ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)), onPressed: handlePressed(context, isDisabled, "FilledButton"), @@ -125,8 +127,10 @@ class ButtonsWithoutIcon extends StatelessWidget { ElevatedButton( style: ElevatedButton.styleFrom( // Foreground color + // ignore: deprecated_member_use onPrimary: Theme.of(context).colorScheme.onSecondaryContainer, // Background color + // ignore: deprecated_member_use primary: Theme.of(context).colorScheme.secondaryContainer, ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)), onPressed: handlePressed(context, isDisabled, "FilledTonalButton"), @@ -166,8 +170,10 @@ class ButtonsWithIcon extends StatelessWidget { ElevatedButton.icon( style: ElevatedButton.styleFrom( // Foreground color + // ignore: deprecated_member_use onPrimary: Theme.of(context).colorScheme.onPrimary, // Background color + // ignore: deprecated_member_use primary: Theme.of(context).colorScheme.primary, ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)), onPressed: handlePressed(context, false, "FilledButton with Icon"), @@ -178,8 +184,10 @@ class ButtonsWithIcon extends StatelessWidget { ElevatedButton.icon( style: ElevatedButton.styleFrom( // Foreground color + // ignore: deprecated_member_use onPrimary: Theme.of(context).colorScheme.onSecondaryContainer, // Background color + // ignore: deprecated_member_use primary: Theme.of(context).colorScheme.secondaryContainer, ).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)), onPressed: diff --git a/place_tracker/lib/place_map.dart b/place_tracker/lib/place_map.dart index bbf8b5c55..7f7d5f96f 100644 --- a/place_tracker/lib/place_map.dart +++ b/place_tracker/lib/place_map.dart @@ -469,7 +469,10 @@ class _AddPlaceButtonBar extends StatelessWidget { alignment: MainAxisAlignment.center, children: [ ElevatedButton( - style: ElevatedButton.styleFrom(primary: Colors.blue), + style: ElevatedButton.styleFrom( + // ignore: deprecated_member_use + primary: Colors.blue, + ), onPressed: onSavePressed, child: const Text( 'Save', @@ -477,7 +480,10 @@ class _AddPlaceButtonBar extends StatelessWidget { ), ), ElevatedButton( - style: ElevatedButton.styleFrom(primary: Colors.red), + style: ElevatedButton.styleFrom( + // ignore: deprecated_member_use + primary: Colors.red, + ), onPressed: onCancelPressed, child: const Text( 'Cancel', @@ -514,9 +520,11 @@ class _CategoryButtonBar extends StatelessWidget { children: [ ElevatedButton( style: ElevatedButton.styleFrom( - primary: selectedPlaceCategory == PlaceCategory.favorite - ? Colors.green[700] - : Colors.lightGreen), + // ignore: deprecated_member_use + primary: selectedPlaceCategory == PlaceCategory.favorite + ? Colors.green[700] + : Colors.lightGreen, + ), child: const Text( 'Favorites', style: TextStyle(color: Colors.white, fontSize: 14.0), @@ -525,9 +533,11 @@ class _CategoryButtonBar extends StatelessWidget { ), ElevatedButton( style: ElevatedButton.styleFrom( - primary: selectedPlaceCategory == PlaceCategory.visited - ? Colors.green[700] - : Colors.lightGreen), + // ignore: deprecated_member_use + primary: selectedPlaceCategory == PlaceCategory.visited + ? Colors.green[700] + : Colors.lightGreen, + ), child: const Text( 'Visited', style: TextStyle(color: Colors.white, fontSize: 14.0), @@ -536,9 +546,11 @@ class _CategoryButtonBar extends StatelessWidget { ), ElevatedButton( style: ElevatedButton.styleFrom( - primary: selectedPlaceCategory == PlaceCategory.wantToGo - ? Colors.green[700] - : Colors.lightGreen), + // ignore: deprecated_member_use + primary: selectedPlaceCategory == PlaceCategory.wantToGo + ? Colors.green[700] + : Colors.lightGreen, + ), child: const Text( 'Want To Go', style: TextStyle(color: Colors.white, fontSize: 14.0), diff --git a/provider_shopper/lib/screens/cart.dart b/provider_shopper/lib/screens/cart.dart index eea8f990d..35d4854a1 100644 --- a/provider_shopper/lib/screens/cart.dart +++ b/provider_shopper/lib/screens/cart.dart @@ -90,7 +90,10 @@ class _CartTotal extends StatelessWidget { ScaffoldMessenger.of(context).showSnackBar( const SnackBar(content: Text('Buying not supported yet.'))); }, - style: TextButton.styleFrom(primary: Colors.white), + style: TextButton.styleFrom( + // ignore: deprecated_member_use + primary: Colors.white, + ), child: const Text('BUY'), ), ], diff --git a/provider_shopper/lib/screens/login.dart b/provider_shopper/lib/screens/login.dart index 4c6e529e2..7c143021e 100644 --- a/provider_shopper/lib/screens/login.dart +++ b/provider_shopper/lib/screens/login.dart @@ -39,6 +39,7 @@ class MyLogin extends StatelessWidget { Navigator.pushReplacementNamed(context, '/catalog'); }, style: ElevatedButton.styleFrom( + // ignore: deprecated_member_use primary: Colors.yellow, ), child: const Text('ENTER'), diff --git a/simplistic_editor/lib/basic_text_input_client.dart b/simplistic_editor/lib/basic_text_input_client.dart index cd720030c..8f394b031 100644 --- a/simplistic_editor/lib/basic_text_input_client.dart +++ b/simplistic_editor/lib/basic_text_input_client.dart @@ -697,16 +697,21 @@ class BasicTextInputClientState extends State { // Activation const SingleActivator(LogicalKeyboardKey.space): + // ignore: prefer_const_constructors DoNothingAndStopPropagationIntent(), // Scrolling const SingleActivator(LogicalKeyboardKey.arrowUp): + // ignore: prefer_const_constructors DoNothingAndStopPropagationIntent(), const SingleActivator(LogicalKeyboardKey.arrowDown): + // ignore: prefer_const_constructors DoNothingAndStopPropagationIntent(), const SingleActivator(LogicalKeyboardKey.arrowLeft): + // ignore: prefer_const_constructors DoNothingAndStopPropagationIntent(), const SingleActivator(LogicalKeyboardKey.arrowRight): + // ignore: prefer_const_constructors DoNothingAndStopPropagationIntent(), };