TouchSurface constructor

const TouchSurface({
  1. required int rows,
  2. required int columns,
  3. required void onTouch(
    1. Point<int> coordinates,
    2. TouchAreaEvent event
    ),
  4. bool canPop = false,
  5. Map<Point<int>, String> areaDescriptions = const {},
  6. Map<GameShortcutsShortcut, Point<int>> areaShortcuts = const {},
  7. Widget childBuilder(
    1. BuildContext context,
    2. Point<int> point
    )?,
  8. Key? key,
})

Create an instance.

Implementation

const TouchSurface({
  required this.rows,
  required this.columns,
  required this.onTouch,
  this.canPop = false,
  this.areaDescriptions = const {},
  this.areaShortcuts = const {},
  this.childBuilder,
  super.key,
}) : assert(
        columns > 0 && rows > 0,
        'Both `rows` and `columns` must be at least 1.',
      );