edit profile available

This commit is contained in:
Muhammad Hamza 2021-10-11 20:42:28 +05:00
parent 0b7c618f33
commit 28a70074c8

View File

@ -153,26 +153,23 @@ class _ProfileViewState extends State<ProfileView> {
),
),
),
floatingActionButton: Visibility(
visible: MediaQuery.of(context).viewInsets.bottom == 0,
child: FloatingActionButton(
heroTag: 'setup',
onPressed: () async {
if (_formKey.currentState.validate()) {
FocusScope.of(context).unfocus();
await _createProfile();
const snackBar = SnackBar(
backgroundColor: Colors.green,
content: Text('Profile updated!'),
);
floatingActionButton: FloatingActionButton(
heroTag: 'save',
onPressed: () async {
if (_formKey.currentState.validate()) {
FocusManager.instance.primaryFocus.unfocus();
await _createProfile();
const snackBar = SnackBar(
backgroundColor: Colors.green,
content: Text('Profile updated!'),
);
ScaffoldMessenger.of(context)
..hideCurrentSnackBar()
..showSnackBar(snackBar);
}
},
child: const Icon(Icons.check),
),
ScaffoldMessenger.of(context)
..hideCurrentSnackBar()
..showSnackBar(snackBar);
}
},
child: const Icon(Icons.check),
),
);
}