Remove unnecessary toast
This commit is contained in:
parent
33322838cc
commit
892af4d046
1 changed files with 4 additions and 5 deletions
|
@ -17,7 +17,8 @@ import 'package:share_plus/share_plus.dart';
|
||||||
|
|
||||||
final _logger = Logger("ShareUtil");
|
final _logger = Logger("ShareUtil");
|
||||||
// share is used to share media/files from ente to other apps
|
// share is used to share media/files from ente to other apps
|
||||||
Future<void> share(BuildContext context, List<File> files, {GlobalKey shareButtonKey}) async {
|
Future<void> share(BuildContext context, List<File> files,
|
||||||
|
{GlobalKey shareButtonKey}) async {
|
||||||
final dialog = createProgressDialog(context, "preparing...");
|
final dialog = createProgressDialog(context, "preparing...");
|
||||||
await dialog.show();
|
await dialog.show();
|
||||||
final List<Future<String>> pathFutures = [];
|
final List<Future<String>> pathFutures = [];
|
||||||
|
@ -40,22 +41,20 @@ Future<void> share(BuildContext context, List<File> files, {GlobalKey shareButto
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect shareButtonRect(BuildContext context, GlobalKey shareButtonKey) {
|
Rect shareButtonRect(BuildContext context, GlobalKey shareButtonKey) {
|
||||||
Size size = MediaQuery
|
Size size = MediaQuery.of(context).size;
|
||||||
.of(context)
|
|
||||||
.size;
|
|
||||||
RenderBox renderBox = shareButtonKey?.currentContext?.findRenderObject();
|
RenderBox renderBox = shareButtonKey?.currentContext?.findRenderObject();
|
||||||
if (renderBox == null) {
|
if (renderBox == null) {
|
||||||
return Rect.fromLTWH(0, 0, size.width, size.height / 2);
|
return Rect.fromLTWH(0, 0, size.width, size.height / 2);
|
||||||
}
|
}
|
||||||
size = renderBox.size;
|
size = renderBox.size;
|
||||||
Offset position = renderBox.localToGlobal(Offset.zero);
|
Offset position = renderBox.localToGlobal(Offset.zero);
|
||||||
showToast('using soln');
|
|
||||||
return Rect.fromCenter(
|
return Rect.fromCenter(
|
||||||
center: position + Offset(size.width / 2, size.height / 2),
|
center: position + Offset(size.width / 2, size.height / 2),
|
||||||
width: size.width,
|
width: size.width,
|
||||||
height: size.height,
|
height: size.height,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> shareText(String text) async {
|
Future<void> shareText(String text) async {
|
||||||
return Share.share(text);
|
return Share.share(text);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue