mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-03-11 21:35:32 +00:00
15 lines
434 B
Dart
15 lines
434 B
Dart
abstract class ProtocolHandler {
|
|
void register(String scheme, {String? executable, List<String>? arguments});
|
|
|
|
void unregister(String scheme);
|
|
|
|
List<String> getArguments(List<String>? arguments) {
|
|
if (arguments == null) return ['%s'];
|
|
|
|
if (arguments.isEmpty && !arguments.any((e) => e.contains('%s'))) {
|
|
throw ArgumentError('arguments must contain at least 1 instance of "%s"');
|
|
}
|
|
|
|
return arguments;
|
|
}
|
|
}
|