finish caleg, area and tim survei page
This commit is contained in:
@ -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;
|
||||
|
@ -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';
|
||||
|
Reference in New Issue
Block a user