mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 23:08:59 +00:00
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user