Legend constructor
Legend({
- bool? isVisible,
- LegendPosition? position,
- ChartAlignment? alignment,
- Color? backgroundColor,
- Color? borderColor,
- double? borderWidth,
- double? opacity,
- String? height,
- String? width,
- double? padding,
- double? iconHeight,
- double? iconWidth,
- bool? toggleSeriesVisibility,
- TextStyle? textStyle,
- bool? isResponsive,
- LegendItemOrientation? orientation,
- LegendTitle? title,
- LegendItemOverflowMode? overflowMode,
- LegendItemBuilder? legendItemBuilder,
- Color? iconBorderColor,
- double? iconBorderWidth,
- double? itemPadding,
- ImageProvider<
Object> ? image,
Creating an argument constructor of Legend class.
Implementation
Legend(
{bool? isVisible,
LegendPosition? position,
ChartAlignment? alignment,
this.backgroundColor,
Color? borderColor,
double? borderWidth,
double? opacity,
this.height,
this.width,
double? padding,
double? iconHeight,
double? iconWidth,
bool? toggleSeriesVisibility,
TextStyle? textStyle,
bool? isResponsive,
LegendItemOrientation? orientation,
LegendTitle? title,
LegendItemOverflowMode? overflowMode,
this.legendItemBuilder,
Color? iconBorderColor,
double? iconBorderWidth,
double? itemPadding,
this.image})
: isVisible = isVisible ?? false,
position = position ?? LegendPosition.auto,
alignment = alignment ?? ChartAlignment.center,
borderColor = borderColor ?? Colors.transparent,
borderWidth = borderWidth ?? 0.0,
iconBorderColor = iconBorderColor ?? Colors.transparent,
iconBorderWidth = iconBorderWidth ?? 0.0,
opacity = opacity ?? 1.0,
padding = padding ?? 10.0,
textStyle = _getTextStyle(
textStyle: textStyle,
fontSize: 13.0,
fontStyle: FontStyle.normal,
fontFamily: 'Segoe UI'),
iconHeight = iconHeight ?? 12.0,
iconWidth = iconWidth ?? 12.0,
toggleSeriesVisibility = toggleSeriesVisibility ?? true,
isResponsive = isResponsive ?? false,
orientation = orientation ?? LegendItemOrientation.auto,
overflowMode = overflowMode ?? LegendItemOverflowMode.scroll,
itemPadding = itemPadding ?? 15.0,
title = title ?? LegendTitle();