fix: add copy notif

pull/409/head
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(
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<UserFormCubit>()
.password
.state
.value;
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(
onTap: context.read<UserFormCubit>().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<UserFormCubit>().genNewPassword,
),
],
),
),