ResponsiveWidget class

Refer to https://gitlab.slade360emr.com/optimalhealth/healthcloud/-/merge_requests/355/diffs if you want to introduce medium screen in future Widget that draws depending on screen size as specified by the breakpoints.

Inheritance

Constructors

ResponsiveWidget({Widget? largeScreen, Widget? mediumScreen, Widget? smallScreen})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
largeScreen Widget?
Creates a ResponsiveWidget.
final
mediumScreen Widget?
Widget to be drawn on a medium screen.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
smallScreen Widget?
Widget to be drawn on a small screen.
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}) 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

deviceType(BuildContext context) DeviceScreensType
returns the device type but first checks the device orientation before checking its width
isLandscape({required BuildContext context}) bool
checks if a devices orientation is in landscape mode
isLargeScreen(BuildContext context) bool
Point to note (Using an iPad 9.7" as a test case)
isSmallScreen(BuildContext context) bool
Small screen is any screen whose width is less than smallScreenBreakPoint pixels
isSmallScreenAndOnLandscape({required BuildContext context}) bool
preferredPaddingOnStretchedScreens({required BuildContext context}) double
preferredPaddingOnStretchedScreens function is used to calculate give a constant size in width of the items to be displayed on the screen First it gets the width of the device Subtracts 420 which is a one size fit all constant for widgets on a stretched view/display The difference is then divided by 2 to get the size that will be feed to our padding so that the widgets take up a width of 420