BatteryIndicator class Null safety

Inheritance

Constructors

BatteryIndicator({bool batteryFromPhone = true, int batteryLevel = 25, BatteryIndicatorStyle style = BatteryIndicatorStyle.flat, double ratio = 2.5, Color mainColor = Colors.black, bool colorful = true, bool showPercentNum = true, bool showPercentSlide = true, double? percentNumSize, double size = 14.0})

Properties

batteryFromPhone bool
boolean to choose from where to obtain the value of the battery if it is true, the indicator will update in base of the phone battery, if not, you can controll with a variable
final
batteryLevel int
final
colorful bool
if colorful = true , then the fill color will automatic change depend on battery value
final
hashCode int
The hash code for this object.
@nonVirtual, read-only, inherited
key Key?
Controls how one widget replaces another widget in the tree.
final, inherited
mainColor Color
color of borderline , and fill color when colorful is false
final
percentNumSize double?
battery value font size, default to null
final
ratio double
widget`s width / height , default to 2.5:1
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
showPercentNum bool
whether show battery value , Recommended NOT set to True when colorful = false
final
showPercentSlide bool
whether paint fill color
final
size double
default to 14.0
final
style BatteryIndicatorStyle
indicator style,BatteryIndicatorStyle.flat and BatteryIndicatorStyle.skeumorphism
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _BatteryIndicatorState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.
@nonVirtual, inherited