BSBreakPoints class
A class for managing break points, their labels and values values are based on the current screen width
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
breakPointLabels
→ List<
String> -
a list containing the breakpoint labels from smallest to largest
"" -> xxl
final
-
breakPoints
→ Map<
String, double> -
Map containing breakpoint labels as keys, and the
corresponding breakpoint widths
"": 576
sm: 576
md: 768
lg: 992
xl: 1200
xxl: 1400
final
-
containerWidths
→ Map<
String, double> -
Map containing breakpoint labels, and the corresponding
container widths, note that "" breakpoint is -1.
this is because is must be set to screen width
"": screen width
sm: 540
md: 720
lg: 960
xl: 1140
xxl: 1320
final
-
modalTypes
→ List<
String> -
list containing the valid modal types
sm
md
lg
xl
final
-
modalTypesAndSizes
→ Map<
String, double> -
map containing the types of modal, and their widths
sm: 300
md: 500
lg: 800
xl: 1400
final
-
textTypes
→ List<
String> -
List containing types of text
p
h1
h2
h3
h4
h5
h6
final
-
textTypesAndSizes
→ Map<
String, Map< String, double> > -
A map containing the small and large text sizes for the text that
are a _textTypes
p
h1
h2
h3
h4
h5
h6
final
Static Methods
-
columnWidthFromBreakPointTriggers(
{required double maxWidth, required double screenWidth, required List< String> breakPointTriggers}) → double - returns the width a column should be based on it's breakpoints ex: col-lg-6 would set width to 50% of container width when breakpoint is lg
-
currentBreakPointLabel(
BuildContext context) → String - returns the current breakpoint label based on the screen width
-
getBreakPointLabels(
) → List< String> - returns array of break point labels "" "sm" "md" "lg" "xl" "xxl"
-
getBreakPoints(
) → Map< String, double> - returns map with breakpoints "": 576, //< "sm": 576, //>= "md": 768, //>= "lg": 992, //>= "xl": 1140, //>= "xxl": 1400, //>=
-
getContainerWidth(
String key) → double - returns a container width based on the passed breakpoint "": -1, because must be generated sm: 540, md: 720, lg: 960, xl: 1140, xxl: 1320,
-
getContainerWidths(
) → Map< String, double> - returns all container widths, based on breakpoint "": -1, because must be generated sm: 540, md: 720, lg: 960, xl: 1140, xxl: 1320,
-
getDynamicModalWidth(
BuildContext context) → double - returns a width based on the current context's width "", sm = 300 md = 500 lg, xl = 800 xxl = 1140
-
getModalWidthBasedOnType(
String type) → double - returns the width a modal should be based on the passed type sm = 300 md = 500 lg = 800 xl = 1140
-
getTextFontSize(
BuildContext context, String textType, {double small = -1, double large = -1}) → double - Returns the size a text type should be based on the screen size. Can have a custom small and or large size passed, otherwise the default large and small sizes are used. The valid textType are: p h1 h2 h3 h4 h5 h5
-
valueBasedOnBreakPoint(
{required BuildContext context, required Map< String, dynamic> map}) → dynamic - returns a custom value based on the current screen size valid key values are (case sensitive, only lowercase) '' 'sm' 'md' 'lg' 'xl' 'xxl'
-
valueBasedOnBreakPointFromDefinedWidth(
{required double width, required Map< String, dynamic> map}) → dynamic