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