Skip to content

Commit

Permalink
chore(deps): Flutter 3.27.4 (#64)
Browse files Browse the repository at this point in the history
* chore(deps): Flutter 3.27.4
 * Upgrade puro environment accordingly
 * Bump SDK constraint accordingly
 * fluent_ui: ^4.7.3 to ^4.11.1
 * shared_preferences: ^2.1.2 to ^2.5.2
 * custom_lint: ^0.6.4 to ^0.7.0
* fix: breaking changes
  • Loading branch information
brainwo authored Feb 12, 2025
1 parent 95ac948 commit a8d7e66
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 203 deletions.
2 changes: 1 addition & 1 deletion .puro.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"env": "3.19.6"
"env": "3.27.4"
}
12 changes: 4 additions & 8 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,10 @@ class App extends StatelessWidget {
activeColor: appTheme.primary,
buttonTheme: ButtonThemeData(
defaultButtonStyle: ButtonStyle(
foregroundColor: ButtonState.resolveWith((final states) {
if (states.isPressing) return Colors.white;
return null;
}),
backgroundColor: ButtonState.resolveWith(
backgroundColor: WidgetStateColor.resolveWith(
(final states) {
if (states.isPressing) return appTheme.primary;
if (states.isHovering) return appTheme.backgroundHighlight;
if (states.isPressed) return appTheme.primary;
if (states.isHovered) return appTheme.backgroundHighlight;
return appTheme.background;
},
),
Expand All @@ -128,7 +124,7 @@ class App extends StatelessWidget {
showDuration: Duration.zero,
waitDuration: const Duration(milliseconds: 150),
decoration: BoxDecoration(
color: appTheme.background.withOpacity(0.5),
color: appTheme.background.withValues(alpha: 0.5),
borderRadius: BorderRadius.circular(4),
),
textStyle: const TextStyle(fontSize: 14),
Expand Down
36 changes: 20 additions & 16 deletions lib/widget/list_items/list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,20 +204,24 @@ class _ListItemState extends State<ListItem> {
onPressed: () {
Clipboard.setData(ClipboardData(
text: widget.url,
)).whenComplete(() => displayInfoBar(
context,
builder: (final context, final close) {
return InfoBar(
title: const Text('Copied'),
content: const Text('URL copied to clipboard'),
action: IconButton(
icon: const Icon(FluentIcons.clear),
onPressed: close,
),
severity: InfoBarSeverity.info,
);
},
));
)).whenComplete(() async {
if (!context.mounted) return;

return displayInfoBar(
context,
builder: (final context, final close) {
return InfoBar(
title: const Text('Copied'),
content: const Text('URL copied to clipboard'),
action: IconButton(
icon: const Icon(FluentIcons.clear),
onPressed: close,
),
severity: InfoBarSeverity.info,
);
},
);
});
},
),
MenuFlyoutItem(
Expand Down Expand Up @@ -262,7 +266,7 @@ class _ListItemState extends State<ListItem> {
child: ColoredBox(
color: switch ((_focused, _hovered)) {
(true, _) => FluentTheme.of(context).accentColor,
(_, true) => Colors.white.withOpacity(0.1),
(_, true) => Colors.white.withValues(alpha: 0.1),
_ => Colors.transparent,
},
child: Padding(
Expand All @@ -272,7 +276,7 @@ class _ListItemState extends State<ListItem> {
(true, _) => BoxDecoration(
border: Border.all(
width: 1,
color: Colors.white.withOpacity(0.5),
color: Colors.white.withValues(alpha: 0.5),
),
),
_ => const BoxDecoration(),
Expand Down
4 changes: 2 additions & 2 deletions lib/widget/thumbnail_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class _ThumbnailItemState extends State<ThumbnailItem> {
child: ColoredBox(
color: switch ((_focused, _hovered)) {
(true, _) => FluentTheme.of(context).accentColor,
(_, true) => Colors.white.withOpacity(0.1),
(_, true) => Colors.white.withValues(alpha: 0.1),
_ => Colors.transparent,
},
child: Padding(
Expand All @@ -131,7 +131,7 @@ class _ThumbnailItemState extends State<ThumbnailItem> {
(true, _) => BoxDecoration(
border: Border.all(
width: 1,
color: Colors.white.withOpacity(0.5),
color: Colors.white.withValues(alpha: 0.5),
),
),
_ => const BoxDecoration(),
Expand Down
Loading

0 comments on commit a8d7e66

Please sign in to comment.