fix: page transaction
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import 'package:cims_apps/application/theme/color_palette.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class StringUtils {
|
||||
@@ -23,4 +26,16 @@ class StringUtils {
|
||||
}
|
||||
return '--:--:--';
|
||||
}
|
||||
|
||||
static void iCopyToClipboard(BuildContext context,
|
||||
{String? desc, required String text}) {
|
||||
Clipboard.setData(ClipboardData(text: text));
|
||||
ScaffoldMessenger.of(context)
|
||||
.showSnackBar(SnackBar(
|
||||
backgroundColor: ColorPalette.primary,
|
||||
content: Text(desc ?? "Text copied to clipboard"),
|
||||
))
|
||||
.closed
|
||||
.then((value) => ScaffoldMessenger.of(context).removeCurrentSnackBar());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user