$new static method

$Value? $new(
  1. Runtime runtime,
  2. $Value? thisValue,
  3. List<$Value?> args
)

Wrapper for the Scalebar.new constructor

Implementation

static $Value? $new(Runtime runtime, $Value? thisValue, List<$Value?> args) {
  return $Scalebar.wrap(
    Scalebar(
      key: args[0]?.$value,
      alignment: args[1]?.$value ?? Alignment.topRight,
      textStyle:
          args[2]?.$value ??
          const TextStyle(color: Color(0xFF000000), fontSize: 14),
      lineColor: args[3]?.$value ?? const Color(0xFF000000),
      strokeWidth: args[4]?.$value ?? 2,
      lineHeight: args[5]?.$value ?? 5,
      padding: args[6]?.$value ?? const EdgeInsets.all(10),
      length: args[7]?.$value ?? ScalebarLength.m,
    ),
  );
}