diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index 48182366c..4f859fbfe 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -35,21 +35,23 @@ jobs: with: channel: beta - run: ./tool/flutter_ci_script_stable.sh + # Verify the Android add-to-app samples build and pass tests with the beta # channel. - android-build: - runs-on: ubuntu-latest - if: github.repository == 'flutter/samples' - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 - with: - distribution: 'zulu' - java-version: '17' - - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 - with: - channel: beta - - run: ./tool/android_ci_script.sh + # android-build: + # runs-on: ubuntu-latest + # if: github.repository == 'flutter/samples' + # steps: + # - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + # - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 + # with: + # distribution: 'zulu' + # java-version: '17' + # - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 + # with: + # channel: beta + # - run: ./tool/android_ci_script.sh + # Verify the iOS add-to-app samples build and pass tests with the beta # channel. ios-build: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4747c2bc8..808c18581 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,6 +36,7 @@ jobs: with: channel: ${{ matrix.flutter_version }} - run: ./tool/flutter_ci_script_${{ matrix.flutter_version }}.sh + web-samples-index: name: web/samples_index config check runs-on: ubuntu-latest @@ -46,19 +47,21 @@ jobs: dart pub get dart run grinder generate working-directory: web/samples_index - android-build: - runs-on: ubuntu-latest - if: github.repository == 'flutter/samples' - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 - with: - distribution: 'zulu' - java-version: '17' - - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 - with: - channel: stable - - run: ./tool/android_ci_script.sh + + # android-build: + # runs-on: ubuntu-latest + # if: github.repository == 'flutter/samples' + # steps: + # - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + # - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 + # with: + # distribution: 'zulu' + # java-version: '17' + # - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 + # with: + # channel: stable + # - run: ./tool/android_ci_script.sh + ios-build: runs-on: macos-latest if: github.repository == 'flutter/samples' diff --git a/ai_recipe_generation/lib/features/prompt/prompt_screen.dart b/ai_recipe_generation/lib/features/prompt/prompt_screen.dart index 0abc8a2b4..a22aa57c0 100644 --- a/ai_recipe_generation/lib/features/prompt/prompt_screen.dart +++ b/ai_recipe_generation/lib/features/prompt/prompt_screen.dart @@ -223,7 +223,7 @@ class PromptScreen extends StatelessWidget { iconColor: Colors.black45, buttonBackgroundColor: Colors.transparent, hoverColor: - MarketplaceTheme.secondary.withOpacity(.1), + MarketplaceTheme.secondary.withAlpha(25), ), ), const Spacer(flex: 1), @@ -292,7 +292,7 @@ class PromptScreen extends StatelessWidget { icon: Symbols.restart_alt, iconColor: Colors.black45, buttonBackgroundColor: Colors.transparent, - hoverColor: MarketplaceTheme.secondary.withOpacity(.1), + hoverColor: MarketplaceTheme.secondary.withAlpha(25), ), ), const SizedBox(height: 200.0), @@ -322,7 +322,7 @@ class _FilterChipSection extends StatelessWidget { child: Container( height: 230, decoration: BoxDecoration( - color: Theme.of(context).splashColor.withOpacity(.1), + color: Theme.of(context).splashColor.withAlpha(25), border: Border.all( color: MarketplaceTheme.borderColor, ), diff --git a/ai_recipe_generation/lib/features/prompt/widgets/image_input_widget.dart b/ai_recipe_generation/lib/features/prompt/widgets/image_input_widget.dart index f1a269a75..70484a16a 100644 --- a/ai_recipe_generation/lib/features/prompt/widgets/image_input_widget.dart +++ b/ai_recipe_generation/lib/features/prompt/widgets/image_input_widget.dart @@ -201,7 +201,7 @@ class _CameraViewState extends State { right: 0, height: 89.5, child: Container( - color: Colors.black.withOpacity(.7), + color: Colors.black.withAlpha(179), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -247,7 +247,7 @@ class _CameraViewState extends State { right: 0, height: 150, child: Container( - color: Colors.black.withOpacity(.7), + color: Colors.black.withAlpha(179), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ diff --git a/ai_recipe_generation/lib/features/recipes/saved_recipes_screen.dart b/ai_recipe_generation/lib/features/recipes/saved_recipes_screen.dart index 567c70324..604ac64ad 100644 --- a/ai_recipe_generation/lib/features/recipes/saved_recipes_screen.dart +++ b/ai_recipe_generation/lib/features/recipes/saved_recipes_screen.dart @@ -193,7 +193,7 @@ class _ListTileState extends State<_ListTile> { bottomLeft: Radius.circular(MarketplaceTheme.defaultBorderRadius), ), - color: color.withOpacity(.3), + color: color.withAlpha(77), ), padding: const EdgeInsets.all(MarketplaceTheme.spacing7), child: Stack( diff --git a/ai_recipe_generation/lib/features/recipes/widgets/recipe_display_widget.dart b/ai_recipe_generation/lib/features/recipes/widgets/recipe_display_widget.dart index 780697a21..113f2015b 100644 --- a/ai_recipe_generation/lib/features/recipes/widgets/recipe_display_widget.dart +++ b/ai_recipe_generation/lib/features/recipes/widgets/recipe_display_widget.dart @@ -76,7 +76,7 @@ class RecipeDisplayWidget extends StatelessWidget { children: [ Container( padding: const EdgeInsets.all(MarketplaceTheme.defaultBorderRadius), - color: MarketplaceTheme.primary.withOpacity(.5), + color: MarketplaceTheme.primary.withAlpha(128), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -106,7 +106,7 @@ class RecipeDisplayWidget extends StatelessWidget { style: ButtonStyle( backgroundColor: WidgetStateColor.resolveWith((states) { if (states.contains(WidgetState.hovered)) { - return MarketplaceTheme.scrim.withOpacity(.6); + return MarketplaceTheme.scrim.withAlpha(153); } return Colors.white; }), diff --git a/ai_recipe_generation/lib/router.dart b/ai_recipe_generation/lib/router.dart index 9b1569b80..0ca954f95 100644 --- a/ai_recipe_generation/lib/router.dart +++ b/ai_recipe_generation/lib/router.dart @@ -35,9 +35,7 @@ class _AdaptiveRouterState extends State super.initState(); tabController = TabController(length: 2, vsync: this); _textStyle = MarketplaceTheme.heading1.copyWith( - color: Colors.black87.withOpacity( - 1.0, - ), + color: Colors.black87.withAlpha(255), ); scrollController = ScrollController(); @@ -60,7 +58,7 @@ class _AdaptiveRouterState extends State // By offset 200, ensure the text is transparent if (scrollController.offset > 200) { _textStyle = _textStyle.copyWith( - color: Colors.black87.withOpacity(0), + color: Colors.black87.withAlpha(0), ); return; } @@ -73,9 +71,7 @@ class _AdaptiveRouterState extends State if (value > 1) value = 1; if (value < 0) value = 0; _textStyle = _textStyle.copyWith( - color: Colors.black87.withOpacity( - value, - ), + color: Colors.black87.withAlpha((255 * value).ceil()), ); }); } diff --git a/ai_recipe_generation/lib/util/tap_recorder.dart b/ai_recipe_generation/lib/util/tap_recorder.dart index e3bf8cc69..d411473c5 100644 --- a/ai_recipe_generation/lib/util/tap_recorder.dart +++ b/ai_recipe_generation/lib/util/tap_recorder.dart @@ -96,9 +96,10 @@ class _RenderTapRecorder extends RenderProxyBox with _SilentTickerProvider { Rect.fromCircle(center: tap.localPosition, radius: _tapRadius)); final opacity = 1 - tap.animation.value; - canvas.drawShadow( - path, _shadowColor.withOpacity(opacity), _shadowElevation, true); - canvas.drawPath(path, Paint()..color = _tapColor.withOpacity(opacity)); + canvas.drawShadow(path, _shadowColor.withAlpha((2565 * opacity).ceil()), + _shadowElevation, true); + canvas.drawPath( + path, Paint()..color = _tapColor.withAlpha((2565 * opacity).ceil())); } } } diff --git a/ai_recipe_generation/lib/widgets/add_image_widget.dart b/ai_recipe_generation/lib/widgets/add_image_widget.dart index 5fa2efa85..8f1fe6dee 100644 --- a/ai_recipe_generation/lib/widgets/add_image_widget.dart +++ b/ai_recipe_generation/lib/widgets/add_image_widget.dart @@ -27,11 +27,11 @@ class _AddImageState extends State { var state = (hovered, tappedDown); return switch (state) { // tapped down state - (_, true) => MarketplaceTheme.secondary.withOpacity(.7), + (_, true) => MarketplaceTheme.secondary.withAlpha(179), // hovered - (true, _) => MarketplaceTheme.secondary.withOpacity(.3), + (true, _) => MarketplaceTheme.secondary.withAlpha(77), // base color - (_, _) => MarketplaceTheme.secondary.withOpacity(.3), + (_, _) => MarketplaceTheme.secondary.withAlpha(77), }; } diff --git a/ai_recipe_generation/lib/widgets/filter_chip_selection_input.dart b/ai_recipe_generation/lib/widgets/filter_chip_selection_input.dart index 829411149..5d403699c 100644 --- a/ai_recipe_generation/lib/widgets/filter_chip_selection_input.dart +++ b/ai_recipe_generation/lib/widgets/filter_chip_selection_input.dart @@ -51,10 +51,10 @@ class _CategorySelectionInputState return FilterChip( color: WidgetStateColor.resolveWith((states) { if (states.contains(WidgetState.hovered)) { - return MarketplaceTheme.secondary.withOpacity(.5); + return MarketplaceTheme.secondary.withAlpha(128); } if (states.contains(WidgetState.selected)) { - return MarketplaceTheme.secondary.withOpacity(.3); + return MarketplaceTheme.secondary.withAlpha(77); } return Theme.of(context).splashColor; }), diff --git a/ai_recipe_generation/lib/widgets/highlight_border_on_hover_widget.dart b/ai_recipe_generation/lib/widgets/highlight_border_on_hover_widget.dart index e9ab49635..d6fe3591c 100644 --- a/ai_recipe_generation/lib/widgets/highlight_border_on_hover_widget.dart +++ b/ai_recipe_generation/lib/widgets/highlight_border_on_hover_widget.dart @@ -38,7 +38,7 @@ class _HighlightBorderOnHoverWidgetState }, child: Container( decoration: BoxDecoration( - color: Theme.of(context).splashColor.withOpacity(.1), + color: Theme.of(context).splashColor.withAlpha(25), border: Border.all( color: hovered ? widget.color : MarketplaceTheme.borderColor, ), diff --git a/ai_recipe_generation/lib/widgets/marketplace_button_widget.dart b/ai_recipe_generation/lib/widgets/marketplace_button_widget.dart index 142540be9..53cce4aaa 100644 --- a/ai_recipe_generation/lib/widgets/marketplace_button_widget.dart +++ b/ai_recipe_generation/lib/widgets/marketplace_button_widget.dart @@ -55,10 +55,10 @@ class _MarketplaceButtonState extends State { backgroundColor: WidgetStateColor.resolveWith((states) { if (states.contains(WidgetState.hovered)) { return widget.hoverColor ?? - MarketplaceTheme.secondary.withOpacity(.3); + MarketplaceTheme.secondary.withAlpha(77); } return widget.buttonBackgroundColor ?? - Theme.of(context).splashColor.withOpacity(.3); + Theme.of(context).splashColor.withAlpha(77); }), shape: WidgetStateProperty.resolveWith( (states) { diff --git a/experimental/linting_tool/lib/theme/app_theme.dart b/experimental/linting_tool/lib/theme/app_theme.dart index c027f3222..fc1339e79 100644 --- a/experimental/linting_tool/lib/theme/app_theme.dart +++ b/experimental/linting_tool/lib/theme/app_theme.dart @@ -13,7 +13,7 @@ abstract class AppTheme { return base.copyWith( bottomSheetTheme: BottomSheetThemeData( backgroundColor: AppColors.blue700, - modalBackgroundColor: Colors.white.withOpacity(0.7), + modalBackgroundColor: Colors.white.withAlpha(179), ), navigationRailTheme: NavigationRailThemeData( backgroundColor: AppColors.blue700, @@ -53,7 +53,7 @@ abstract class AppTheme { return base.copyWith( bottomSheetTheme: BottomSheetThemeData( backgroundColor: AppColors.darkDrawerBackground, - modalBackgroundColor: Colors.black.withOpacity(0.7), + modalBackgroundColor: Colors.black.withAlpha(179), ), navigationRailTheme: NavigationRailThemeData( backgroundColor: AppColors.darkBottomAppBarBackground, @@ -102,9 +102,9 @@ abstract class AppTheme { Brightness brightness, ) { return ChipThemeData( - backgroundColor: primaryColor.withOpacity(0.12), - disabledColor: primaryColor.withOpacity(0.87), - selectedColor: primaryColor.withOpacity(0.05), + backgroundColor: primaryColor.withAlpha(31), + disabledColor: primaryColor.withAlpha(222), + selectedColor: primaryColor.withAlpha(12), secondarySelectedColor: chipBackground, padding: const EdgeInsets.all(4), shape: const StadiumBorder(), diff --git a/game_template/macos/Flutter/GeneratedPluginRegistrant.swift b/game_template/macos/Flutter/GeneratedPluginRegistrant.swift index a01151bd4..bae0dafcc 100644 --- a/game_template/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/game_template/macos/Flutter/GeneratedPluginRegistrant.swift @@ -12,6 +12,7 @@ import games_services import in_app_purchase_storekit import path_provider_foundation import shared_preferences_foundation +import webview_flutter_wkwebview func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin")) @@ -21,4 +22,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { InAppPurchasePlugin.register(with: registry.registrar(forPlugin: "InAppPurchasePlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) + FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin")) } diff --git a/material_3_demo/lib/component_screen.dart b/material_3_demo/lib/component_screen.dart index cddee8588..685137c33 100644 --- a/material_3_demo/lib/component_screen.dart +++ b/material_3_demo/lib/component_screen.dart @@ -2242,7 +2242,7 @@ class _MenusState extends State { ), Icon( selectedIcon?.icon, - color: selectedColor?.color ?? Colors.grey.withOpacity(0.5), + color: selectedColor?.color ?? Colors.grey.withAlpha(128), ) ], ), @@ -2568,10 +2568,8 @@ class ComponentGroupDecoration extends StatelessWidget { child: Card( margin: EdgeInsets.zero, elevation: 0, - color: Theme.of(context) - .colorScheme - .surfaceContainerHighest - .withOpacity(0.3), + color: + Theme.of(context).colorScheme.surfaceContainerHighest.withAlpha(77), child: Padding( padding: const EdgeInsets.symmetric(vertical: 20.0), child: Center( diff --git a/simplistic_editor/lib/basic_text_input_client.dart b/simplistic_editor/lib/basic_text_input_client.dart index 4f415eb6b..3e68189b1 100644 --- a/simplistic_editor/lib/basic_text_input_client.dart +++ b/simplistic_editor/lib/basic_text_input_client.dart @@ -1112,7 +1112,7 @@ class BasicTextInputClientState extends State minLines: null, expands: false, // expands to height of parent. strutStyle: null, - selectionColor: Colors.blue.withOpacity(0.40), + selectionColor: Colors.blue.withAlpha(102), textScaler: MediaQuery.textScalerOf(context), textAlign: TextAlign.left, textDirection: _textDirection,