Legend constructor
const
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? shouldAlwaysShowScrollbar,
- bool? toggleSeriesVisibility,
- TextStyle? textStyle,
- bool? isResponsive,
- LegendItemOrientation? orientation,
- LegendTitle? title,
- LegendItemOverflowMode? overflowMode,
- LegendItemBuilder? legendItemBuilder,
- Color? iconBorderColor,
- double? iconBorderWidth,
- double? itemPadding,
- Offset? offset,
- ImageProvider<
Object> ? image,
Creating an argument constructor of Legend class.
Implementation
const 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? shouldAlwaysShowScrollbar,
bool? toggleSeriesVisibility,
this.textStyle,
bool? isResponsive,
LegendItemOrientation? orientation,
LegendTitle? title,
LegendItemOverflowMode? overflowMode,
this.legendItemBuilder,
Color? iconBorderColor,
double? iconBorderWidth,
double? itemPadding,
this.offset,
this.image})
: isVisible = isVisible ?? false,
shouldAlwaysShowScrollbar = shouldAlwaysShowScrollbar ?? 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,
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 ?? const LegendTitle();