veilid/veilid-flutter/lib/veilid_plugin_stub_web.dart

18 lines
533 B
Dart
Raw Normal View History

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