generate method

  1. @override
Widget generate(
  1. Context context
)
override

Implementation

@override
Widget generate(Context context) {
  if (context.version < 19.4) {
    throw "Ride requires at least version 19.4";
  }

  return CommandBuilder('ride $entity').when(
    vehicle == null,
    then: 'dismount',
    otherwise: 'mount $vehicle',
  );
}