Krille/remove status feature
This commit is contained in:
parent
61ceb7d723
commit
e3f1fc757c
13 changed files with 372 additions and 651 deletions
19
lib/utils/fluffy_share.dart
Normal file
19
lib/utils/fluffy_share.dart
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:share/share.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
abstract class FluffyShare {
|
||||
static Future<void> share(String text, BuildContext context) async {
|
||||
if (PlatformInfos.isMobile) {
|
||||
return Share.share(text);
|
||||
}
|
||||
await Clipboard.setData(
|
||||
ClipboardData(text: text),
|
||||
);
|
||||
BotToast.showText(text: L10n.of(context).copiedToClipboard);
|
||||
return;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue