fix: add copy notif

This commit is contained in:
dettlaff 2023-12-22 05:33:03 +04:00 committed by Inex Code
parent d4bc3d21c0
commit 10bde581ec
1 changed files with 19 additions and 22 deletions

View File

@ -74,37 +74,34 @@ class NewUserPage extends StatelessWidget {
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
InkWell( IconButton(
onTap: () { icon: Icon(
Icons.copy,
size: 24.0,
color: Theme.of(context).colorScheme.secondary,
),
onPressed: () {
String currentPassword = context String currentPassword = context
.read<UserFormCubit>() .read<UserFormCubit>()
.password .password
.state .state
.value; .value;
PlatformAdapter.setClipboard(currentPassword); PlatformAdapter.setClipboard(currentPassword);
getIt<NavigationService>().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( IconButton(
onTap: context.read<UserFormCubit>().genNewPassword, icon: Icon(
borderRadius: BorderRadius.circular(30), Icons.refresh,
child: Padding( size: 24.0,
padding: EdgeInsets.all(8.0), color: Theme.of(context).colorScheme.secondary,
child: Icon(
Icons.refresh,
size: 30.0,
color: Theme.of(context).colorScheme.secondary,
),
), ),
) onPressed:
context.read<UserFormCubit>().genNewPassword,
),
], ],
), ),
), ),