LabelTheme constructor
const
LabelTheme({
- TextStyle textStyle = const TextStyle(fontSize: 12.0),
- Color? backgroundColor,
- BoxBorder? border,
- BorderRadius borderRadius = const BorderRadius.all(Radius.circular(4.0)),
- EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
- double maxWidth = double.infinity,
- int? maxLines,
- double offset = 0.0,
- double labelGap = 8.0,
Creates a label theme with the specified styling properties.
Parameters:
textStyle: The text style for the label textbackgroundColor: Background color of the label containerborder: Border decoration (use Border.all() for simple borders)borderRadius: Border radius for rounded cornerspadding: Padding inside the label containermaxWidth: Maximum width before text wraps (default: infinite, no wrapping)maxLines: Maximum number of lines (default: null, unlimited)offset: Default perpendicular offset from the connection pathlabelGap: Minimum gap from endpoints when anchor is 0.0 or 1.0 (default: 8.0)
Implementation
const LabelTheme({
this.textStyle = const TextStyle(fontSize: 12.0),
this.backgroundColor,
this.border,
this.borderRadius = const BorderRadius.all(Radius.circular(4.0)),
this.padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
this.maxWidth = double.infinity,
this.maxLines,
this.offset = 0.0,
this.labelGap = 8.0,
});