mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
28
.github/workflows/beta.yml
vendored
28
.github/workflows/beta.yml
vendored
@@ -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:
|
||||
|
||||
29
.github/workflows/main.yml
vendored
29
.github/workflows/main.yml
vendored
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
|
||||
@@ -201,7 +201,7 @@ class _CameraViewState extends State<CameraView> {
|
||||
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<CameraView> {
|
||||
right: 0,
|
||||
height: 150,
|
||||
child: Container(
|
||||
color: Colors.black.withOpacity(.7),
|
||||
color: Colors.black.withAlpha(179),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
}),
|
||||
|
||||
@@ -35,9 +35,7 @@ class _AdaptiveRouterState extends State<AdaptiveRouter>
|
||||
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<AdaptiveRouter>
|
||||
// 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<AdaptiveRouter>
|
||||
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()),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,11 +27,11 @@ class _AddImageState extends State<AddImage> {
|
||||
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),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -51,10 +51,10 @@ class _CategorySelectionInputState<T extends Enum>
|
||||
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;
|
||||
}),
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
|
||||
@@ -55,10 +55,10 @@ class _MarketplaceButtonState extends State<MarketplaceButton> {
|
||||
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) {
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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"))
|
||||
}
|
||||
|
||||
@@ -2242,7 +2242,7 @@ class _MenusState extends State<Menus> {
|
||||
),
|
||||
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(
|
||||
|
||||
@@ -1112,7 +1112,7 @@ class BasicTextInputClientState extends State<BasicTextInputClient>
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user