Fakultas Ilmu Komputer UI

Commit f9ad6723 authored by Muhammad Farhan Ghaffar's avatar Muhammad Farhan Ghaffar
Browse files

pulling from staging

parents 9b5301da a454bc5e
Pipeline #83784 failed with stages
in 5 minutes and 38 seconds
......@@ -704,7 +704,7 @@
"languageVersion": "2.7"
}
],
"generated": "2021-06-26T17:14:18.119127Z",
"generated": "2021-06-27T16:36:25.618255Z",
"generator": "pub",
"generatorVersion": "2.13.0"
}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"D:\\\\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-27 22:11:01.512574","version":"2.1.0-12.1.pre"}
\ 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:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"D:\\\\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-27 23:36:26.628982","version":"2.1.0-12.1.pre"}
\ 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-06-27 00:14:17.947590.
# Generated by pub on 2021-06-27 23:36:25.508548.
_fe_analyzer_shared:file:///D:/src/flutter/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-14.0.0/lib/
analyzer:file:///D:/src/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.41.2/lib/
args:file:///D:/src/flutter/.pub-cache/hosted/pub.dartlang.org/args-2.0.0/lib/
......
......@@ -2,6 +2,7 @@
<<<<<<< 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
......@@ -25,11 +26,17 @@ 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=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.packages
PACKAGE_CONFIG=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/.dart_tool/package_config.json
......@@ -3,6 +3,7 @@
<<<<<<< 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"
......@@ -26,11 +27,17 @@ 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=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
export "PACKAGE_CONFIG=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/.dart_tool/package_config.json"
......@@ -50,8 +50,11 @@ class Api {
var body = jsonEncode({'token': token});
var headers = {'Content-type': 'application/json'};
var apiResult = await client.post(apiURL, headers: headers, body: body);
print(apiResult.statusCode);
print(apiResult.body);
var jsonObject = json.decode(apiResult.body);
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
var duration =
((jsonData as Map<String, dynamic>)['otp_duration']).toString();
await secureStorage.writeSecureData('otpDuration', duration);
}
Future otpInput(String token, String otp) async {
......@@ -60,11 +63,9 @@ class Api {
var headers = {'Content-type': 'application/json'};
var apiResult = await client.post(apiURL, headers: headers, body: body);
if (apiResult.statusCode == 200) {
print('pinter');
var jsonObject = json.decode(apiResult.body);
var accessToken = (jsonObject as Map<String, dynamic>)['access_token'];
await secureStorage.writeSecureData('accessToken', accessToken);
print(await secureStorage.readSecureData('accessToken'));
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
var userInfo = (jsonData as Map<String, dynamic>)['user_info'];
var userName = (userInfo as Map<String, dynamic>)['name'];
......@@ -78,11 +79,8 @@ class Api {
await secureStorage.writeSecureData('userProfilePic', userProfilePic);
print('userProfilePic: ' +
await secureStorage.readSecureData('userProfilePic'));
} else if (apiResult.statusCode == 400) {
print("Failed");
} else {
print("Unknown");
}
return (apiResult.statusCode);
}
// API AAN ====================================================================================================
......
......@@ -2,7 +2,7 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:fundex_app/api/api.dart';
import 'package:fundex_app/pages/forget-password/ForgetPassword.dart';
import 'package:fundex_app/pages/payment/CancelConfirmation.dart';
import 'package:fundex_app/pages/login/Otp.dart';
import 'package:fundex_app/pages/register/register.dart';
import 'package:fundex_app/storage/storage.dart';
import 'package:google_fonts/google_fonts.dart';
......@@ -248,8 +248,7 @@ class _LoginState extends State<Login> {
MaterialPageRoute(
builder: (context) {
return MaterialApp(
home:
CancelConfirmation());
home: Otp());
}));
} else if (statusCode == 400) {
createAlertDialog(context);
......
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:fundex_app/api/api.dart';
import 'package:fundex_app/pages/business/homekyc.dart';
import 'package:fundex_app/pages/kyc/design.dart';
import 'package:fundex_app/storage/storage.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:fundex_app/assets/colors.dart';
class Otp extends StatefulWidget {
@override
_OtpState createState() => _OtpState();
}
class _OtpState extends State<Otp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
backgroundColor: white,
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
IconButton(
icon: Icon(
Icons.arrow_back,
color: primary,
),
onPressed: () {
Navigator.pop(context);
},
),
Text(
'Konfirmasi',
style: titleTextStyle(),
key: Key('appBarTitle'),
),
],
),
),
body: SafeArea(
child: Container(
margin: const EdgeInsets.fromLTRB(0, 56, 0, 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Column(
children: <Widget>[
Container(
child: Text(
'Masukan Kode OTP',
key: Key('pageTitle'),
style: GoogleFonts.inter(
fontSize: 16,
fontWeight: FontWeight.w400,
color: black1,
),
),
),
Container(
margin: const EdgeInsets.fromLTRB(0, 16, 0, 0),
child: Text(
'Kode OTP sudah dikirim melalui email',
key: Key('pageSubTitle'),
style: GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w400,
color: black1,
),
),
),
Container(
width: 231,
margin: const EdgeInsets.fromLTRB(0, 16, 0, 0),
child: _OtpForm()),
Container(
margin: const EdgeInsets.fromLTRB(0, 32, 0, 0),
child: RichText(
text: TextSpan(
text: 'Kirim ulang OTP',
style: GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.normal,
color: Color.fromRGBO(0, 145, 201, 1.0)),
recognizer: TapGestureRecognizer()
..onTap = () async {
Api().otpGet(await SecureStorage()
.readSecureData('token'));
}),
key: Key('resendButton'),
),
)
],
)
],
),
),
),
),
);
}
}
class _OtpForm extends StatefulWidget {
@override
__OtpFormState createState() => __OtpFormState();
}
class __OtpFormState extends State<_OtpForm> {
var duration = 0;
void updateduration() async {
duration = int.parse(await SecureStorage().readSecureData('otpDuration'));
}
FocusNode pin2FocusNode;
FocusNode pin3FocusNode;
FocusNode pin4FocusNode;
FocusNode pin5FocusNode;
FocusNode pin6FocusNode;
String otpString = '';
int otp;
var statusCode = 0;
createAlertDialog(BuildContext context) {
return showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text(
'OTP gagal',
),
content: Text(
'OTP yang anda masukan salah',
key: Key('alertText'),
),
actions: <Widget>[
MaterialButton(
elevation: 0.5,
child: Text(
'Coba lagi',
key: Key('backButton'),
textAlign: TextAlign.center,
),
onPressed: () {
Navigator.of(context).pop();
})
],
);
});
}
@override
void initState() {
super.initState();
pin2FocusNode = FocusNode();
pin3FocusNode = FocusNode();
pin4FocusNode = FocusNode();
pin5FocusNode = FocusNode();
pin6FocusNode = FocusNode();
updateduration();
}
@override
void dispose() {
pin2FocusNode.dispose();
pin3FocusNode.dispose();
pin4FocusNode.dispose();
pin5FocusNode.dispose();
pin6FocusNode.dispose();
super.dispose();
}
void nextField({String value, FocusNode focusNode}) {
if (value.length == 1) {
focusNode.requestFocus();
}
}
@override
Widget build(BuildContext context) {
return Form(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(
width: 28.98,
height: 33.71,
child: TextFormField(
key: Key('pin1'),
autofocus: true,
keyboardType: TextInputType.number,
style: GoogleFonts.inter(
fontSize: 18, fontWeight: FontWeight.normal, color: black1),
textAlign: TextAlign.center,
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(vertical: 7),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4)),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4))),
onChanged: (value) {
nextField(value: value, focusNode: pin2FocusNode);
String stringValue = value.toString();
otpString = otpString + stringValue;
},
),
),
SizedBox(
width: 28.98,
height: 33.71,
child: TextFormField(
key: Key('pin2'),
focusNode: pin2FocusNode,
keyboardType: TextInputType.number,
style: GoogleFonts.inter(
fontSize: 18, fontWeight: FontWeight.normal, color: black1),
textAlign: TextAlign.center,
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(vertical: 7),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4)),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4))),
onChanged: (value) {
nextField(value: value, focusNode: pin3FocusNode);
String stringValue = value.toString();
otpString = otpString + stringValue;
},
),
),
SizedBox(
width: 28.98,
height: 33.71,
child: TextFormField(
key: Key('pin3'),
focusNode: pin3FocusNode,
keyboardType: TextInputType.number,
style: GoogleFonts.inter(
fontSize: 18, fontWeight: FontWeight.normal, color: black1),
textAlign: TextAlign.center,
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(vertical: 7),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4)),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4))),
onChanged: (value) {
nextField(value: value, focusNode: pin4FocusNode);
String stringValue = value.toString();
otpString = otpString + stringValue;
},
),
),
SizedBox(
width: 28.98,
height: 33.71,
child: TextFormField(
key: Key('pin4'),
focusNode: pin4FocusNode,
keyboardType: TextInputType.number,
style: GoogleFonts.inter(
fontSize: 18, fontWeight: FontWeight.normal, color: black1),
textAlign: TextAlign.center,
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(vertical: 7),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4)),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4))),
onChanged: (value) {
nextField(value: value, focusNode: pin5FocusNode);
String stringValue = value.toString();
otpString = otpString + stringValue;
},
),
),
SizedBox(
width: 28.98,
height: 33.71,
child: TextFormField(
key: Key('pin5'),
focusNode: pin5FocusNode,
keyboardType: TextInputType.number,
style: GoogleFonts.inter(
fontSize: 18, fontWeight: FontWeight.normal, color: black1),
textAlign: TextAlign.center,
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(vertical: 7),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4)),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4))),
onChanged: (value) {
nextField(value: value, focusNode: pin6FocusNode);
String stringValue = value.toString();
otpString = otpString + stringValue;
},
),
),
SizedBox(
width: 28.98,
height: 33.71,
child: TextFormField(
key: Key('pin6'),
focusNode: pin6FocusNode,
keyboardType: TextInputType.number,
style: GoogleFonts.inter(
fontSize: 18, fontWeight: FontWeight.normal, color: black1),
textAlign: TextAlign.center,
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(vertical: 7),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4)),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: gray4))),
onChanged: (value) async {
String stringValue = value.toString();
otpString = otpString + stringValue;
pin6FocusNode.unfocus();
statusCode = await Api().otpInput(
await SecureStorage().readSecureData('token'), otpString);
if (statusCode == 200) {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return MaterialApp(home: HomeKYC());
}));
} else if (statusCode == 400) {
createAlertDialog(context);
}
},
),
),
],
),
);
}
}
import 'package:flutter/material.dart';
import 'package:fundex_app/api/api.dart';
import 'package:fundex_app/pages/business/homekyc.dart';
import 'package:fundex_app/pages/kyc/design.dart';
import 'package:fundex_app/storage/storage.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:fundex_app/assets/colors.dart';
import '../business/homekyc.dart';
class CancelConfirmation extends StatefulWidget {
@override
......@@ -291,11 +287,6 @@ class __OtpFormState extends State<_OtpForm> {
String stringValue = value.toString();
otpString = otpString + stringValue;
pin6FocusNode.unfocus();
Api().otpInput(
await SecureStorage().readSecureData('token'), otpString);
Navigator.push(context, MaterialPageRoute(builder: (context) {
return MaterialApp(home: HomeKYC());
}));
},
),
),
......
......@@ -3,7 +3,7 @@ description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: "none" # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
......@@ -23,8 +23,8 @@ environment:
dependencies:
flutter:
sdk: flutter
test: '^1.15.7'
flutter_secure_storage: '^3.3.5'
test: "^1.15.7"
flutter_secure_storage: "^3.3.5"
http: 0.13.0
cupertino_icons: ^1.0.0
flutter_typeahead: ^3.1.0
......@@ -41,7 +41,6 @@ dependencies:
dependencies:
material_floating_search_bar: ^0.3.4
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
# cupertino_icons: ^1.0.0
......@@ -58,7 +57,6 @@ dev_dependencies:
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
......@@ -83,9 +81,9 @@ flutter:
# list giving the asset and other descriptors for the font. For
# example:
fonts:
- family: MyFlutterApp
- family: MyFlutterApp
fonts:
- asset: assets/icons/MyFlutterApp.ttf
- asset: assets/icons/MyFlutterApp.ttf
# fonts:
# - family: Schyler
# fonts:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment