mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-01 09:57:46 +00:00
8a45cb4dc7
- Enhance exception_handler code - Add ShareUtil to unify modification point
13 lines
No EOL
352 B
Dart
13 lines
No EOL
352 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:share_plus/share_plus.dart';
|
|
|
|
class ShareUtil {
|
|
static void share({required String text, required BuildContext context}) {
|
|
final box = context.findRenderObject() as RenderBox?;
|
|
|
|
Share.share(
|
|
text,
|
|
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
|
|
);
|
|
}
|
|
} |