Skip to content

Commit a8d7e66

Browse files
authored
chore(deps): Flutter 3.27.4 (#64)
* 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
1 parent 95ac948 commit a8d7e66

File tree

6 files changed

+223
-203
lines changed

6 files changed

+223
-203
lines changed

.puro.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"env": "3.19.6"
2+
"env": "3.27.4"
33
}

lib/main.dart

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,10 @@ class App extends StatelessWidget {
103103
activeColor: appTheme.primary,
104104
buttonTheme: ButtonThemeData(
105105
defaultButtonStyle: ButtonStyle(
106-
foregroundColor: ButtonState.resolveWith((final states) {
107-
if (states.isPressing) return Colors.white;
108-
return null;
109-
}),
110-
backgroundColor: ButtonState.resolveWith(
106+
backgroundColor: WidgetStateColor.resolveWith(
111107
(final states) {
112-
if (states.isPressing) return appTheme.primary;
113-
if (states.isHovering) return appTheme.backgroundHighlight;
108+
if (states.isPressed) return appTheme.primary;
109+
if (states.isHovered) return appTheme.backgroundHighlight;
114110
return appTheme.background;
115111
},
116112
),
@@ -128,7 +124,7 @@ class App extends StatelessWidget {
128124
showDuration: Duration.zero,
129125
waitDuration: const Duration(milliseconds: 150),
130126
decoration: BoxDecoration(
131-
color: appTheme.background.withOpacity(0.5),
127+
color: appTheme.background.withValues(alpha: 0.5),
132128
borderRadius: BorderRadius.circular(4),
133129
),
134130
textStyle: const TextStyle(fontSize: 14),

lib/widget/list_items/list_item.dart

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -204,20 +204,24 @@ class _ListItemState extends State<ListItem> {
204204
onPressed: () {
205205
Clipboard.setData(ClipboardData(
206206
text: widget.url,
207-
)).whenComplete(() => displayInfoBar(
208-
context,
209-
builder: (final context, final close) {
210-
return InfoBar(
211-
title: const Text('Copied'),
212-
content: const Text('URL copied to clipboard'),
213-
action: IconButton(
214-
icon: const Icon(FluentIcons.clear),
215-
onPressed: close,
216-
),
217-
severity: InfoBarSeverity.info,
218-
);
219-
},
220-
));
207+
)).whenComplete(() async {
208+
if (!context.mounted) return;
209+
210+
return displayInfoBar(
211+
context,
212+
builder: (final context, final close) {
213+
return InfoBar(
214+
title: const Text('Copied'),
215+
content: const Text('URL copied to clipboard'),
216+
action: IconButton(
217+
icon: const Icon(FluentIcons.clear),
218+
onPressed: close,
219+
),
220+
severity: InfoBarSeverity.info,
221+
);
222+
},
223+
);
224+
});
221225
},
222226
),
223227
MenuFlyoutItem(
@@ -262,7 +266,7 @@ class _ListItemState extends State<ListItem> {
262266
child: ColoredBox(
263267
color: switch ((_focused, _hovered)) {
264268
(true, _) => FluentTheme.of(context).accentColor,
265-
(_, true) => Colors.white.withOpacity(0.1),
269+
(_, true) => Colors.white.withValues(alpha: 0.1),
266270
_ => Colors.transparent,
267271
},
268272
child: Padding(
@@ -272,7 +276,7 @@ class _ListItemState extends State<ListItem> {
272276
(true, _) => BoxDecoration(
273277
border: Border.all(
274278
width: 1,
275-
color: Colors.white.withOpacity(0.5),
279+
color: Colors.white.withValues(alpha: 0.5),
276280
),
277281
),
278282
_ => const BoxDecoration(),

lib/widget/thumbnail_item.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class _ThumbnailItemState extends State<ThumbnailItem> {
121121
child: ColoredBox(
122122
color: switch ((_focused, _hovered)) {
123123
(true, _) => FluentTheme.of(context).accentColor,
124-
(_, true) => Colors.white.withOpacity(0.1),
124+
(_, true) => Colors.white.withValues(alpha: 0.1),
125125
_ => Colors.transparent,
126126
},
127127
child: Padding(
@@ -131,7 +131,7 @@ class _ThumbnailItemState extends State<ThumbnailItem> {
131131
(true, _) => BoxDecoration(
132132
border: Border.all(
133133
width: 1,
134-
color: Colors.white.withOpacity(0.5),
134+
color: Colors.white.withValues(alpha: 0.5),
135135
),
136136
),
137137
_ => const BoxDecoration(),

0 commit comments

Comments
 (0)