20 lines
475 B
Dart
20 lines
475 B
Dart
import 'package:flutter/services.dart';
|
|
|
|
class GoogleCast {
|
|
static const _channel = MethodChannel('google_cast');
|
|
|
|
static Future<void> showCastDialog() async {
|
|
await _channel.invokeMethod('showCastDialog');
|
|
}
|
|
|
|
static Future<void> loadUrl(String url, String mimeType) async {
|
|
await _channel.invokeMethod('loadUrl', {
|
|
'url': url,
|
|
'mimeType': mimeType,
|
|
});
|
|
}
|
|
|
|
static Future<void> stop() async {
|
|
await _channel.invokeMethod('stop');
|
|
}
|
|
}
|