Heading class Null safety

The Heading widget displays a string of text with set of default style of NativeBase Design System such as fontSize and letterSpacing. The string might break across multiple lines or might all be displayed on the same line depending on the layout constraints.

Example

An basic example of the NBText widget

Heading(
  text: "Hello There !",
  color: 'cyan.600',
)

The above example shows that the Heading widget as a default size of lg.

Inheritance

Constructors

Heading({Key? key, required String text, String? color, String? fontFamily, String? fontSize, String? fontStyle, String? fontWeight, String? letterSpacing, String? lineHeight, String? textAlign, String? textDecoration, String? textTransform, String? size = 'lg'})
const

Properties

color String?
Sets the font color of the string of the NBText
final, inherited
fontFamily String?
Sets the fontFamily to the NBText string
final, inherited
fontSize String?
Sets the fontSize to the NBText string
final, inherited
fontStyle String?
Sets the fontStyle to the NBText string
final, inherited
fontWeight String?
Sets the fontStyle to the NBText string
final, inherited
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
letterSpacing String?
Sets the letterSpacing to the NBText string
final, inherited
lineHeight String?
Sets the lineHeight to the NBText string
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size String?
final
text String
Sets the String as child of the NBText
final, inherited
textAlign String?
Sets the lineHeight to the NBText string
final, inherited
textDecoration String?
Sets the lineHeight to the NBText string
final, inherited
textTransform String?
Sets the textTransform to the NBText string
final, inherited

Methods

build(BuildContext context) Widget
Build method is responsible for building the entire widget by using the resolvers
inherited
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.
@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
resolveComponentLevelTheme(BuildContext context, Map<String, dynamic> styles, {String? component}) Map<String, dynamic>
inherited
resolveProps({required Map<String, dynamic> resolvedTokens}) Map<String, dynamic>
inherited
resolveTokens({required Map<String, dynamic> toJson, required BuildContext context, Component? component}) Map<String, dynamic>
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
toJson() Map<String, dynamic>
Holds the override implementation of the widget to get json format of the widget class
override
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