fix: add copy notif
This commit is contained in:
parent
d4bc3d21c0
commit
10bde581ec
|
@ -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,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue