diff --git a/lib/flutter_share_me.dart b/lib/flutter_share_me.dart index fff14ec..7859283 100644 --- a/lib/flutter_share_me.dart +++ b/lib/flutter_share_me.dart @@ -5,7 +5,7 @@ class FlutterShareMe { ///share to facebook Future shareToFacebook({String msg = '', String url = ''}) async { - final Map arguments = Map() as Map; + final Map arguments = Map(); arguments.putIfAbsent('msg', () => msg); arguments.putIfAbsent('url', () => url); dynamic result; @@ -19,7 +19,7 @@ class FlutterShareMe { ///share to twitter Future shareToTwitter({String msg = '', String url = ''}) async { - final Map arguments = Map() as Map; + final Map arguments = Map(); arguments.putIfAbsent('msg', () => msg); arguments.putIfAbsent('url', () => url); dynamic result; @@ -32,9 +32,8 @@ class FlutterShareMe { } ///share to WhatsApp - Future shareToWhatsApp( - {String msg = '', String base64Image = ''}) async { - final Map arguments = Map() as Map; + Future shareToWhatsApp({String msg = '', String base64Image = ''}) async { + final Map arguments = Map(); arguments.putIfAbsent('msg', () => msg); arguments.putIfAbsent('url', () => base64Image); dynamic result; @@ -48,9 +47,8 @@ class FlutterShareMe { } ///share to WhatsApp4Biz - Future shareToWhatsApp4Biz( - {String msg = '', String base64Image = ''}) async { - final Map arguments = Map() as Map; + Future shareToWhatsApp4Biz({String msg = '', String base64Image = ''}) async { + final Map arguments = Map(); arguments.putIfAbsent('msg', () => msg); arguments.putIfAbsent('url', () => base64Image); dynamic result; @@ -65,7 +63,7 @@ class FlutterShareMe { ///use system share ui Future shareToSystem({String? msg}) async { - Map arguments = Map(); + Map arguments = Map(); arguments.putIfAbsent('msg', () => msg); dynamic result; try {