handle method

  1. @override
Future handle(
  1. Context context,
  2. dynamic data
)
override

Implementation

@override
Future handle(Context context, data) async {
  final exceptions = <Exception>[];
  for (final schema in schemas) {
    try {
      return await schema.handle(context, data);
    } on Exception catch (e) {
      exceptions.add(e);
    }
  }

  throw OvOException(
    code: #any_of,
    message: message ?? 'Any schema must be valid',
    exceptions: exceptions,
  );
}