change readme
This commit is contained in:
8
.env
8
.env
@ -1,6 +1,6 @@
|
||||
# url = 'http://172.29.85.181:3002/'
|
||||
# api_url = 'http://172.29.85.181:3002/'
|
||||
# url = 'https://caleg_backend.kicap-karan.com/'
|
||||
# api_url = 'https://caleg_backend.kicap-karan.com/'
|
||||
url = 'http://20.20.20.25:3002/'
|
||||
api_url = 'http://20.20.20.25:3002/'
|
||||
url = 'https://caleg_backend.kicap-karan.com/'
|
||||
api_url = 'https://caleg_backend.kicap-karan.com/'
|
||||
# url = 'http://20.20.20.25:3002/'
|
||||
# api_url = 'http://20.20.20.25:3002/'
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -45,4 +45,5 @@ app.*.map.json
|
||||
|
||||
|
||||
# .env
|
||||
.env.git
|
||||
.env
|
||||
.git
|
15
README.md
15
README.md
@ -1,16 +1,7 @@
|
||||
# cek_suara
|
||||
|
||||
A new Flutter project.
|
||||
## Aplikasi untuk admin yang mengatur caleg dan tim survei caleg
|
||||
|
||||
## Getting Started
|
||||
## http://www.kicap-karan.com
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
## 082293246583
|
||||
|
@ -60,9 +60,9 @@ class AdminFirstPageView extends StatelessWidget {
|
||||
background: orangeColor,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const TopContainer(
|
||||
TopContainer(
|
||||
title: 'Jumlah\nPemilih',
|
||||
value: '10 Pemilih',
|
||||
value: '${model.jumlahPemilih} Pemilih',
|
||||
icon: Icons.people_alt_outlined,
|
||||
background: blueColor,
|
||||
),
|
||||
|
@ -1,5 +1,3 @@
|
||||
import 'package:cek_suara/model/area_model.dart';
|
||||
|
||||
import '../../../../app/app.logger.dart';
|
||||
import '../../../../app/core/custom_base_view_model.dart';
|
||||
import '../../../../model/caleg_model.dart';
|
||||
@ -10,7 +8,7 @@ class AdminFirstPageViewModel extends CustomBaseViewModel {
|
||||
final log = getLogger('AdminFirstPageViewModel');
|
||||
|
||||
// variabel
|
||||
int jumlahArea = 0;
|
||||
int jumlahPemilih = 0;
|
||||
int jumlahCaleg = 0;
|
||||
int jumlahTimSurvei = 0;
|
||||
bool status = false;
|
||||
@ -25,16 +23,16 @@ class AdminFirstPageViewModel extends CustomBaseViewModel {
|
||||
setBusy(true);
|
||||
globalVar.backPressed = 'cantBack';
|
||||
try {
|
||||
var response = await httpService.get('area/kecamatan');
|
||||
// var response = await httpService.get('area/kecamatan');
|
||||
// log.i(response.data);
|
||||
// MyResponseModel myResponseModel = MyResponseModel.fromJson(response.data);
|
||||
// KecamatanDetail areaListModel =
|
||||
// KecamatanDetail.fromJson(myResponseModel.data);
|
||||
// jumlahArea = areaListModel.jumlah!;
|
||||
|
||||
var response = await httpService.get('caleg');
|
||||
log.i(response.data);
|
||||
MyResponseModel myResponseModel = MyResponseModel.fromJson(response.data);
|
||||
KecamatanDetail areaListModel =
|
||||
KecamatanDetail.fromJson(myResponseModel.data);
|
||||
jumlahArea = areaListModel.jumlah!;
|
||||
|
||||
response = await httpService.get('caleg');
|
||||
log.i(response.data);
|
||||
myResponseModel = MyResponseModel.fromJson(response.data);
|
||||
CalegListModel calegListModel =
|
||||
CalegListModel.fromJson(myResponseModel.data);
|
||||
jumlahCaleg = calegListModel.jumlah!;
|
||||
@ -44,6 +42,11 @@ class AdminFirstPageViewModel extends CustomBaseViewModel {
|
||||
TimSurveiListModel timSurveiListModel =
|
||||
TimSurveiListModel.fromJson(myResponseModel.data);
|
||||
jumlahTimSurvei = timSurveiListModel.jumlah!;
|
||||
|
||||
response = await httpService.get('pemilih');
|
||||
myResponseModel = MyResponseModel.fromJson(response.data);
|
||||
Map<String, dynamic> data = myResponseModel.data;
|
||||
jumlahPemilih = data['jumlah'];
|
||||
status = true;
|
||||
} catch (e) {
|
||||
status = false;
|
||||
|
Reference in New Issue
Block a user