LayoutMatchConfig constructor
LayoutMatchConfig({
- Set<
AdaptivePlatform> ? platforms, - bool breakpointMatcher(
- BreakpointId activeId
- Orientation? orientationMatcher,
- bool formFactorMatcher(
- DeviceFormFactor formFactor
- required Widget? builder(
- ActiveLayoutInfo layoutInfo
- bool isPersistent = false,
Creates a LayoutMatchConfig.
At least one condition (platforms, breakpointMatcher, or orientationMatcher)
should typically be provided, along with the builder.
Implementation
LayoutMatchConfig({
this.platforms,
this.breakpointMatcher,
this.orientationMatcher,
this.formFactorMatcher, // Added to constructor
required this.builder,
this.isPersistent = false, // Default to false
}) : _specificity = (platforms?.isNotEmpty == true ? 1 : 0) +
(breakpointMatcher != null ? 1 : 0) +
(orientationMatcher != null ? 1 : 0) +
(formFactorMatcher != null
? 1
: 0);