From 31fc90b0deeab577c0044d8c7114d3a8f9529468 Mon Sep 17 00:00:00 2001 From: shabrinaretno Date: Wed, 22 Jun 2022 10:21:20 +0700 Subject: [PATCH 1/2] memperbaiki titik kumpul --- mobile/lib/screen/home/components/tikum/mytikum_card.dart | 2 +- mobile/lib/screen/home/components/tikum/tikum_card.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/lib/screen/home/components/tikum/mytikum_card.dart b/mobile/lib/screen/home/components/tikum/mytikum_card.dart index 1bf1456..104e135 100644 --- a/mobile/lib/screen/home/components/tikum/mytikum_card.dart +++ b/mobile/lib/screen/home/components/tikum/mytikum_card.dart @@ -129,7 +129,7 @@ class MyTikumCard extends StatelessWidget { fontWeight: FontWeight.bold, ), ), - Text(tikum.tempatTujuan) + Text(tikum.tempatKumpul) ], ), const SizedBox( diff --git a/mobile/lib/screen/home/components/tikum/tikum_card.dart b/mobile/lib/screen/home/components/tikum/tikum_card.dart index eb367de..5b9d1c5 100644 --- a/mobile/lib/screen/home/components/tikum/tikum_card.dart +++ b/mobile/lib/screen/home/components/tikum/tikum_card.dart @@ -76,7 +76,7 @@ class TikumCard extends StatelessWidget { fontWeight: FontWeight.bold, ), ), - Text(tikum.tempatTujuan) + Text(tikum.tempatKumpul) ], ), const SizedBox( From 869c2dea882e1c5a822c06f18cb8ad9e2372c6ed Mon Sep 17 00:00:00 2001 From: Fendi Irfan Amorokhman Date: Wed, 22 Jun 2022 11:00:26 +0700 Subject: [PATCH 2/2] register --- .../screen/form_register/register_screen.dart | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/mobile/lib/screen/form_register/register_screen.dart b/mobile/lib/screen/form_register/register_screen.dart index 544078f..79d565e 100644 --- a/mobile/lib/screen/form_register/register_screen.dart +++ b/mobile/lib/screen/form_register/register_screen.dart @@ -66,25 +66,27 @@ class RegisterScreenState extends State { @override Widget build(BuildContext context) { void _handleSubmit() async { - try { - showDialog( - context: context, - builder: (context) => const Center( - child: SizedBox( - height: 100, - width: 100, - child: CircularProgressIndicator(), - ), - )); - await registerUser(_namaController.text, _emailController.text, - _passwordController.text); - Navigator.pop(context); - Navigator.pushNamedAndRemoveUntil( - context, HomeScreen.routeName, (route) => false); - ShowSnackBar(context, "Akun ${_namaController.text} berhasil dibuat"); - } catch (err) { - Navigator.pop(context); - ShowSnackBar(context, "$err"); + if (_formKey.currentState!.validate()) { + try { + showDialog( + context: context, + builder: (context) => const Center( + child: SizedBox( + height: 100, + width: 100, + child: CircularProgressIndicator(), + ), + )); + await registerUser(_namaController.text, _emailController.text, + _passwordController.text); + Navigator.pop(context); + Navigator.pushNamedAndRemoveUntil( + context, HomeScreen.routeName, (route) => false); + ShowSnackBar(context, "Akun ${_namaController.text} berhasil dibuat"); + } catch (err) { + Navigator.pop(context); + ShowSnackBar(context, "$err"); + } } }