veilid/veilid-flutter/lib/veilid_plugin_stub_web.dart

18 lines
536 B
Dart
Raw Normal View History

2022-01-16 10:19:01 -06:00
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
2022-03-15 22:02:24 -05:00
/// A stub web implementation of the Veilid plugin
/// Because everything is done with FFI or WASM, we don't use this interface
2022-02-06 20:18:42 -06:00
class VeilidPluginStubWeb {
2022-03-15 22:02:24 -05:00
static void registerWith(Registrar registrar) {}
2022-01-16 10:19:01 -06:00
Future<dynamic> handleMethodCall(MethodCall call) async {
2022-03-15 22:02:24 -05:00
throw PlatformException(
code: 'Unimplemented',
details: 'Veilid for Web doesn\'t implement \'${call.method}\'',
);
2022-01-16 10:19:01 -06:00
}
}