Skip to content

Commit

Permalink
fixup! TW-1456: optionnal duration param added to snackbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Te-Z committed Mar 28, 2024
1 parent 8a44b28 commit abca529
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:linagora_design_flutter/colors/linagora_sys_colors.dart';

class CopiableProfileRow extends StatelessWidget {
static const snackBarDuration = Duration(milliseconds: 500);

final String caption;
final String copiableText;
final Widget leadingIcon;
Expand All @@ -20,6 +22,7 @@ class CopiableProfileRow extends StatelessWidget {
Key? key,
}) : super(key: key);


@override
Widget build(BuildContext context) {
return Padding(
Expand All @@ -31,7 +34,7 @@ class CopiableProfileRow extends StatelessWidget {
onTap: () {
TwakeClipboard.instance.copyText(copiableText);
TwakeSnackBar.show(
duration: const Duration(milliseconds: 500),
duration: snackBarDuration,
context,
L10n.of(context)!.copiedToClipboard,
);
Expand Down

0 comments on commit abca529

Please sign in to comment.