Created
September 26, 2022 12:55
-
-
Save haashem/e3a8ef0fcad1e5a8eff2ef026a6642cd to your computer and use it in GitHub Desktop.
Responsive Modal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Widget build(BuildContext context) { | |
return AnimatedLayout( | |
duration: const Duration(milliseconds: 250), | |
layoutState: Responsive.isMobile(context) ? LayoutState.open : LayoutState.close, | |
fromBuilder: (context) => _NonMobileModal( | |
icon: icon, | |
title: title, | |
onCloseButtonPressed: onCloseButtonPressed, | |
child: child), | |
toBuilder: (context) => _MobileModal( | |
icon: icon, | |
title: title, | |
onCloseButtonPressed: onCloseButtonPressed, | |
child: child), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment