Skip to content

Commit

Permalink
fix #36 #38
Browse files Browse the repository at this point in the history
  • Loading branch information
李卓原 committed Jun 15, 2021
1 parent 0847d31 commit 3cbab61
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lib/flutter_share_me.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class FlutterShareMe {

///share to facebook
Future<String?> shareToFacebook({String msg = '', String url = ''}) async {
final Map<String, Object> arguments = Map<String, dynamic>() as Map<String, Object>;
final Map<String, dynamic> arguments = Map<String, dynamic>();
arguments.putIfAbsent('msg', () => msg);
arguments.putIfAbsent('url', () => url);
dynamic result;
Expand All @@ -19,7 +19,7 @@ class FlutterShareMe {

///share to twitter
Future<String?> shareToTwitter({String msg = '', String url = ''}) async {
final Map<String, Object> arguments = Map<String, dynamic>() as Map<String, Object>;
final Map<String, dynamic> arguments = Map<String, dynamic>();
arguments.putIfAbsent('msg', () => msg);
arguments.putIfAbsent('url', () => url);
dynamic result;
Expand All @@ -32,9 +32,8 @@ class FlutterShareMe {
}

///share to WhatsApp
Future<String?> shareToWhatsApp(
{String msg = '', String base64Image = ''}) async {
final Map<String, Object> arguments = Map<String, dynamic>() as Map<String, Object>;
Future<String?> shareToWhatsApp({String msg = '', String base64Image = ''}) async {
final Map<String, dynamic> arguments = Map<String, dynamic>();
arguments.putIfAbsent('msg', () => msg);
arguments.putIfAbsent('url', () => base64Image);
dynamic result;
Expand All @@ -48,9 +47,8 @@ class FlutterShareMe {
}

///share to WhatsApp4Biz
Future<String?> shareToWhatsApp4Biz(
{String msg = '', String base64Image = ''}) async {
final Map<String, Object> arguments = Map<String, dynamic>() as Map<String, Object>;
Future<String?> shareToWhatsApp4Biz({String msg = '', String base64Image = ''}) async {
final Map<String, dynamic> arguments = Map<String, dynamic>();
arguments.putIfAbsent('msg', () => msg);
arguments.putIfAbsent('url', () => base64Image);
dynamic result;
Expand All @@ -65,7 +63,7 @@ class FlutterShareMe {

///use system share ui
Future<String?> shareToSystem({String? msg}) async {
Map<String, Object?> arguments = Map<String, dynamic>();
Map<String, dynamic> arguments = Map<String, dynamic>();
arguments.putIfAbsent('msg', () => msg);
dynamic result;
try {
Expand Down

0 comments on commit 3cbab61

Please sign in to comment.