BuildContext class

Constructors

BuildContext({required Widget widget, BuildContext? parent, Map<Type, Widget>? inheritedWidgets, Map<Type, dynamic>? states, String? path, SlotTracker? slotTracker, State<StatefulWidget>? currentBuildingState})

Properties

currentBuildingState → State<StatefulWidget>?
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
no setter
inheritedWidgets → Map<Type, Widget>
final
isDesktop → bool
no setter
isMobile → bool
no setter
isTablet → bool
no setter
mediaQuery → MediaQuery
Access media query info (screen size, etc)
no setter
parent → BuildContext?
final
path → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
slotTracker → SlotTracker
final
states → Map<Type, dynamic>
no setter
theme → ThemeData
Access the current theme
no setter
widget → Widget
final
width → double
Shortcuts for responsive design
no setter

Methods

copyWith({Widget? widget, Map<Type, Widget>? inheritedWidgets, Map<Type, dynamic>? states, String? path, SlotTracker? slotTracker, State<StatefulWidget>? currentBuildingState}) → BuildContext
dependOnInheritedWidgetOfExactType<T>() → T?
findAncestorStateOfType<T>() → T?
nextSlot() → int
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