ResponsiveLayoutWidget class

Widget that shows different children depending of screen type, the screen was set from ResponsiveWrapper using globalBreakpoints, and you can override the globalBreakpoints for localBreakpoints.

ResponsiveLayoutWidget(
  mobile: MobileChild(),
  tablet: TabletChild(),
  desktop: DesktopChild(),
)

Also you can use the constructor ResponsiveLayoutWidget.builder, to return for each child the ResponsiveInformation

ResponsiveLayoutWidget.builder(
  mobile: (ctx, info) => MobileChild(),
  tablet: (ctx, info) => TabletChild(),
  desktop:(ctx, info) => DesktopChild(),
)
Inheritance

Constructors

ResponsiveLayoutWidget({Key? key, Widget mobile = const SizedBox(), Widget? tablet, Widget? desktop, ScreenBreakpoints? breakpoints})
const
ResponsiveLayoutWidget.builder({Key? key, RBuilder? mobile, RBuilder? tablet, RBuilder? desktop, ScreenBreakpoints? breakpoints})
const

Properties

breakpoints ScreenBreakpoints?
Are the local breakpoints for the widget
final
desktop → dynamic
This value may be type Widget or RBuilder
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mobile → dynamic
This value may be type Widget or RBuilder
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tablet → dynamic
This value may be type Widget or RBuilder
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
returnValue(dynamic data, BuildContext context, ResponsiveInformation info) Widget
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}) 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