From 10bde581ec90110796d0afcabd9050ff9f841881 Mon Sep 17 00:00:00 2001 From: dettlaff Date: Fri, 22 Dec 2023 05:33:03 +0400 Subject: [PATCH] fix: add copy notif --- lib/ui/pages/users/new_user.dart | 41 +++++++++++++++----------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/lib/ui/pages/users/new_user.dart b/lib/ui/pages/users/new_user.dart index 6ed4c07a..5d1ef0d2 100644 --- a/lib/ui/pages/users/new_user.dart +++ b/lib/ui/pages/users/new_user.dart @@ -74,37 +74,34 @@ class NewUserPage extends StatelessWidget { child: Row( mainAxisSize: MainAxisSize.min, children: [ - InkWell( - onTap: () { + IconButton( + icon: Icon( + Icons.copy, + size: 24.0, + color: Theme.of(context).colorScheme.secondary, + ), + onPressed: () { String currentPassword = context .read() .password .state .value; PlatformAdapter.setClipboard(currentPassword); + getIt().showSnackBar( + 'basis.copied_to_clipboard'.tr(), + behavior: SnackBarBehavior.floating, + ); }, - borderRadius: BorderRadius.circular(30), - child: Padding( - padding: EdgeInsets.all(10.0), - child: Icon( - Icons.copy, - size: 24.0, - color: Theme.of(context).colorScheme.secondary, - ), - ), ), - InkWell( - onTap: context.read().genNewPassword, - borderRadius: BorderRadius.circular(30), - child: Padding( - padding: EdgeInsets.all(8.0), - child: Icon( - Icons.refresh, - size: 30.0, - color: Theme.of(context).colorScheme.secondary, - ), + IconButton( + icon: Icon( + Icons.refresh, + size: 24.0, + color: Theme.of(context).colorScheme.secondary, ), - ) + onPressed: + context.read().genNewPassword, + ), ], ), ),