Skip to content

Commit 46c38c0

Browse files
authored
Fix toaster (#625)
* Fix toaster * Prepare Forui for review --------- Co-authored-by: Pante <[email protected]>
1 parent 77741f2 commit 46c38c0

File tree

4 files changed

+30
-24
lines changed

4 files changed

+30
-24
lines changed

forui/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 0.14.1
2+
* Fix `FToaster`sometimes crashing due to an incorrect update of a late final variable.
3+
4+
15
## 0.14.0
26

37
### `FButton`

forui/example/lib/sandbox.dart

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,28 @@ class _SandboxState extends State<Sandbox> with SingleTickerProviderStateMixin {
2727

2828
@override
2929
Widget build(BuildContext context) {
30-
return Center(child: FSelect<String>(
31-
divider: FItemDivider.full,
32-
format: (s) => s,
33-
children: [
34-
FSelectSection.fromMap(
35-
label: const Text('Group 1'),
36-
divider: FItemDivider.indented,
37-
items: {
38-
for (final item in ['1A', '1B']) item: item,
39-
},
40-
),
41-
FSelectSection.fromMap(
42-
label: const Text('Group 2'),
43-
items: {
44-
for (final item in ['2A', '2B']) item: item,
45-
},
46-
),
47-
FSelectItem('Item 3', 'Item 3'),
48-
FSelectItem('Item 4', 'Item 4'),
49-
],
50-
));
30+
return Center(
31+
child: FSelect<String>(
32+
divider: FItemDivider.full,
33+
format: (s) => s,
34+
children: [
35+
FSelectSection.fromMap(
36+
label: const Text('Group 1'),
37+
divider: FItemDivider.indented,
38+
items: {
39+
for (final item in ['1A', '1B']) item: item,
40+
},
41+
),
42+
FSelectSection.fromMap(
43+
label: const Text('Group 2'),
44+
items: {
45+
for (final item in ['2A', '2B']) item: item,
46+
},
47+
),
48+
FSelectItem('Item 3', 'Item 3'),
49+
FSelectItem('Item 4', 'Item 4'),
50+
],
51+
),
52+
);
5153
}
5254
}

forui/lib/src/widgets/toast/toaster_stack.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ class ToasterStack extends StatefulWidget {
4141
}
4242

4343
class _ToasterStackState extends State<ToasterStack> with SingleTickerProviderStateMixin {
44-
late final AnimationController _controller;
45-
late final Animation<double> _expand;
4644
final ValueNotifier<Swipe> _swiping = ValueNotifier(const Unswiped());
45+
late AnimationController _controller;
46+
late Animation<double> _expand;
4747
bool _autoDismiss = true;
4848
bool _hovered = false;
4949
int _monotonic = 0;

forui/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: forui
22
description: Beautifully designed, minimalistic widgets for desktop & touch devices.
3-
version: 0.14.0
3+
version: 0.14.1
44
homepage: https://forui.dev/
55
documentation: https://forui.dev/docs
66
repository: https://github.com/forus-labs/forui/tree/main/forui

0 commit comments

Comments
 (0)