check share plugin usage (#567)

* replace share plugin with share_plus

* fix share button on receive screen

* add share button for btc, ltc wallets
This commit is contained in:
Serhii
2022-10-26 11:05:08 -04:00
committed by GitHub
parent 95ecf4ef56
commit 4f2cf983de
4 changed files with 37 additions and 29 deletions
+12 -18
View File
@@ -6,7 +6,7 @@ import 'package:cw_core/wallet_type.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
// import 'package:esys_flutter_share/esys_flutter_share.dart';
import 'package:share_plus/share_plus.dart';
import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/di.dart';
@@ -92,23 +92,17 @@ class ReceivePage extends BasePage {
Image.asset('assets/images/share.png',
color: Theme.of(context).accentTextTheme!.headline2!.backgroundColor!);
return SizedBox(
height: 20.0,
width: 20.0,
child: ButtonTheme(
minWidth: double.minPositive,
child: TextButton(
// FIX-ME: Style
//highlightColor: Colors.transparent,
//splashColor: Colors.transparent,
//padding: EdgeInsets.all(0),
onPressed: () {
// FIX-ME: Share esys_flutter_share.dart
// Share.text(S.current.share_address,
// addressListViewModel.address.address, 'text/plain')
},
child: shareImage),
),
return Material(
color: Colors.transparent,
child: IconButton(
padding: EdgeInsets.zero,
constraints: BoxConstraints(),
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
iconSize: 25,
onPressed: () => Share.share(addressListViewModel.address.address),
icon: shareImage
)
);
}