diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 16ae7ecc84f23125b2679c6ff794cc3a052da8c5..649c1e365e9164d8d7e14bb74ef93e2298949ed2 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"geolocator","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-5.3.2+2/","dependencies":["location_permissions"]},{"name":"google_maps_flutter","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.33/","dependencies":[]},{"name":"google_sign_in","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.5.6/","dependencies":[]},{"name":"image_picker","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+14/","dependencies":[]},{"name":"location","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location-2.5.4/","dependencies":[]},{"name":"location_permissions","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/","dependencies":[]},{"name":"path_provider","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.24/","dependencies":[]},{"name":"share","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.5+4/","dependencies":[]},{"name":"shared_preferences","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.1+2/","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.11/","dependencies":[]},{"name":"geolocator","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-5.3.2+2/","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_api_availability-2.0.4/","dependencies":[]},{"name":"google_maps_flutter","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.33/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"google_sign_in","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.5.6/","dependencies":[]},{"name":"image_picker","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+14/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"location","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location-2.5.4/","dependencies":[]},{"name":"location_permissions","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/","dependencies":[]},{"name":"path_provider","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.24/","dependencies":[]},{"name":"share","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.5+4/","dependencies":[]},{"name":"shared_preferences","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.1+2/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+6/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+11/","dependencies":[]},{"name":"sqflite","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.1+2/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/","dependencies":[]}],"web":[{"name":"google_sign_in_web","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in_web-0.9.2/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/suryanirvana/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+7/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"geolocator","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","dependencies":[]},{"name":"google_maps_flutter","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"google_sign_in","dependencies":["google_sign_in_web"]},{"name":"google_sign_in_web","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"location","dependencies":[]},{"name":"location_permissions","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"share","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2020-12-28 22:03:53.783202","version":"1.20.3"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"geolocator","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-5.3.2+2/","dependencies":["location_permissions"]},{"name":"google_maps_flutter","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.33/","dependencies":[]},{"name":"google_sign_in","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.5.6/","dependencies":[]},{"name":"image_picker","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+14/","dependencies":[]},{"name":"location","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location-2.5.4/","dependencies":[]},{"name":"location_permissions","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/","dependencies":[]},{"name":"path_provider","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.24/","dependencies":[]},{"name":"share","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.5+4/","dependencies":[]},{"name":"shared_preferences","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.2+1/","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.11/","dependencies":[]},{"name":"geolocator","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-5.3.2+2/","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_api_availability-2.0.4/","dependencies":[]},{"name":"google_maps_flutter","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.33/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"google_sign_in","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.5.6/","dependencies":[]},{"name":"image_picker","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+14/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"location","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location-2.5.4/","dependencies":[]},{"name":"location_permissions","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-3.0.0+1/","dependencies":[]},{"name":"path_provider","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.24/","dependencies":[]},{"name":"share","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.5+4/","dependencies":[]},{"name":"shared_preferences","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.2+1/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+6/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+11/","dependencies":[]},{"name":"sqflite","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.2+1/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/","dependencies":[]}],"web":[{"name":"google_sign_in_web","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in_web-0.9.2/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/wilsonjunior/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+7/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"geolocator","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","dependencies":[]},{"name":"google_maps_flutter","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"google_sign_in","dependencies":["google_sign_in_web"]},{"name":"google_sign_in_web","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"location","dependencies":[]},{"name":"location_permissions","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"share","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2020-12-28 23:39:44.428116","version":"1.22.3"} \ No newline at end of file diff --git a/lib/page/filter_fasilitas/fasilitas.dart b/lib/page/filter_fasilitas/fasilitas.dart index 11d28f48d0e98e8a2ffde7b9d53308b62fc27015..a4be5417a8c96d7927ee1cbf41f5d707ee35ede8 100644 --- a/lib/page/filter_fasilitas/fasilitas.dart +++ b/lib/page/filter_fasilitas/fasilitas.dart @@ -263,7 +263,7 @@ class _FasilitasState extends State<Fasilitas> { break; case Status.error: return Center( - child: Text(snapshot.data.data.toString()), + child: Text('Belum ada informasi'), ); break; diff --git a/lib/page/registrasi/registrasi.dart b/lib/page/registrasi/registrasi.dart index e4441bbc92bcf7e95d8c59ed89ca29cf93a9bdf6..deb91eedc9a22f0079b7248de5571b6c97dbe4a8 100644 --- a/lib/page/registrasi/registrasi.dart +++ b/lib/page/registrasi/registrasi.dart @@ -140,9 +140,17 @@ class RegistrasiState extends State<Registrasi> { crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ SizedBox(height: 10.0), - Text( - 'Tanggal Lahir', - style: TextStyle(fontSize: 18), + Row( + children: [ + Text( + 'Tanggal Lahir', + style: TextStyle(fontSize: 18), + ), + Text( + '*', + style: TextStyle(fontSize: 18, color: red), + ), + ], ), SizedBox(height: 10.0), FlatButton( @@ -243,7 +251,7 @@ class RegistrasiState extends State<Registrasi> { void _validateLoginInput() async { final form = _formKey.currentState; - if (_formKey.currentState.validate()) { + if (_validateTanggalLahir(context) && _formKey.currentState.validate()) { form.save(); newUser = NewUser( name: nameController.text.toString(), @@ -261,6 +269,21 @@ class RegistrasiState extends State<Registrasi> { } } + bool _validateTanggalLahir(BuildContext context) { + if (tanggalLahir == 'Pilih tanggal lahir') { + var alertDialog = AlertDialog( + title: Text('Tanggal lahir wajib diisi'), + content: Icon(FontAwesomeIcons.exclamationCircle), + ); + showDialog( + context: context, + builder: (BuildContext context) { + return alertDialog; + }); + } + return true; + } + NewUser newUser; TextEditingController nameController = TextEditingController(); TextEditingController phoneController = TextEditingController(); diff --git a/lib/page/updateInformasi/update_informasi.dart b/lib/page/updateInformasi/update_informasi.dart index 2297fa93f5e9e3348491fc2faec5059fd9254fad..94092cb1dadeef0debb048de2f98682a4f86ad83 100644 --- a/lib/page/updateInformasi/update_informasi.dart +++ b/lib/page/updateInformasi/update_informasi.dart @@ -48,8 +48,8 @@ class UpdateInformasiState extends State<UpdateInformasi> { _intelektualClicked = widget.komentar.disabilitas.toString().contains('DI'); _mentalClicked = widget.komentar.disabilitas.toString().contains('DM'); _sensorikClicked = widget.komentar.disabilitas.toString().contains('DS'); - _isDisabilitasValid = true; _existingImageUrl = widget.komentar.image; + _isDisabilitasValid = true; } Future _getImage() async { @@ -464,7 +464,8 @@ class UpdateInformasiState extends State<UpdateInformasi> { void failedDialog(BuildContext context) { const alertDialog = AlertDialog( - title: Text('Gagal menambahkan informasi'), + title: Text( + 'Gagal menambahkan informasi, pastikan ini postingan anda sendiri'), content: Icon(FontAwesomeIcons.checkCircle), ); showDialog( @@ -614,7 +615,8 @@ class UpdateInformasiState extends State<UpdateInformasi> { } Future<void> _resetInput() async { - deskripsiController.clear(); + _jumlahFasilitas = widget.komentar.jumlah; + deskripsiController.text = widget.komentar.deskripsi; await _clearImage(); } diff --git a/lib/utils/custom_dashboard_location_button.dart b/lib/utils/custom_dashboard_location_button.dart index b31c94f45378fc44a506a2ef6ca3b907eb3a0d6e..01e7f9e2ec25036467c7ba35ef7cff1f01ea91a8 100644 --- a/lib/utils/custom_dashboard_location_button.dart +++ b/lib/utils/custom_dashboard_location_button.dart @@ -65,8 +65,8 @@ class _LocationIconButtonState extends State<LocationIconButton> { borderRadius: BorderRadius.only( topLeft: Radius.circular(5.0), topRight: Radius.circular(5.0), - bottomLeft: Radius.circular(10.0), - bottomRight: Radius.circular(10.0)), + bottomLeft: Radius.circular(9.0), + bottomRight: Radius.circular(9.0)), color: greenPrimary, ), padding: const EdgeInsets.all(regularSpace),