mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-24 06:48:38 +02:00
- Add Linter rules for return types and final fields
- Enhance exception_handler code - Add ShareUtil to unify modification point
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user