27 lines
881 B
Dart
27 lines
881 B
Dart
// In order to *not* need this ignore, consider extracting the "web" version
|
|
// of your plugin as a separate package, instead of inlining it in the same
|
|
// package as the core of your plugin.
|
|
// ignore: avoid_web_libraries_in_flutter
|
|
|
|
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
|
import 'package:web/web.dart' as web;
|
|
|
|
import 'union_ad_ssgf_platform_interface.dart';
|
|
|
|
/// A web implementation of the UnionAdSsgfPlatform of the UnionAdSsgf plugin.
|
|
class UnionAdSsgfWeb extends UnionAdSsgfPlatform {
|
|
/// Constructs a UnionAdSsgfWeb
|
|
UnionAdSsgfWeb();
|
|
|
|
static void registerWith(Registrar registrar) {
|
|
UnionAdSsgfPlatform.instance = UnionAdSsgfWeb();
|
|
}
|
|
|
|
/// Returns a [String] containing the version of the platform.
|
|
@override
|
|
Future<String?> getPlatformVersion() async {
|
|
final version = web.window.navigator.userAgent;
|
|
return version;
|
|
}
|
|
}
|