Fakultas Ilmu Komputer UI

biodata_pendukung.dart 43.9 KB
Newer Older
1
import 'package:flutter/material.dart';
2
import 'package:flutter_typeahead/flutter_typeahead.dart';
3
import 'package:fundex_app/assets/colors.dart';
4
import 'package:fundex_app/main-screen.dart';
5
import 'package:fundex_app/pages/kyc/data_identitas.dart';
6
import 'package:fundex_app/pages/kyc/design.dart';
7
import 'package:fundex_app/pages/transaction/Transaction.dart';
8
import 'package:grouped_checkbox/grouped_checkbox.dart';
9
10
11

class Validasi {
  static String validate(String val) {
12
    return val.isEmpty ? 'Harus diisi' : null;
13
14
15
16
17
18
  }
}

class ValidasiEmail {
  static String validate(String value) {
    if (value.isEmpty) {
19
      return 'Email harus diisi';
20
21
22
23
24
25
26
27
    }
    if (!RegExp("^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+.[a-z]").hasMatch(value)) {
      return 'Email tidak valid';
    }
    return null;
  }
}

wibias fuad's avatar
wibias fuad committed
28
29
30
class ValidasiTempat {
  static String validate(String value) {
    return value.isEmpty ? 'Harus diisi' : null;
31
32
33
  }
}

34
35
36
37
38
class DataPendukung extends StatefulWidget {
  @override
  _DataPendukungState createState() => _DataPendukungState();
}

39
40
41
42
43
44
class PekerjaanList {
  String name;
  int index;
  PekerjaanList({this.name, this.index});
}

45
46
class _DataPendukungState extends State<DataPendukung> {
  final GlobalKey<FormState> _formkey = GlobalKey<FormState>();
47
  final TextEditingController _typeAheadController = TextEditingController();
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

  // ignore: unused_field
  String _latarBelakang;
  // ignore: unused_field
  String _pekerjaan;
  // ignore: unused_field
  String _namaPerusahaan;
  // ignore: unused_field
  String _bidangUsaha;
  // ignore: unused_field
  String _alamatKantor;
  // ignore: unused_field
  String _jabatan;
  // ignore: unused_field
  String _noTelepon;
  // ignore: unused_field
  String _emailKantor;
  // ignore: unused_field
  String _tujuanInvestasi;
  bool _checkBox = false;
  var _onPressed;
69
70
71
72
73
74
75
76
  List<String> tujuanInvestasiList = [
    'Pendapatan',
    'Spekulasi',
    'Investasi',
    'Price Appreciation',
    'Lain-lain',
  ];
  List<String> checkedtujuanInvestasiList = [];
77
  String dropdownValue;
78
79
  int id;

80
81
82
83
84
85
86
87
88
  List<String> sumberPenghasilanList = [
    'Gaji',
    'Hibah',
    'Pasangan, Orang Tua, Keluarga atau Teman',
    'Santunan (Dana Pensiun, Donatur, Asuransi)',
    'Hasil Usaha',
    'Warisan',
    'Hasil Investasi (Bunga, Capital Gain, Dividen)',
    'Undian / Hadiah',
89
  ];
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
  List<String> checkedSumberPenghasilanList = [];
  double opacitySumberPenghasilan = 0;
  double opacityTujuanInvestasi = 0;
  bool tujuanInvestasi = false;
  bool sumberPenghasilan = false;

  void validasiTujuanInvestasi(itemList) {
    checkedtujuanInvestasiList = itemList;
    print('CHECKED SUMBER PENGHASILAN $itemList');
    if (checkedtujuanInvestasiList.isNotEmpty) {
      setState(() {
        tujuanInvestasi = true;
        opacityTujuanInvestasi = 0;
      });
    } else {
      setState(() {
        tujuanInvestasi = false;
        opacityTujuanInvestasi = 1;
      });
    }
  }

  void validasiSumberPenghasilan(itemList) {
    checkedSumberPenghasilanList = itemList;
    print('CHECKED SUMBER PENGHASILAN $itemList');
    if (checkedSumberPenghasilanList.isNotEmpty) {
      setState(() {
        sumberPenghasilan = true;
        opacitySumberPenghasilan = 0;
      });
    } else {
      setState(() {
        sumberPenghasilan = false;
        opacitySumberPenghasilan = 1;
      });
    }
  }
127

128
129
130
131
132
  @override
  Widget build(BuildContext context) {
    if (_checkBox == true) {
      _onPressed = () {
        if (!_formkey.currentState.validate()) {
133
134
          validasiSumberPenghasilan(checkedSumberPenghasilanList);
          validasiTujuanInvestasi(checkedtujuanInvestasiList);
135
          print("Failed");
136
137
          return;
        }
138
139
140
141
142

        if (tujuanInvestasi == false || sumberPenghasilan == false) {
          validasiSumberPenghasilan(checkedSumberPenghasilanList);
          validasiTujuanInvestasi(checkedtujuanInvestasiList);
          print('Tujuan Investasi or Sumber Penghasilan masih kosong bro');
143
          return;
144
        }
145
146
        Navigator.push(context, MaterialPageRoute(builder: (context) {
          return MaterialApp(home: MainScreen());
147
148
149
150
151
152
153
154
155
156
157
158
159
        }));
        _formkey.currentState.save();
        print(_latarBelakang);
        print(_alamatKantor);
        print(_bidangUsaha);
        print(_emailKantor);
        print(_jabatan);
        print(_namaPerusahaan);
        print(_noTelepon);
        print(_pekerjaan);
        print(_tujuanInvestasi);
      };
    }
Muhammad Farhan Ghaffar's avatar
Muhammad Farhan Ghaffar committed
160

161
162
163
164
    if (_checkBox == false) {
      _onPressed = null;
    }

165
166
167
168
169
170
171
172
173
174
175
    List<String> listLatarBelakang(String query) {
      List<String> matches = [];
      matches.add("SD");
      matches.add("SMP");
      matches.add("SMA");
      matches.add("D3");
      matches.add("D4");
      matches.add("S1");
      matches.add("S2");
      matches.add("S3");
      matches.add("Lainnya");
wibias fuad's avatar
wibias fuad committed
176
      matches.retainWhere((s) => s.toLowerCase().contains(query.toLowerCase()));
177
178
      return matches;
    }
Muhammad Farhan Ghaffar's avatar
Muhammad Farhan Ghaffar committed
179

180
181
182
183
184
185
186
    String radioItem;

    // ignore: unused_element
    void initState() {
      super.initState();
      id = 0;
    }
wibias fuad's avatar
wibias fuad committed
187

188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
    List<PekerjaanList> fList = [
      PekerjaanList(
        index: 1,
        name: "Pegawai Swasta",
      ),
      PekerjaanList(
        index: 2,
        name: "Pegawai Negeri Sipil",
      ),
      PekerjaanList(
        index: 3,
        name: "Ibu Rumah Tangga",
      ),
      PekerjaanList(
        index: 4,
        name: "Pengusaha",
      ),
      PekerjaanList(
        index: 5,
        name: "Pelajar/Mahasiswa",
      ),
      PekerjaanList(
        index: 6,
        name: "TNI/Polisi",
      ),
      PekerjaanList(
        index: 7,
        name: "Pensiunan",
      ),
      PekerjaanList(
        index: 8,
        name: "Guru",
      ),
      PekerjaanList(
        index: 9,
        name: "Lainnya",
      ),
    ];

227
    return MaterialApp(
228
229
230
231
232
233
234
235
236
237
238
239
240
241
        home: Scaffold(
      appBar: AppBar(
        backgroundColor: white,
        title: Row(
          mainAxisAlignment: MainAxisAlignment.start,
          children: <Widget>[
            IconButton(
                icon: Icon(
                  Icons.arrow_back,
                  color: primary,
                ),
                onPressed: () {
                  Navigator.push(context, MaterialPageRoute(
                    builder: (context) {
242
                      return Transaction();
243
244
245
246
247
                    },
                  ));
                }),
            Text('e-KYC Pemodal', style: titleTextStyle()),
          ],
248
        ),
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
      ),
      body: SingleChildScrollView(
        child: SafeArea(
          child: Container(
            child: Row(mainAxisAlignment: MainAxisAlignment.center, children: <
                Widget>[
              Column(
                children: [
                  // container checkpoint
                  Container(
                    key: Key('checkpoint'),
                    margin: const EdgeInsets.fromLTRB(0, 32, 0, 40),
                    child: Row(children: <Widget>[
                      Column(children: [
                        // container garis bulet
                        Container(
                            key: Key('container garis bulat checkpoint'),
                            child: Row(children: <Widget>[
                              buletanChecklistCheckpoint,
                              garisCheckpoint,
                              buletanChecklistCheckpoint,
                              garisCheckpoint,
                              buletanChecklistCheckpoint,
                              garisCheckpoint,
                              buletanChecklistCheckpoint,
                              garisCheckpoint,
                              buletanChecklistCheckpoint
                            ])),

                        //container text-nya
                        Container(
                          key: Key('container text checkpoint'),
                          margin: const EdgeInsets.fromLTRB(0, 16, 0, 0),
                          child: Row(
                              mainAxisAlignment: MainAxisAlignment.start,
                              mainAxisSize: MainAxisSize.min,
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: <Widget>[
287
                                Container(
288
289
290
291
292
                                  width: 72,
                                  child: Text(
                                    "Biodata",
                                    style: checkTextStyle(),
                                  ),
293
294
                                ),
                                Container(
295
296
297
298
                                  width: 80,
                                  child: Text(
                                    "Alamat",
                                    style: checkTextStyle(),
299
                                  ),
300
                                ),
301
                                Container(
302
                                  width: 80,
303
                                  child: Text(
304
305
                                    ' Biodata\nKeluarga',
                                    style: checkTextStyle(),
306
307
308
                                  ),
                                ),
                                Container(
309
310
311
312
                                  width: 64,
                                  child: Text(
                                    "   Data\nIdentitas",
                                    style: checkTextStyle(),
313
314
315
                                  ),
                                ),
                                Container(
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
                                  child: Text(
                                    "      Data\nPendukung",
                                    style: checkTextStyle(),
                                  ),
                                ),
                              ]),
                        )
                      ])
                    ]),
                  ),

                  // line
                  Padding(
                    padding: EdgeInsets.symmetric(horizontal: 10.0),
                    child: Container(
                      key: Key("line"),
                      height: 1.0,
                      width: 359,
                      color: primary,
                    ),
                  ),

                  // container form
                  Container(
                    child: Padding(
                      padding: const EdgeInsets.fromLTRB(0, 18, 0, 0),
                      child: Form(
                          key: _formkey,
                          child: Column(
345
                            crossAxisAlignment: CrossAxisAlignment.start,
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
                            children: <Widget>[
                              // biodata data identitas
                              Container(
                                key: Key('teksDataPendukung'),
                                width: 343,
                                child: Text(
                                  'Data Pendukung',
                                  style: miniTextStyle(),
                                ),
                              ),

                              // form latar belakang pend
                              Container(
                                child: Row(
                                  children: <Widget>[
                                    Column(children: <Widget>[
362
363
                                      Container(
                                        width: 343,
364
365
                                        margin: const EdgeInsets.fromLTRB(
                                            0, 12, 0, 0),
366
                                        child: Text(
367
                                          "Latar Belakang Pendidikan *",
368
369
370
                                          style: miniTitleTextStyle(),
                                        ),
                                      ),
371
372
                                      Container(
                                        width: 343,
373
                                        child: TypeAheadFormField(
374
                                          key: Key('latarBelakangPend'),
wibias fuad's avatar
wibias fuad committed
375
376
377
378
379
380
                                          textFieldConfiguration:
                                              TextFieldConfiguration(
                                                  controller:
                                                      this._typeAheadController,
                                                  decoration:
                                                      formInputDecoration()),
381
382
                                          suggestionsCallback: (pattern) {
                                            return listLatarBelakang(pattern);
383
                                          },
384
385
386
387
388
                                          itemBuilder: (context, suggestion) {
                                            return ListTile(
                                              title: Text(suggestion),
                                            );
                                          },
wibias fuad's avatar
wibias fuad committed
389
390
                                          transitionBuilder: (context,
                                              suggestionsBox, controller) {
391
392
393
                                            return suggestionsBox;
                                          },
                                          onSuggestionSelected: (suggestion) {
wibias fuad's avatar
wibias fuad committed
394
395
                                            this._typeAheadController.text =
                                                suggestion;
396
397
398
                                          },
                                          // ignore: missing_return
                                          validator: ValidasiTempat.validate,
wibias fuad's avatar
wibias fuad committed
399
400
401
                                          onSaved: (value) =>
                                              this._latarBelakang = value,
                                        ),
402
403
404
                                      ),
                                    ])
                                  ],
405
                                ),
406
                              ),
407

408
409
                              // checkbox sumber penghasilan
                              Container(
410
                                child: Flex(
411
                                  mainAxisAlignment: MainAxisAlignment.start,
412
                                  direction: Axis.vertical,
413
414
415
416
417
418
419
420
421
422
423
424
425
                                  children: <Widget>[
                                    Container(
                                      width: 343,
                                      margin: const EdgeInsets.fromLTRB(
                                          0, 12, 0, 0),
                                      child: Text(
                                        "Sumber Penghasilan *",
                                        style: miniTitleTextStyle(),
                                      ),
                                    ),
                                    Container(
                                      margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
                                      width: 343,
426
427
428
429
430
431
432
433
434
435
436
                                      child: GroupedCheckbox(
                                        itemList: sumberPenghasilanList,
                                        checkedItemList:
                                            checkedSumberPenghasilanList,
                                        onChanged: (itemList) {
                                          validasiSumberPenghasilan(itemList);
                                        },
                                        orientation:
                                            CheckboxOrientation.VERTICAL,
                                        checkColor: white,
                                        activeColor: primary,
437
                                      ),
438
                                    ),
439
                                  ],
440
                                ),
441
                              ),
442
443
444
445
446
447
448
449
450
451
452
453
454
                              Container(
                                margin: EdgeInsets.fromLTRB(10, 0, 0, 0),
                                child: Opacity(
                                  opacity: opacitySumberPenghasilan,
                                  child: Text(
                                    'Harus diisi',
                                    style: TextStyle(
                                      color: formError,
                                      fontSize: 12,
                                    ),
                                  ),
                                ),
                              ),
455

456
457
458
459
460
461
462
463
464
465
                              // form pekerjaan
                              Container(
                                child: Row(
                                  children: <Widget>[
                                    Column(children: <Widget>[
                                      Container(
                                        width: 343,
                                        margin: const EdgeInsets.fromLTRB(
                                            0, 12, 0, 0),
                                        child: Text(
466
                                          "Pekerjaan *",
467
468
469
470
471
                                          style: miniTitleTextStyle(),
                                        ),
                                      ),
                                      Container(
                                        width: 343,
472
                                        child: Column(
wibias fuad's avatar
wibias fuad committed
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
                                          children: fList
                                              .map((data) => RadioListTile(
                                                    key: Key('pekerjaan'),
                                                    title: Text("${data.name}"),
                                                    groupValue: id,
                                                    value: data.index,
                                                    onChanged: (val) {
                                                      setState(() {
                                                        radioItem = data.name;
                                                        id = data.index;
                                                        print(radioItem);
                                                        print(id);
                                                      });
                                                    },
                                                  ))
                                              .toList(),
489
                                        ),
wibias fuad's avatar
wibias fuad committed
490
                                      ),
491
492
                                    ])
                                  ],
493
                                ),
494
495
496
497
498
499
500
501
502
503
                              ),

                              // form nama perusahaan
                              Container(
                                  child: Row(children: <Widget>[
                                Column(children: <Widget>[
                                  Container(
                                    width: 343,
                                    margin:
                                        const EdgeInsets.fromLTRB(0, 12, 0, 4),
504
                                    child: Text(
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
                                      "Nama Perusahaan",
                                      style: miniTitleTextStyle(),
                                    ),
                                  ),
                                  Container(
                                    width: 343,
                                    margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
                                    child: TextFormField(
                                      key: Key('namaPerusahaan'),
                                      keyboardType: TextInputType.text,
                                      decoration: formInputDecoration(),
                                      onSaved: (String namaPerusahaan) {
                                        _namaPerusahaan = namaPerusahaan;
                                      },
                                    ),
                                  ),
                                ])
                              ])),

                              // form bidang usaha
                              Container(
                                  child: Row(children: <Widget>[
                                Column(children: <Widget>[
                                  Container(
                                    width: 343,
                                    margin:
                                        const EdgeInsets.fromLTRB(0, 12, 0, 4),
                                    child: Text(
                                      "Bidang Usaha",
                                      style: miniTitleTextStyle(),
                                    ),
                                  ),
                                  Container(
                                    width: 343,
                                    margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
                                    child: TextFormField(
                                      key: Key('bidangUsaha'),
                                      keyboardType: TextInputType.text,
                                      decoration: formInputDecoration(),
                                      onSaved: (String bidangUsaha) {
                                        _bidangUsaha = bidangUsaha;
                                      },
                                    ),
                                  ),
                                ])
                              ])),

                              // form alamat kantor
                              Container(
                                  child: Row(children: <Widget>[
                                Column(children: <Widget>[
                                  Container(
                                    width: 343,
                                    margin:
                                        const EdgeInsets.fromLTRB(0, 12, 0, 4),
                                    child: Text(
                                      "Alamat Kantor",
                                      style: miniTitleTextStyle(),
                                    ),
                                  ),
                                  Container(
                                    width: 343,
                                    margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
                                    child: TextFormField(
                                      key: Key('alamatKantor'),
                                      keyboardType: TextInputType.text,
                                      decoration: formInputDecoration(),
                                      onSaved: (String alamatKantor) {
                                        _alamatKantor = alamatKantor;
                                      },
                                    ),
                                  ),
                                ])
                              ])),

                              // form jabatan
                              Container(
                                  child: Row(children: <Widget>[
                                Column(children: <Widget>[
                                  Container(
                                    width: 343,
                                    margin:
                                        const EdgeInsets.fromLTRB(0, 12, 0, 4),
                                    child: Text(
                                      "Jabatan",
                                      style: miniTitleTextStyle(),
                                    ),
                                  ),
                                  Container(
                                    width: 343,
                                    margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
                                    child: TextFormField(
                                      key: Key('jabatan'),
                                      keyboardType: TextInputType.text,
                                      decoration: formInputDecoration(),
                                      onSaved: (String jabatan) {
                                        _jabatan = jabatan;
                                      },
                                    ),
                                  ),
                                ])
                              ])),

                              // form nomor telpon kantor
                              Container(
                                  child: Row(children: <Widget>[
                                Column(children: <Widget>[
                                  Container(
                                    width: 343,
                                    margin:
                                        const EdgeInsets.fromLTRB(0, 12, 0, 4),
                                    child: Text(
                                      "Nomor Telepon Kantor",
                                      style: miniTitleTextStyle(),
                                    ),
                                  ),
                                  Container(
                                    width: 343,
                                    margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
                                    child: TextFormField(
                                      key: Key('noTelepon'),
                                      keyboardType: TextInputType.phone,
                                      decoration: formInputDecoration(),
                                      onSaved: (String noTelepon) {
                                        _noTelepon = noTelepon;
                                      },
631
632
                                    ),
                                  ),
633
634
635
636
637
                                ])
                              ])),

                              // form email kantor
                              Container(
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
                                child: Row(
                                  children: <Widget>[
                                    Column(
                                      children: <Widget>[
                                        Container(
                                          width: 343,
                                          margin: const EdgeInsets.fromLTRB(
                                              0, 12, 0, 4),
                                          child: Text(
                                            "Email Kantor *",
                                            style: miniTitleTextStyle(),
                                          ),
                                        ),
                                        Container(
                                          width: 343,
                                          margin:
                                              EdgeInsets.fromLTRB(0, 4, 0, 0),
                                          child: TextFormField(
                                            key: Key('emailKantor'),
                                            keyboardType:
                                                TextInputType.emailAddress,
                                            decoration: formInputDecoration(),
                                            validator: ValidasiEmail.validate,
                                            onSaved: (String emailKantor) {
                                              _emailKantor = emailKantor;
                                            },
                                          ),
                                        ),
                                      ],
667
                                    ),
668
669
670
                                  ],
                                ),
                              ),
wibias fuad's avatar
wibias fuad committed
671
                              hasilPekerjaan(),
672
673
674

                              // form tujuan investasi
                              Container(
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
                                child: Row(
                                  children: <Widget>[
                                    Column(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      children: <Widget>[
                                        Container(
                                          width: 343,
                                          margin: const EdgeInsets.fromLTRB(
                                              0, 12, 0, 4),
                                          child: Text(
                                            "Tujuan Investasi *",
                                            style: miniTitleTextStyle(),
                                          ),
                                        ),
                                        Container(
                                          width: 343,
                                          margin:
                                              EdgeInsets.fromLTRB(0, 4, 0, 0),
                                          child: GroupedCheckbox(
                                            itemList: tujuanInvestasiList,
                                            checkedItemList:
                                                checkedtujuanInvestasiList,
                                            onChanged: (itemList) {
                                              validasiTujuanInvestasi(itemList);
                                            },
                                            orientation:
                                                CheckboxOrientation.VERTICAL,
                                            checkColor: white,
                                            activeColor: primary,
                                          ),
                                        ),
                                      ],
708
                                    ),
709
710
711
712
713
714
715
716
717
718
719
720
                                  ],
                                ),
                              ),
                              Container(
                                margin: EdgeInsets.fromLTRB(10, 0, 0, 0),
                                child: Opacity(
                                  opacity: opacityTujuanInvestasi,
                                  child: Text(
                                    'Harus diisi',
                                    style: TextStyle(
                                      color: formError,
                                      fontSize: 12,
721
722
                                    ),
                                  ),
723
724
                                ),
                              ),
725
726
727

                              // container text
                              Container(
wibias fuad's avatar
wibias fuad committed
728
729
730
731
732
                                  margin:
                                      const EdgeInsets.fromLTRB(0, 24, 0, 0),
                                  height: 416,
                                  width: 343,
                                  child: Scrollbar(
733
734
735
                                    child: SingleChildScrollView(
                                      key: Key('scroll'),
                                      child: Text(
wibias fuad's avatar
wibias fuad committed
736
737
738
739
740
                                          'Loremipsum Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat',
                                          key: Key('loremIpsum'),
                                          style: miniTitleTextStyle()),
                                    ),
                                  )),
741
742
743
744
745
746
747
748

                              // checkbox syarat ketentuan
                              Container(
                                width: 343,
                                height: 56,
                                margin: EdgeInsets.fromLTRB(0, 16, 0, 0),
                                child: Row(children: [
                                  Container(
749
                                      child: Checkbox(
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
                                    value: _checkBox,
                                    checkColor: white,
                                    activeColor: primary,
                                    onChanged: (bool value) {
                                      setState(() {
                                        _checkBox = value;
                                      });
                                    },
                                  )),
                                  Container(
                                    width: 285,
                                    child: Text(
                                      'Saya menjamin keaslian data yang telah diberikan. Dengan ini saya menyatakan telah menyutujui syarat dan ketentuan yang berlaku.',
                                      style: miniTitleTextStyle(),
                                    ),
                                  )
                                ]),
                              ),

                              // button
                              Container(
                                margin: const EdgeInsets.fromLTRB(0, 42, 0, 16),
                                child: Row(
                                  children: <Widget>[
774
                                    Container(
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
                                      margin: const EdgeInsets.fromLTRB(
                                          0, 0, 16, 0),
                                      child: SizedBox(
                                        width: 163.5,
                                        height: 52,
                                        child: ElevatedButton(
                                          key: Key('sebelumnyaButton'),
                                          style: ElevatedButton.styleFrom(
                                            primary: red1,
                                            onPrimary: secondary,
                                          ),
                                          onPressed: () {
                                            if (!_formkey.currentState
                                                .validate()) {
                                              print("Failed");
                                            }
                                            Navigator.push(context,
                                                MaterialPageRoute(
                                                    builder: (context) {
                                              return DataIdentitas();
                                            }));
                                            // _formkey.currentState.save();
                                            // print(_noKTP);
                                            // print(_noPWP);
                                          },
                                          child: Text(
                                            "Sebelumnya",
                                            style: TextStyle(
                                              fontWeight: FontWeight.bold,
                                              fontSize: 14,
                                              fontFamily: 'Inter',
                                              color: white,
807
808
809
810
                                            ),
                                          ),
                                        ),
                                      ),
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
                                    ),
                                    Container(
                                      // margin: const EdgeInsets.fromLTRB(0, 42, 0, 16),
                                      child: SizedBox(
                                        width: 163.5,
                                        height: 52,
                                        child: ElevatedButton(
                                          key: Key('selanjutnyaButton'),
                                          style: ElevatedButton.styleFrom(
                                            primary: primary,
                                            onPrimary: secondary,
                                          ),
                                          onPressed: _onPressed,
                                          child: Text(
                                            "Selanjutnya",
                                            style: TextStyle(
                                              fontWeight: FontWeight.bold,
                                              fontSize: 14,
                                              fontFamily: 'Inter',
                                              color: white,
831
832
833
                                            ),
                                          ),
                                        ),
834
835
836
                                      ),
                                    )
                                  ],
837
                                ),
838
839
840
841
                              ),
                            ],
                          )),
                    ),
842
                  )
843
844
845
                ],
              )
            ]),
846
847
          ),
        ),
848
849
      ),
    ));
850
851
  }

852
853
  // // ignore: missing_return
  Widget hasilPekerjaan() {
wibias fuad's avatar
wibias fuad committed
854
855
    if (!(id == 3 || id == 5 || id == 7)) {
      print('masuk');
856
      return Container(
wibias fuad's avatar
wibias fuad committed
857
858
          child: Row(children: <Widget>[
        Column(children: <Widget>[
859
          // form nama perusahaan
wibias fuad's avatar
wibias fuad committed
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
          Container(
            width: 343,
            margin: const EdgeInsets.fromLTRB(0, 12, 0, 4),
            child: Text(
              "Nama Perusahaan",
              style: miniTitleTextStyle(),
            ),
          ),
          Container(
            width: 343,
            margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
            child: TextFormField(
              key: Key('namaPerusahaan'),
              keyboardType: TextInputType.text,
              decoration: formInputDecoration(),
              onSaved: (String namaPerusahaan) {
                _namaPerusahaan = namaPerusahaan;
              },
            ),
          ),
880
881

          // form bidang usaha
wibias fuad's avatar
wibias fuad committed
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
          Container(
            width: 343,
            margin: const EdgeInsets.fromLTRB(0, 12, 0, 4),
            child: Text(
              "Bidang Usaha",
              style: miniTitleTextStyle(),
            ),
          ),
          Container(
            width: 343,
            margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
            child: TextFormField(
              key: Key('bidangUsaha'),
              keyboardType: TextInputType.text,
              decoration: formInputDecoration(),
              onSaved: (String bidangUsaha) {
                _bidangUsaha = bidangUsaha;
              },
            ),
          ),
902
903

          // form alamat kantor
wibias fuad's avatar
wibias fuad committed
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
          Container(
            width: 343,
            margin: const EdgeInsets.fromLTRB(0, 12, 0, 4),
            child: Text(
              "Alamat Kantor",
              style: miniTitleTextStyle(),
            ),
          ),
          Container(
            width: 343,
            margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
            child: TextFormField(
              key: Key('alamatKantor'),
              keyboardType: TextInputType.text,
              decoration: formInputDecoration(),
              onSaved: (String alamatKantor) {
                _alamatKantor = alamatKantor;
              },
            ),
          ),
924
925

          // form jabatan
wibias fuad's avatar
wibias fuad committed
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
          Container(
            width: 343,
            margin: const EdgeInsets.fromLTRB(0, 12, 0, 4),
            child: Text(
              "Jabatan",
              style: miniTitleTextStyle(),
            ),
          ),
          Container(
            width: 343,
            margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
            child: TextFormField(
              key: Key('jabatan'),
              keyboardType: TextInputType.text,
              decoration: formInputDecoration(),
              onSaved: (String jabatan) {
                _jabatan = jabatan;
              },
            ),
          ),
946
947

          // form nomor telpon kantor
wibias fuad's avatar
wibias fuad committed
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
          Container(
            width: 343,
            margin: const EdgeInsets.fromLTRB(0, 12, 0, 4),
            child: Text(
              "Nomor Telepon Kantor",
              style: miniTitleTextStyle(),
            ),
          ),
          Container(
            width: 343,
            margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
            child: TextFormField(
              key: Key('noTelepon'),
              keyboardType: TextInputType.phone,
              decoration: formInputDecoration(),
              onSaved: (String noTelepon) {
                _noTelepon = noTelepon;
              },
            ),
          ),
968
969

          // form email kantor
wibias fuad's avatar
wibias fuad committed
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
          Container(
            width: 343,
            margin: const EdgeInsets.fromLTRB(0, 12, 0, 4),
            child: Text(
              "Email Kantor *",
              style: miniTitleTextStyle(),
            ),
          ),
          Container(
            width: 343,
            margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
            child: TextFormField(
              key: Key('emailKantor'),
              keyboardType: TextInputType.emailAddress,
              decoration: formInputDecoration(),
              validator: ValidasiEmail.validate,
              onSaved: (String emailKantor) {
                _emailKantor = emailKantor;
              },
            ),
          ),
        ])
      ]));
    } else {
994
995
996
997
      return new Container();
    }
  }

998
  Widget get buletanChecklistCheckpoint {
999
1000
    return Container(
      height: 24,
For faster browsing, not all history is shown. View entire blame