EnvBanner class

Displays a message above the corner of another widget.

Useful for showing the excecution mode of and app (e.g. DEV, STG.), also to display the version of the app (e.g. 1.0.0).

Inheritance

Constructors

EnvBanner({Key? key, required String primary, required Widget child, String? secondary, Color color = Colors.red, Color textColor = Colors.white, double opacity = 0.75, double fontSize = 12, EnvBannerLocation location = EnvBannerLocation.topEnd, bool ignoreMediaPadding = false, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 4), EdgeInsetsGeometry margin = EdgeInsets.zero})
Create a EnvBanner
const

Properties

child Widget
The widget to show behind the banner.
final
color Color
The color of the banner.
final
fontSize double
The font size of the text shown in the banner.
final
hashCode int
The hash code for this object.
no setterinherited
ignoreMediaPadding bool
Ignore the media padding.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
location EnvBannerLocation
Where to show the banner (e.g. the upper right corner).
final
margin EdgeInsetsGeometry
The margin of the banner.
final
opacity double
The opacity of the banner.
final
padding EdgeInsetsGeometry
The padding of the banner.
final
primary String
The message to show in the banner.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondary String?
The secondary message to show in the banner.
final
textColor Color
The text color of the text shown in the banner.
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
getTexts() List<Widget>
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

Operators

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