added content position animation when error bar is displayed
This commit is contained in:
parent
3802e4a5b9
commit
2db3b29359
@ -13,7 +13,9 @@ class ErrorBar extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) => ControllerProvider<ErrorBarController>(
|
||||
create: (context) => ErrorBarController(),
|
||||
child: (context) => AnimatedSwitcher(
|
||||
child: (context) => AnimatedSize(
|
||||
duration: animationDuration,
|
||||
child: AnimatedSwitcher(
|
||||
duration: animationDuration,
|
||||
transitionBuilder: (Widget child, Animation<double> animation) => SlideTransition(
|
||||
position: Tween<Offset>(
|
||||
@ -25,6 +27,7 @@ class ErrorBar extends StatelessWidget {
|
||||
child: Visibility(
|
||||
key: Key(visible.hashCode.toString()),
|
||||
visible: visible,
|
||||
replacement: const SizedBox(width: double.infinity),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
var controller = context.watchController<ErrorBarController>();
|
||||
@ -50,5 +53,6 @@ class ErrorBar extends StatelessWidget {
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user