NBText class
The NBText widget displays a string of text with single style. The string might break across multiple lines or might all be displayed on the same line depending on the layout constraints. It is similar to a Text in Material Widget.
Example
NBText(
text: "Hello There !",
color: 'red.600',
fontSize: 'lg',
fontStyle: 'italic',
letterSpacing: 'xl',
fontWeight: 'black',
)
- Inheritance
- Implemented types
- Implementers
Constructors
- NBText({String? fontFamily, String? fontSize, String? fontStyle, String? fontWeight, String? letterSpacing, String? lineHeight, String? textAlign, String? textDecoration, String? textTransform, Key? key, required String text, String? color})
-
The NBText widget displays a string of text with single style. The string
might break across multiple lines or might all be displayed on the same line
depending on the layout constraints.
const
Properties
- color → String?
-
Sets the font color of the string of the NBText
final
- fontFamily → String?
-
Sets the fontFamily to the NBText string
final
- fontSize → String?
-
Sets the fontSize to the NBText string
final
- fontStyle → String?
-
Sets the fontStyle to the NBText string
final
- fontWeight → String?
-
Sets the fontStyle to the NBText string
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- letterSpacing → String?
-
Sets the letterSpacing to the NBText string
final
- lineHeight → String?
-
Sets the lineHeight to the NBText string
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
Sets the String as child of the NBText
final
- textAlign → String?
-
Sets the lineHeight to the NBText string
final
- textDecoration → String?
-
Sets the lineHeight to the NBText string
final
- textTransform → String?
-
Sets the textTransform to the NBText string
final
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.
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
-
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, 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