AdaptiveLayout constructor
const
AdaptiveLayout({
- Key? key,
- AdaptiveBuilder? largeBuilder,
- AdaptiveBuilder? mediumBuilder,
- AdaptiveBuilder? smallBuilder,
- Widget? child,
- ScreenSizeQualifier? qualifier,
This widget will call the provided qualifier or BreakpointsQualifier if empty to extract the device's ScreenSize and build an appropriate layout for it.
If child is provided, it will be built exactly once and than it will be used to call the matched builder function:
largeBuilder for ScreenSize.large, mediumBuilder for ScreenSize.medium and smallBuilder for ScreenSize.small.
If none of the builders is set, then the child would be returned.
If neither any of the builders nor child is provided the UnimplementedError would be thrown.
Implementation
const AdaptiveLayout({
super.key,
this.largeBuilder,
this.mediumBuilder,
this.smallBuilder,
this.child,
this.qualifier,
});