Fakultas Ilmu Komputer UI

Commit 7ff97ece authored by Habel Christiando Tobing's avatar Habel Christiando Tobing
Browse files

Merge branch 'finalisasiHabel' into 'staging'

Finalisasi habel

See merge request !67
parents cb4acebb 15ed9759
Pipeline #83992 passed with stages
in 26 minutes and 3 seconds
This diff is collapsed.
This diff is collapsed.
# This is a generated file; do not edit or check into version control.
flutter_keyboard_visibility=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility-5.0.0\\
flutter_keyboard_visibility_web=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility_web-2.0.0\\
flutter_plugin_android_lifecycle=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_plugin_android_lifecycle-2.0.1\\
flutter_secure_storage=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_secure_storage-3.3.5\\
image_picker=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.7.4\\
image_picker_for_web=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker_for_web-2.0.0\\
path_provider=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider-2.0.1\\
path_provider_linux=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_linux-2.0.0\\
path_provider_macos=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_macos-2.0.0\\
path_provider_windows=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_windows-2.0.0\\
flutter_keyboard_visibility=D:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility-5.0.0\\
flutter_keyboard_visibility_web=D:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility_web-2.0.0\\
flutter_plugin_android_lifecycle=D:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_plugin_android_lifecycle-2.0.1\\
flutter_secure_storage=D:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_secure_storage-3.3.5\\
image_picker=D:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.7.4\\
image_picker_for_web=D:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker_for_web-2.0.0\\
path_provider=D:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider-2.0.1\\
path_provider_linux=D:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_linux-2.0.0\\
path_provider_macos=D:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_macos-2.0.0\\
path_provider_windows=D:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_windows-2.0.0\\
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"C:\\\\src\\\\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-06-28 12:02:11.344859","version":"2.0.1"}
\ 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":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"D:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"D:\\\\Program Files\\\\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-06-28 15:21:50.715097","version":"2.0.1"}
\ No newline at end of file
This diff is collapsed.
sdk.dir=C:\\Users\\Manuel Yoseph Ray\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\src\\flutter
sdk.dir=C:\\Users\\habel\\AppData\\Local\\Android\\sdk
flutter.sdk=D:\\Program Files\\flutter
=======
flutter.buildMode=debug
flutter.versionName=1.0.0
......
// This is a generated file; do not edit or check into version control.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
FLUTTER_ROOT=/Users/ferdisungkar/flutter
FLUTTER_APPLICATION_PATH=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape
FLUTTER_TARGET=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/lib/main.dart
=======
FLUTTER_ROOT=C:\flutter\flutter
FLUTTER_APPLICATION_PATH=E:\Fasilkom\Semester 6\Proyek Perangkat Lunak\biodata2\ppl2021-d-slhape
FLUTTER_APPLICATION_PATH=E:\Fasilkom\Semester 6\Proyek Perangkat Lunak\all-agreement\ppl2021-d-slhape
FLUTTER_TARGET=lib\main.dart
>>>>>>> aec21a9964e4c1cd3acf319fb5854abd153112cb
=======
FLUTTER_ROOT=C:\flutter\flutter
FLUTTER_APPLICATION_PATH=E:\Fasilkom\Semester 6\Proyek Perangkat Lunak\biodata2\ppl2021-d-slhape
FLUTTER_TARGET=lib\main.dart
=======
FLUTTER_ROOT=/Users/ferdisungkar/flutter
FLUTTER_APPLICATION_PATH=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape
FLUTTER_TARGET=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/lib/main.dart
>>>>>>> 91daa656c5e94ce17276f720ff6972311abf7c69
>>>>>>> 0b764942660bfa83f5e9ea7e682f8641f77f4063
=======
FLUTTER_ROOT=C:\flutter\flutter
FLUTTER_APPLICATION_PATH=E:\Fasilkom\Semester 6\Proyek Perangkat Lunak\biodata2\ppl2021-d-slhape
FLUTTER_TARGET=lib\main.dart
>>>>>>> 6ba140add67633bd5eaa17ae4e8115b8878ee220
=======
FLUTTER_ROOT=/Users/ferdisungkar/flutter
FLUTTER_APPLICATION_PATH=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape
FLUTTER_TARGET=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/lib/main.dart
>>>>>>> a454bc5e5a6e63095408b4322e7350020f1ab114
FLUTTER_BUILD_DIR=build
SYMROOT=${SOURCE_ROOT}/../build/ios
SYMROOT=${SOURCE_ROOT}/../build\ios
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_DEFINES=flutter.inspector.structuredErrors%3Dtrue
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TRACK_WIDGET_CREATION=false
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/.dart_tool/package_config.json
PACKAGE_CONFIG=.packages
#!/bin/sh
# This is a generated file; do not edit or check into version control.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
export "FLUTTER_ROOT=/Users/ferdisungkar/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape"
export "FLUTTER_TARGET=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/lib/main.dart"
=======
export "FLUTTER_ROOT=C:\flutter\flutter"
export "FLUTTER_APPLICATION_PATH=E:\Fasilkom\Semester 6\Proyek Perangkat Lunak\biodata2\ppl2021-d-slhape"
export "FLUTTER_APPLICATION_PATH=E:\Fasilkom\Semester 6\Proyek Perangkat Lunak\all-agreement\ppl2021-d-slhape"
export "FLUTTER_TARGET=lib\main.dart"
>>>>>>> aec21a9964e4c1cd3acf319fb5854abd153112cb
=======
export "FLUTTER_ROOT=C:\flutter\flutter"
export "FLUTTER_APPLICATION_PATH=E:\Fasilkom\Semester 6\Proyek Perangkat Lunak\biodata2\ppl2021-d-slhape"
export "FLUTTER_TARGET=lib\main.dart"
=======
export "FLUTTER_ROOT=/Users/ferdisungkar/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape"
export "FLUTTER_TARGET=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/lib/main.dart"
>>>>>>> 91daa656c5e94ce17276f720ff6972311abf7c69
>>>>>>> 0b764942660bfa83f5e9ea7e682f8641f77f4063
=======
export "FLUTTER_ROOT=C:\flutter\flutter"
export "FLUTTER_APPLICATION_PATH=E:\Fasilkom\Semester 6\Proyek Perangkat Lunak\biodata2\ppl2021-d-slhape"
export "FLUTTER_TARGET=lib\main.dart"
>>>>>>> 6ba140add67633bd5eaa17ae4e8115b8878ee220
=======
export "FLUTTER_ROOT=/Users/ferdisungkar/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape"
export "FLUTTER_TARGET=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/lib/main.dart"
>>>>>>> a454bc5e5a6e63095408b4322e7350020f1ab114
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_DEFINES=flutter.inspector.structuredErrors%3Dtrue"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/.dart_tool/package_config.json"
export "PACKAGE_CONFIG=.packages"
......@@ -30,15 +30,14 @@ class Api {
Future<int> register(String email, String password) async {
var apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/mobile/auth/register');
Map<String, dynamic> map = {
var body = jsonEncode({
'email': email,
'password': password,
'role': 'investee',
'is_company': true
};
var jsonBody = jsonEncode(map);
});
var headers = {'Content-type': 'application/json'};
var apiResult = await client.post(apiURL, headers: headers, body: jsonBody);
var apiResult = await client.post(apiURL, headers: headers, body: body);
print(apiResult.reasonPhrase);
print(apiResult.statusCode);
print(apiResult.request);
......@@ -115,7 +114,7 @@ class Api {
Future gender(String gen, int id) async {
if (await secureStorage.readSecureData('idMemberAttributeGender') == null) {
var apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/member-attribute');
Uri.parse('https://canary.fundex.id/api/v1.1/member-attribute');
var token = await secureStorage.readSecureData('accessToken');
final apiResult = await client.post(apiURL,
headers: <String, String>{
......@@ -167,7 +166,7 @@ class Api {
}
}
}
Future getSpecificMemberAttribute(String attributeName) async {
var apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/member-attribute?attribute_name=$attributeName');
......@@ -196,7 +195,8 @@ class Api {
}
Future getMemberAttribute() async {
final apiURL = Uri.parse('https://canary.fundex.id/api/v1.1/member-attributes?attribute_name=&offset=&limit=&order_by=');
final apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/member-attributes?attribute_name=&offset=&limit=&order_by=');
var token = await secureStorage.readSecureData('accessToken');
var headers = {
'Content-type': 'application/json',
......@@ -215,7 +215,7 @@ class Api {
} else {
throw Exception('Get Failed');
}
}
}
Future birthdate(String date, int id) async {
if (await secureStorage.readSecureData('idMemberAttributeBirthdate') ==
......@@ -270,7 +270,6 @@ class Api {
throw Exception('Gagal menyimpan..');
}
}
}
Future birthplace(String nameCity, int id) async {
......@@ -479,11 +478,9 @@ class Api {
}
}
Future putAddress(
id, String addr, String distr, String city, String prov, String zip
) async {
final apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/address/:$id');
Future putAddress(id, String addr, String distr, String city, String prov,
String zip) async {
final apiURL = Uri.parse('https://canary.fundex.id/api/v1.1/address/:$id');
var token = await secureStorage.readSecureData('accessToken');
var headers = {
'Content-type': 'application/json',
......@@ -491,17 +488,15 @@ class Api {
};
var apiResult = await client.put(apiURL,
headers: headers,
body: jsonEncode(
{
"address": addr,
"district": distr,
"city": city,
"province": prov,
"country": "INDONESIA",
"zip_code": zip
}));
print("PUT address: " +
(apiResult.statusCode).toString());
body: jsonEncode({
"address": addr,
"district": distr,
"city": city,
"province": prov,
"country": "INDONESIA",
"zip_code": zip
}));
print("PUT address: " + (apiResult.statusCode).toString());
print(apiResult.reasonPhrase);
print(apiResult.request);
print(apiResult.body);
......@@ -661,7 +656,8 @@ class Api {
var jsonObject = json.decode(apiResult.body);
var data = (jsonObject as Map<String, dynamic>)['data'];
var id = data['id'];
await secureStorage.writeSecureData('id_domicileAddressId', id.toString());
await secureStorage.writeSecureData(
'id_domicileAddressId', id.toString());
print('domicile address berhasil');
print(apiResult.statusCode);
print(apiResult.body);
......@@ -1187,8 +1183,7 @@ class Api {
'Content-type': 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token',
},
body: jsonEncode(
{'attribute_name': name, 'attribute_value': idFoto}));
body: jsonEncode({'attribute_name': name, 'attribute_value': idFoto}));
if (apiResult.statusCode == 200) {
print('marriage_status berhasil');
print(apiResult.statusCode);
......@@ -1203,22 +1198,15 @@ class Api {
}
Future postFotoMemberDoc(PickedFile file, String name) async {
var apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/member-document?document_type_id=4&is_public=true');
var apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/member-document?document_type_id=4&is_public=true');
var req = http.MultipartRequest('POST', apiURL);
var token = await secureStorage.readSecureData('accessToken');
Map<String, String> headers = {
"Authorization": "Bearer $token"
};
Map<String, String> headers = {"Authorization": "Bearer $token"};
var filenya = File(file.path);
req.files.add(
http.MultipartFile(
'file',
filenya.readAsBytes().asStream(),
filenya.lengthSync(),
filename: filenya.path.split("/").last
)
);
req.files.add(http.MultipartFile(
'file', filenya.readAsBytes().asStream(), filenya.lengthSync(),
filename: filenya.path.split("/").last));
req.headers.addAll(headers);
var streamedResponse = await req.send();
var response = await http.Response.fromStream(streamedResponse);
......@@ -1231,14 +1219,14 @@ class Api {
await secureStorage.writeSecureData(name, id.toString());
print(await secureStorage.readSecureData(name));
} else {
print(response.reasonPhrase);
print(response.request);
print(response.body);
throw Exception('Get Failed');
print(response.reasonPhrase);
print(response.request);
print(response.body);
throw Exception('Get Failed');
}
}
// ignore: non_constant_identifier_names
// ignore: non_constant_identifier_names
Future identity_doc_id() async {
var apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/member-attribute');
......@@ -1248,13 +1236,17 @@ class Api {
'Content-type': 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token',
},
body: jsonEncode(
{'attribute_name': 'identity_doc_id', 'attribute_value': await secureStorage.readSecureData('id_DOCidentitydocid')}));
body: jsonEncode({
'attribute_name': 'identity_doc_id',
'attribute_value':
await secureStorage.readSecureData('id_DOCidentitydocid')
}));
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var data = (jsonObject as Map<String, dynamic>)['data'];
var id = data['id'];
await secureStorage.writeSecureData('id_ATTRidentitydocid', id.toString());
await secureStorage.writeSecureData(
'id_ATTRidentitydocid', id.toString());
print('identity_doc_id berhasil');
print(apiResult.statusCode);
print(apiResult.body);
......@@ -1277,8 +1269,11 @@ class Api {
'Content-type': 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token',
},
body: jsonEncode(
{'attribute_name': 'identity_doc_id', 'attribute_value': await secureStorage.readSecureData('id_DOCnpwpdocid')}));
body: jsonEncode({
'attribute_name': 'identity_doc_id',
'attribute_value':
await secureStorage.readSecureData('id_DOCnpwpdocid')
}));
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var data = (jsonObject as Map<String, dynamic>)['data'];
......@@ -1306,13 +1301,17 @@ class Api {
'Content-type': 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token',
},
body: jsonEncode(
{'attribute_name': 'identity_doc_id', 'attribute_value': await secureStorage.readSecureData('id_DOCselfieadditionaldocid')}));
body: jsonEncode({
'attribute_name': 'identity_doc_id',
'attribute_value':
await secureStorage.readSecureData('id_DOCselfieadditionaldocid')
}));
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var data = (jsonObject as Map<String, dynamic>)['data'];
var id = data['id'];
await secureStorage.writeSecureData('id_ATTRselfieadditionaldocid', id.toString());
await secureStorage.writeSecureData(
'id_ATTRselfieadditionaldocid', id.toString());
print('selfie_additional_doc_id berhasil');
print(apiResult.statusCode);
print(apiResult.body);
......@@ -1335,13 +1334,17 @@ class Api {
'Content-type': 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token',
},
body: jsonEncode(
{'attribute_name': 'identity_doc_id', 'attribute_value': await secureStorage.readSecureData('id_DOCselfiephotodocid')}));
body: jsonEncode({
'attribute_name': 'identity_doc_id',
'attribute_value':
await secureStorage.readSecureData('id_DOCselfiephotodocid')
}));
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var data = (jsonObject as Map<String, dynamic>)['data'];
var id = data['id'];
await secureStorage.writeSecureData('id_ATTRselfiephotodocid', id.toString());
await secureStorage.writeSecureData(
'id_ATTRselfiephotodocid', id.toString());
print('selfie_additional_doc_id berhasil');
print(apiResult.statusCode);
print(apiResult.body);
......@@ -1355,8 +1358,8 @@ class Api {
}
Future getFotoMemberDoc(int id) async {
var apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/member-documents/$id/private');
var apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/member-documents/$id/private');
var token = await secureStorage.readSecureData('accessToken');
var headers = {
'Content-type': 'application/json',
......
import 'package:flutter/cupertino.dart';
import 'package:intl/intl.dart';
import 'package:time_formatter/time_formatter.dart';
class Ukm {
int id;
......@@ -102,7 +101,29 @@ class Ukm {
}
String get beautifyTime {
return formatTime(remainingTime);
if (this.remainingTime == 0) {
return "Waktu habis";
} else {
DateTime dateTimeNow = DateTime.now();
int remainingTime =
this.remainingTime + dateTimeNow.toUtc().millisecondsSinceEpoch;
DateTime dateTimeRemaining =
new DateTime.fromMicrosecondsSinceEpoch(remainingTime * 1000);
var from = DateTime(dateTimeNow.year, dateTimeNow.month, dateTimeNow.day);
var to = DateTime(dateTimeRemaining.year, dateTimeRemaining.month,
dateTimeRemaining.day);
var diff = (to.difference(from).inHours).round();
print(diff);
var dayDifference = diff / 24;
var hoursDifference = diff % 24;
String differenceFinal = dayDifference.toString() +
' hari ' +
hoursDifference.toString() +
' jam';
return differenceFinal.toString();
}
// return formatTime(this.remainingTime);
}
ImageProvider<Object> get ukmBanner {
......
......@@ -52,7 +52,7 @@ class _HomeKYCState extends State<HomeKYC> {
enableInfiniteScroll: false,
scrollDirection: Axis.horizontal,
),
itemCount: ukmList.length,
itemCount: index,
itemBuilder: (context, index, int idx) {
return GestureDetector(
onTap: () {
......
......@@ -342,7 +342,8 @@ class _AlamatBodyState extends State<AlamatBody> {
color: primary,
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white, size: 16),
onPressed: () {
......@@ -406,7 +407,8 @@ class _AlamatBodyState extends State<AlamatBody> {
color: primary,
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white, size: 16),
onPressed: () {
......@@ -448,7 +450,8 @@ class _AlamatBodyState extends State<AlamatBody> {
color: primary,
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white, size: 16),
onPressed: () {
......@@ -490,7 +493,8 @@ class _AlamatBodyState extends State<AlamatBody> {
color: primary,
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white, size: 16),
onPressed: () {
......
......@@ -327,6 +327,7 @@ class _BiodataBodyState extends State<BiodataBody> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......@@ -368,6 +369,7 @@ class _BiodataBodyState extends State<BiodataBody> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......@@ -409,6 +411,7 @@ class _BiodataBodyState extends State<BiodataBody> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......@@ -450,6 +453,7 @@ class _BiodataBodyState extends State<BiodataBody> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......
......@@ -246,6 +246,7 @@ class _BiodataKeluargaBodyState extends State<BiodataKeluarga> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......@@ -287,6 +288,7 @@ class _BiodataKeluargaBodyState extends State<BiodataKeluarga> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......@@ -350,6 +352,7 @@ class _BiodataKeluargaBodyState extends State<BiodataKeluarga> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......@@ -391,6 +394,7 @@ class _BiodataKeluargaBodyState extends State<BiodataKeluarga> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......
......@@ -1184,6 +1184,7 @@ class _DataPendukungState extends State<DataPendukung> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......@@ -1219,6 +1220,7 @@ class _DataPendukungState extends State<DataPendukung> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......@@ -1254,6 +1256,7 @@ class _DataPendukungState extends State<DataPendukung> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......@@ -1290,6 +1293,7 @@ class _DataPendukungState extends State<DataPendukung> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......
......@@ -893,6 +893,7 @@ class _DataIdentitasState extends State<DataIdentitas> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,
size: 16),
......@@ -929,6 +930,7 @@ class _DataIdentitasState extends State<DataIdentitas> {
borderRadius:
BorderRadius.circular(100)),
child: IconButton(
padding: EdgeInsets.all(0),
icon: Icon(Icons.check_outlined,
color: white,