aves/lib/utils/viewer_service.dart
2020-03-16 14:40:08 +09:00

16 lines
491 B
Dart

import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
class ViewerService {
static const platform = MethodChannel('deckers.thibault/aves/viewer');
static Future<Map> getSharedEntry() async {
try {
// return nullable map with: 'uri' 'mimeType'
return await platform.invokeMethod('getSharedEntry') as Map;
} on PlatformException catch (e) {
debugPrint('getSharedEntry failed with exception=${e.message}');
}
return {};
}
}