BSContainerInheritance class

The InheritedWidget, which passes data to all the children of BSContainer, allows children to update when BSContainer data updates, usually from a screen resize

Inheritance

Constructors

BSContainerInheritance({Key? key, required Widget child, required double containerWidth, required BSBreakPointLabels currentBSBreakPointLabel})
The InheritedWidget, which passes data to all the children of BSContainer, allows children to update when BSContainer data updates, usually from a screen resize
const

Properties

child → Widget
The widget below this widget in the tree.
finalinherited
containerWidth → double
the current width of the nearest parent BSContainer
final
currentBSBreakPointLabel → BSBreakPointLabels
the current breakpoint label of the nearest parent BSContainer
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() → InheritedElement
Inflates this configuration to a concrete instance.
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
updateShouldNotify(covariant BSContainerInheritance oldWidget) → bool
no need to call this function manually usually
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

of(BuildContext context) → BSContainerInheritance
confirm the passed context contains BSContainerInheritance, and if there is one, or more pass the nearest BSContainerInheritance in the Widget tree use this function to access BSContainerInheritance's data
valueBasedOnBreakPoint({required BuildContext context, required Map<BSBreakPointLabels, dynamic> map}) → dynamic
returns the value in the map based on the current breakpoint. if there is a missing breakpoint in the map null may be returned map example: { BSBreakPointLabels.xxl: "1", BSBreakPointLabels.xl: "2", BSBreakPointLabels.lg: "3", BSBreakPointLabels.md: "4", BSBreakPointLabels.sm: "5", BSBreakPointLabels.none: "6", }

Constants

breakPoints → const Map<BSBreakPointLabels, double>
BSBreakPointLabels.xxl: 1400.0, // >= BSBreakPointLabels.xl: 1200.0, // >= BSBreakPointLabels.lg: 992.0, // >= BSBreakPointLabels.md: 768.0, // >= BSBreakPointLabels.sm: 576.0, // >= BSBreakPointLabels.none: 576.0, // <
containerWidths → const Map<BSBreakPointLabels, double>
width of the container at each breakpoint. Unless the max width is smaller, or the container is in fluid mode BSBreakPointLabels.xxl: 1320.0, BSBreakPointLabels.xl: 1140.0, BSBreakPointLabels.lg: 960.0, BSBreakPointLabels.md: 720.0, BSBreakPointLabels.sm: 540.0, // smallest = parent width