FlexiConfig class
A widget that provides ScreenAdaptiveData to its descendants using an InheritedModel.
This widget should be placed at the root of your application (usually wrapping MaterialApp) to enable responsive scaling across the entire project. It captures MediaQuery changes and provides granular rebuilds via the 'width', 'height', 'pixelRatio', and 'breakpoint' aspects.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- FlexiConfig
Constructors
- FlexiConfig({Key? key, required Widget child, double designMinWidth = 360, double designMaxWidth = 1440, double designMinHeight = 480, double designMaxHeight = 1024, double mobilePortraitBreakpoint = 600, double mobileLandscapeBreakpoint = 768, double tabletLandscapeBreakpoint = 1100, TargetDeviceType targetDevice = TargetDeviceType.mobilePortrait, bool useParentConstraints = false, bool showDebugOverlay = false, bool allowImplicitRebuilds = false, FlexiSpacingConfig spacing = FlexiSpacingConfig.defaultConfig, FlexiTypographyConfig typography = FlexiTypographyConfig.defaultConfig, FlexiIconConfig icons = FlexiIconConfig.defaultConfig})
-
const
Properties
- allowImplicitRebuilds → bool
-
If
true, allows widgets to rebuild without specifying an aspect.final - child → Widget
-
The widget below this widget in the tree.
final
- designMaxHeight → double
-
The maximum height used during the design phase (default: 1024).
final
- designMaxWidth → double
-
The maximum width used during the design phase (default: 1440).
final
- designMinHeight → double
-
The minimum height used during the design phase (default: 480).
final
- designMinWidth → double
-
The minimum width used during the design phase (default: 360).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icons → FlexiIconConfig
-
Custom icon size configuration.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mobileLandscapeBreakpoint → double
-
The breakpoint below which a device in landscape mode is considered a phone (default: 768).
final
- mobilePortraitBreakpoint → double
-
The breakpoint below which a device in portrait mode is considered a phone (default: 480).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDebugOverlay → bool
-
If
true, displays a debug overlay with screen metrics.final - spacing → FlexiSpacingConfig
-
Custom spacing configuration.
final
- tabletLandscapeBreakpoint → double
-
The breakpoint above which a device in landscape mode is considered a desktop (default: 1024).
final
- targetDevice → TargetDeviceType
-
The primary device type this application was designed for.
final
- typography → FlexiTypographyConfig
-
Custom typography configuration.
final
- useParentConstraints → bool
-
If
true, this widget will wrap its child in a LayoutBuilder to derive dimensions from parent constraints instead of MediaQuery.final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
BuildContext context) → FlexiInheritedWidget