We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ToastPosition.copyWith
1 parent ab30ba8 commit 79c5edbCopy full SHA for 79c5edb
CHANGELOG.md
@@ -2,6 +2,7 @@
2
3
## 3.1.0
4
5
+- Support `copyWith` for `ToastPosition`. (#82)
6
- Integrate `animationBuilder` properly. (#81)
7
- **BREAKING CHANGE**: `handleTouth` -> `handleTouch`.
8
- Code cleanup.
lib/src/core/position.dart
@@ -15,6 +15,13 @@ class ToastPosition {
15
static const ToastPosition top =
16
ToastPosition(align: Alignment.topCenter, offset: 75.0);
17
18
+ ToastPosition copyWith({AlignmentGeometry? align, double? offset}) {
19
+ return ToastPosition(
20
+ align: align ?? this.align,
21
+ offset: offset ?? this.offset,
22
+ );
23
+ }
24
+
25
@override
26
String toString() => 'ToastPosition(align: $align, offset: $offset)';
27
}
0 commit comments