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

升级到null-safety

parent 0a01c1d6
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
class FlutterNativeToast { class FlutterNativeToast {
static const MethodChannel _channel = static const MethodChannel _channel = const MethodChannel('flutter_native_toast');
const MethodChannel('flutter_native_toast');
static showToast(String msg, static showToast(String msg,{ToastDuration duration = ToastDuration.LENGTH_SHORT,ToastPosition position = ToastPosition.center}) {
{ToastDuration duration = ToastDuration.LENGTH_SHORT, _channel.invokeMethod('showToast',{"msg": msg, "duration": duration.index, "position": position.index});
ToastPosition position = ToastPosition.center}) {
_channel.invokeMethod('showToast',
{"msg": msg, "duration": duration.index, "position": position.index});
} }
} }
......
...@@ -4,7 +4,7 @@ version: 1.0.0 ...@@ -4,7 +4,7 @@ version: 1.0.0
homepage: homepage:
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.10.0" flutter: ">=1.10.0"
dependencies: 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