Commit 9b4fec6b authored by 汪林玲's avatar 汪林玲

升级到null-safety

parent 0a01c1d6
import 'package:flutter/services.dart';
class FlutterNativeToast {
static const MethodChannel _channel =
const MethodChannel('flutter_native_toast');
static const MethodChannel _channel = const MethodChannel('flutter_native_toast');
static showToast(String msg,
{ToastDuration duration = ToastDuration.LENGTH_SHORT,
ToastPosition position = ToastPosition.center}) {
_channel.invokeMethod('showToast',
{"msg": msg, "duration": duration.index, "position": position.index});
static showToast(String msg,{ToastDuration duration = ToastDuration.LENGTH_SHORT,ToastPosition position = ToastPosition.center}) {
_channel.invokeMethod('showToast',{"msg": msg, "duration": duration.index, "position": position.index});
}
}
......
......@@ -4,7 +4,7 @@ version: 1.0.0
homepage:
environment:
sdk: ">=2.7.0 <3.0.0"
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.10.0"
dependencies:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment