Fakultas Ilmu Komputer UI

Commit 3180b1bf authored by wibias fuad's avatar wibias fuad
Browse files

sebelum push

parents 2d780c37 63710dd0
......@@ -674,7 +674,7 @@
"languageVersion": "2.7"
}
],
"generated": "2021-05-24T15:17:07.761125Z",
"generated": "2021-05-25T13:39:55.291179Z",
"generator": "pub",
"generatorVersion": "2.12.2"
}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_for_web-2.0.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_web"]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","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":[]}],"date_created":"2021-05-25 00:43:12.034793","version":"2.0.3"}
\ No newline at end of file
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_for_web-2.0.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_web"]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","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":[]}],"date_created":"2021-05-25 20:39:55.900167","version":"2.0.3"}
\ No newline at end of file
......@@ -3,7 +3,7 @@
#
# For more info see: https://dart.dev/go/dot-packages-deprecation
#
# Generated by pub on 2021-05-24 22:17:07.567107.
# Generated by pub on 2021-05-25 20:39:55.214175.
_fe_analyzer_shared:file:///C:/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-14.0.0/lib/
analyzer:file:///C:/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.41.2/lib/
args:file:///C:/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/args-2.0.0/lib/
......
......@@ -122,7 +122,7 @@ class Api {
}
}
Future<String> gender(String gen) async {
Future gender(String gen) async {
var apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/member-attribute');
var token = await secureStorage.readSecureData('accessToken');
......@@ -140,15 +140,14 @@ class Api {
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
var idMemberAttributeGender = jsonData['id'];
await secureStorage.writeSecureData(
'idMemberAttributeGender', idMemberAttributeGender);
'idMemberAttributeGender', idMemberAttributeGender.toString());
print(await secureStorage.readSecureData('idMemberAttributeGender'));
return 'Simpan Berhasil!';
} else {
print('gender ' + apiResult.statusCode.toString());
print(apiResult.reasonPhrase);
print(apiResult.request);
print(apiResult.body);
throw Exception('Gagal menyimpan..');
throw Exception('Gagal menyimpan gender');
}
}
......@@ -210,7 +209,7 @@ class Api {
print(apiResult.reasonPhrase);
print(apiResult.request);
print(apiResult.body);
throw Exception('Gagal menyimpan..');
throw Exception('Gagal menyimpan tempat lahir');
}
}
......@@ -353,6 +352,16 @@ class Api {
}
}
Future forgetPassword(String email, int statusCode) async {
final apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/auth/forgot-password');
var body = jsonEncode({'email': email});
var headers = {'Content-type': 'application/json'};
var apiResult = await client.post(apiURL, headers: headers, body: body);
statusCode = apiResult.statusCode;
return (statusCode);
}
Future getMemberDocsId() async {
final apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/member-attributes?attribute_name=agreement_doc_id&offset=&limit=&order_by=');
......
import 'package:flutter/material.dart';
import 'package:fundex_app/api/api.dart';
import 'package:fundex_app/assets/colors.dart';
import 'package:fundex_app/pages/forget-password/EmailSent.dart';
import 'package:google_fonts/google_fonts.dart';
......@@ -22,6 +23,7 @@ class ForgetPassword extends StatefulWidget {
class _ForgetPasswordState extends State<ForgetPassword> {
final _keyForm = GlobalKey<FormState>();
var statusCode = 0;
InputDecoration formInputDecoration() {
return InputDecoration(
......@@ -133,17 +135,22 @@ class _ForgetPasswordState extends State<ForgetPassword> {
height: 52,
child: ElevatedButton(
key: Key('sendButton'),
onPressed: () {
onPressed: () async {
if (!_keyForm.currentState.validate()) {
return;
}
_keyForm.currentState.save();
print(email);
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return MaterialApp(home: EmailSent());
}));
statusCode =
await Api().forgetPassword(email, statusCode);
print(statusCode);
if (statusCode == 200) {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return MaterialApp(home: EmailSent());
}));
}
},
child: Text(
'Kirim',
......
import 'package:flutter/material.dart';
import 'package:flutter_typeahead/flutter_typeahead.dart';
import 'package:fundex_app/assets/colors.dart';
import 'package:fundex_app/main-screen.dart';
import 'package:fundex_app/pages/kyc/data_identitas.dart';
......@@ -24,13 +25,26 @@ class ValidasiEmail {
}
}
class ValidasiTempat{
static String validate(String value){
return value.isEmpty ? 'Harus di isi.' : null;
}
}
class DataPendukung extends StatefulWidget {
@override
_DataPendukungState createState() => _DataPendukungState();
}
class PekerjaanList {
String name;
int index;
PekerjaanList({this.name, this.index});
}
class _DataPendukungState extends State<DataPendukung> {
final GlobalKey<FormState> _formkey = GlobalKey<FormState>();
final TextEditingController _typeAheadController = TextEditingController();
// ignore: unused_field
String _latarBelakang;
......@@ -60,6 +74,9 @@ class _DataPendukungState extends State<DataPendukung> {
'Lain-lain',
];
List<String> checkedtujuanInvestasiList = [];
String dropdownValue;
int id;
List<String> sumberPenghasilanList = [
'Gaji',
......@@ -141,10 +158,73 @@ class _DataPendukungState extends State<DataPendukung> {
print(_tujuanInvestasi);
};
}
if (_checkBox == false) {
_onPressed = null;
}
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");
matches.retainWhere((s) => s.toLowerCase().contains(query.toLowerCase()));
return matches;
}
String radioItem;
// ignore: unused_element
void initState() {
super.initState();
id = 0;
}
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",
),
];
return MaterialApp(
home: Scaffold(
appBar: AppBar(
......@@ -289,18 +369,33 @@ class _DataPendukungState extends State<DataPendukung> {
style: miniTitleTextStyle(),
),
),
Container(
width: 343,
margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
child: TextFormField(
child: TypeAheadFormField(
key: Key('latarBelakangPend'),
keyboardType: TextInputType.text,
decoration: formInputDecoration(),
validator: Validasi.validate,
onSaved: (String latarBelakang) {
_latarBelakang = latarBelakang;
textFieldConfiguration: TextFieldConfiguration(
controller: this._typeAheadController,
decoration: formInputDecoration()
),
suggestionsCallback: (pattern) {
return listLatarBelakang(pattern);
},
),
itemBuilder: (context, suggestion) {
return ListTile(
title: Text(suggestion),
);
},
transitionBuilder: (context, suggestionsBox, controller) {
return suggestionsBox;
},
onSuggestionSelected: (suggestion) {
this._typeAheadController.text = suggestion;
},
// ignore: missing_return
validator: ValidasiTempat.validate,
onSaved: (value) => this._latarBelakang = value,
),
),
])
],
......@@ -365,22 +460,31 @@ class _DataPendukungState extends State<DataPendukung> {
margin: const EdgeInsets.fromLTRB(
0, 12, 0, 0),
child: Text(
"Pekerjaan",
"Pekerjaan *",
style: miniTitleTextStyle(),
),
),
Container(
width: 343,
margin: EdgeInsets.fromLTRB(0, 4, 0, 0),
child: TextFormField(
key: Key('pekerjaan'),
keyboardType: TextInputType.text,
decoration: formInputDecoration(),
onSaved: (String pekerjaan) {
_pekerjaan = pekerjaan;
},
child: Column(
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(),
),
),
),
])
],
),
......@@ -561,6 +665,7 @@ class _DataPendukungState extends State<DataPendukung> {
],
),
),
hasilPekerjaan(),
// form tujuan investasi
Container(
......@@ -620,13 +725,16 @@ class _DataPendukungState extends State<DataPendukung> {
margin: const EdgeInsets.fromLTRB(0, 24, 0, 0),
height: 416,
width: 343,
child: SingleChildScrollView(
child: Text(
'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()),
child: Scrollbar(
child: SingleChildScrollView(
key: Key('scroll'),
child: Text(
'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()
),
),
),
)),
// checkbox syarat ketentuan
Container(
......@@ -738,6 +846,166 @@ class _DataPendukungState extends State<DataPendukung> {
));
}
// // ignore: missing_return
Widget hasilPekerjaan() {
if (!(id == 3
|| id == 5
|| id == 7)) {
print('masuk');
return Container(
child: Row(
children: <Widget>[
Column(children: <Widget>[
// form nama perusahaan
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;
},
),
),
// form bidang usaha
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(
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(
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(
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;
},
),
),
// form email kantor
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 {
return new Container();
}
}
Widget get buletanChecklistCheckpoint {
return Container(
height: 24,
......
......@@ -30,9 +30,9 @@ void main() {
// execute
await tester.pumpWidget(MaterialApp(home: ForgetPassword()));
await tester.tap(emailFormField);
await tester.enterText(emailFormField, 'wibias.fuad@ui.ac.id');
await tester.enterText(emailFormField, 'muhammad.farhan84@ui.ac.id');
await tester.tap(sendButton);
await tester.pumpAndSettle();
await tester.pump(Duration(seconds: 5));
// check outputs
expect(pageTitleText, findsOneWidget);
......
import 'package:flutter/material.dart';
// import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:fundex_app/pages/kyc/biodata_pendukung.dart';
void main() {
testWidgets('test berjalannya page', (WidgetTester tester) async{
final latarBelakang = find.byKey(Key('latarBelakangPend'));
final pekerjaan = find.byKey(Key('pekerjaan'));
final namaPerusahaan = find.byKey(Key('namaPerusahaan'));
final bidangUsaha = find.byKey(Key('bidangUsaha'));
final alamatKantor = find.byKey(Key('alamatKantor'));
final jabatan = find.byKey(Key('jabatan'));
final noTelepon = find.byKey(Key('noTelepon'));
final emailKantor = find.byKey(Key('emailKantor'));
final tujuanInvestasi = find.byKey(Key('tujuanInvestasi'));
final loremIpsum = find.byKey(Key('loremIpsum'));
final sebelumnyaButton = find.byKey(Key('sebelumnyaButton'));
final selanjutnyaButton = find.byKey(Key('selanjutnyaButton'));
final listVIewCheckbox = find.byKey(Key('listViewCheckbox'));
await tester.pumpWidget(MaterialApp(
home: DataPendukung(),
));
await tester.tap(latarBelakang);
await tester.enterText(latarBelakang, 'gabut');
await tester.tap(pekerjaan);
await tester.enterText(pekerjaan, 'mahasiswa');
await tester.tap(namaPerusahaan);
await tester.enterText(namaPerusahaan, 'pt maju terus pantang mundur');
await tester.tap(bidangUsaha);
await tester.enterText(bidangUsaha, 'ternak');
await tester.tap(alamatKantor);
await tester.enterText(alamatKantor, 'jl. jalan');
await tester.tap(jabatan);
await tester.enterText(jabatan, 'OB');
await tester.tap(noTelepon);
await tester.enterText(noTelepon, '0987654321');
await tester.tap(emailKantor);
await tester.enterText(emailKantor, 'asd@as.com');
await tester.tap(tujuanInvestasi);
await tester.enterText(tujuanInvestasi, 'muter uang');
expect(loremIpsum, findsOneWidget);
expect(listVIewCheckbox, findsOneWidget);
expect(sebelumnyaButton, findsOneWidget);
expect(selanjutnyaButton, findsOneWidget);
});
testWidgets('Page mempunyai app bar', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
expect(find.byType(IconButton), findsOneWidget);
expect(find.byIcon(Icons.arrow_back), findsOneWidget);
expect(find.text('e-KYC Pemodal'), findsOneWidget);
});
testWidgets('IconButton AppBar size', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
final RenderBox barBox = tester.renderObject(find.byType(AppBar));
final RenderBox iconBox = tester.renderObject(find.byType(IconButton));
expect(iconBox.size.height, isNot(barBox.size.height));
});
testWidgets('Terdapat Checkpoint', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
expect(find.byKey(Key('checkpoint')), findsOneWidget);
expect(find.byKey(Key("container garis bulat checkpoint")), findsOneWidget);