aves/lib/utils/android_app_service.dart
2019-08-11 00:23:08 +09:00

18 lines
512 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class AndroidAppService {
static const platform = const MethodChannel('deckers.thibault/aves/app');
static share(String uri, String mimeType) async {
try {
await platform.invokeMethod('share', <String, dynamic>{
'title': 'Share via:',
'uri': uri,
'mimeType': mimeType,
});
} on PlatformException catch (e) {
debugPrint('share failed with exception=${e.message}');
}
}
}