BoardArrow constructor

BoardArrow({
  1. required String from,
  2. required String to,
  3. Color? color,
})

Implementation

BoardArrow({
  required this.from,
  required this.to,
  Color? color,
})  : assert(from.length == 2 && to.length == 2),
      assert(squareRegex.hasMatch(from)),
      assert(squareRegex.hasMatch(to)),
      this.color = color ?? Colors.black.withOpacity(0.5);