AttributedText class

AttributedText is a class which is used to style the text

AttributedText(
   start: 0,
   end: 5,
   underlyingText: 'Hello',
   style: TextStyle(
   color: Colors.pink,
   ),
   onTap: (text) {
   print(text);
   },
   );

Constructors

AttributedText({required int start, required int end, String? underlyingText, TextStyle? style, dynamic onTap(String)?, EdgeInsetsGeometry? padding, Color? backgroundColor, double? borderRadius, Border? border, bool isBlockElement = false})

Properties

backgroundColor Color?
backgroundColor is a Color object which is used to give background color to the text
getter/setter pair
border Border?
border is a Border object which is used to give border to the text container Useful for Slack-style blockquotes with left border
getter/setter pair
borderRadius double?
borderRadius is a double value which is used to give border radius to the text
getter/setter pair
end int
end is an integer value which is used to store the end index of the text
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isBlockElement bool
isBlockElement indicates if this is a block-level element (like code block or blockquote) Block elements should take full width and have distinct visual styling
getter/setter pair
onTap ↔ dynamic Function(String)?
onTap is a function which is used to perform some action when the text is tapped
getter/setter pair
padding EdgeInsetsGeometry?
padding is a EdgeInsetsGeometry object which is used to give padding to the text
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start int
start is an integer value which is used to store the start index of the text
getter/setter pair
style TextStyle?
style is a TextStyle object which is used to style the text
getter/setter pair
underlyingText String?
underlyingText is a String value which is used to store the text
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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