finish caleg, area and tim survei page

This commit is contained in:
kicap
2023-10-26 16:05:01 +08:00
parent 364bee3120
commit 85be29e7ce
24 changed files with 1100 additions and 228 deletions

View File

@ -92,9 +92,13 @@ class HalamanAreaView extends StatelessWidget {
child: Column(
children: [
if (model.jumlahArea == 0)
const Center(
child: Text(
'Belum ada area diinput')),
Center(
child: model.status == true
? const Text(
'Belum ada area diinput')
: const Text(
'Gagal mengambil data'),
),
if (model.jumlahArea > 0)
for (var i = 0;
i < model.jumlahArea;

View File

@ -13,6 +13,7 @@ class HalamanAreaViewModel extends CustomBaseViewModel {
// variabel
List<AreaModel> listAreaModel = [];
int jumlahArea = 0;
bool status = false;
// add area form
final formKey = GlobalKey<FormState>();
@ -38,7 +39,9 @@ class HalamanAreaViewModel extends CustomBaseViewModel {
log.i('listAreaModel: $listAreaModel');
log.i('jumlahArea: $jumlahArea');
status = true;
} catch (e) {
status = false;
log.e(e);
} finally {
globalVar.backPressed = 'exitApp';