TextStyleUtil class
Utility class for text style operations in charts.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
annotation(
{Color color = const Color(0xFF444444), double fontSize = 11, FontWeight fontWeight = FontWeight.normal, FontStyle fontStyle = FontStyle.italic, String? fontFamily}) → TextStyle - Creates an annotation text style.
-
axisLabel(
{Color color = const Color(0xFF666666), double fontSize = 11, FontWeight fontWeight = FontWeight.normal, String? fontFamily}) → TextStyle - Creates an axis label style.
-
fitFontSize(
String text, TextStyle style, Size bounds, {double minFontSize = 8, double maxFontSize = 24}) → double - Calculates the optimal font size to fit text within bounds.
-
label(
{Color color = const Color(0xFF333333), double fontSize = 12, FontWeight fontWeight = FontWeight.normal, String? fontFamily}) → TextStyle - Creates a default chart label style.
-
legend(
{Color color = const Color(0xFF333333), double fontSize = 11, FontWeight fontWeight = FontWeight.normal, String? fontFamily}) → TextStyle - Creates a legend text style.
-
measureText(
String text, TextStyle style, {double? maxWidth}) → Size - Measures the size of text with the given style.
-
tickLabel(
{Color color = const Color(0xFF888888), double fontSize = 10, FontWeight fontWeight = FontWeight.normal, String? fontFamily}) → TextStyle - Creates a tick label style.
-
title(
{Color color = const Color(0xFF000000), double fontSize = 16, FontWeight fontWeight = FontWeight.bold, String? fontFamily}) → TextStyle - Creates a chart title style.
-
tooltip(
{Color color = const Color(0xFFFFFFFF), double fontSize = 12, FontWeight fontWeight = FontWeight.normal, String? fontFamily}) → TextStyle - Creates a tooltip text style.
-
truncateText(
String text, TextStyle style, double maxWidth, {String ellipsis = '...'}) → String - Truncates text to fit within a width, adding ellipsis.