execute method

Future execute(
  1. BuildContext context, {
  2. JSON data = const {},
})

Implementation

Future<dynamic> execute(BuildContext context, {JSON data = const {}}) {
  switch (type.toLowerCase()) {
    case 'route':
      return _route(context);

    case 'command':
      return _command(context, data);

    default:
      return Future.value(null);
  }
}