veilid/veilid-flutter/lib/veilid_plugin_stub_web.dart

18 lines
533 B
Dart
Raw Normal View History

2022-01-16 16:19:01 +00:00
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
2022-03-16 03:02:24 +00: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-07 02:18:42 +00:00
class VeilidPluginStubWeb {
2022-03-16 03:02:24 +00:00
static void registerWith(Registrar registrar) {}
2022-01-16 16:19:01 +00:00
Future<dynamic> handleMethodCall(MethodCall call) async {
2022-03-16 03:02:24 +00:00
throw PlatformException(
code: 'Unimplemented',
2023-07-26 18:20:17 +00:00
details: "Veilid for Web doesn't implement '${call.method}'",
2022-03-16 03:02:24 +00:00
);
2022-01-16 16:19:01 +00:00
}
}