Fakultas Ilmu Komputer UI

Commit c37add02 authored by Habel Christiando Tobing's avatar Habel Christiando Tobing
Browse files

added loading

parent 3b4d6333
Pipeline #83796 failed with stages
in 5 minutes and 31 seconds
......@@ -253,6 +253,12 @@
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "flutter_spinkit",
"rootUri": "file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_spinkit-4.1.2+1",
"packageUri": "lib/",
"languageVersion": "2.5"
},
{
"name": "flutter_svg",
"rootUri": "file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.19.3",
......@@ -704,7 +710,7 @@
"languageVersion": "2.7"
}
],
"generated": "2021-06-24T11:34:08.561448Z",
"generated": "2021-06-27T17:22:52.875515Z",
"generator": "pub",
"generatorVersion": "2.12.0"
}
......@@ -162,6 +162,10 @@ flutter_secure_storage
2.1
file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.5/
file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.5/lib/
flutter_spinkit
2.5
file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_spinkit-4.1.2+1/
file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_spinkit-4.1.2+1/lib/
flutter_svg
2.2
file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.19.3/
......
{"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-27 01:45:16.239836","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 00:22:53.175150","version":"2.0.1"}
\ 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-24 18:34:08.521556.
# Generated by pub on 2021-06-28 00:22:52.845259.
_fe_analyzer_shared:file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-14.0.0/lib/
analyzer:file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.41.2/lib/
args:file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/args-2.0.0/lib/
......@@ -46,6 +46,7 @@ flutter_keyboard_visibility_web:file:///D:/Program%20Files/flutter/.pub-cache/ho
flutter_multi_carousel:file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_multi_carousel-1.0.3/lib/
flutter_plugin_android_lifecycle:file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.1/lib/
flutter_secure_storage:file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.5/lib/
flutter_spinkit:file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_spinkit-4.1.2+1/lib/
flutter_svg:file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.19.3/lib/
flutter_test:file:///D:/Program%20Files/flutter/packages/flutter_test/lib/
flutter_typeahead:file:///D:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_typeahead-3.1.1/lib/
......
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
class Loading extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
child: Center(
child: SpinKitCircle(
color: Color.fromRGBO(18, 40, 75, 1),
size: 100.0,
duration: const Duration(milliseconds: 700),
),
),
);
}
}
......@@ -107,7 +107,7 @@ class Ukm {
ImageProvider<Object> get ukmBanner {
if (this.bannerImg == "") {
return AssetImage('assets/images/tidak-ada-perjanjian.png');
return AssetImage('assets/images/equityWithNoImage.jpg');
} else {
return NetworkImage(this.bannerImg);
}
......
This diff is collapsed.
......@@ -2,6 +2,7 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:fundex_app/api/api.dart';
import 'package:fundex_app/assets/loading.dart';
import 'package:fundex_app/pages/business/cardsListOnHome.dart';
import 'package:fundex_app/pages/business/prospectus_page.dart';
import 'package:google_fonts/google_fonts.dart';
......@@ -20,6 +21,9 @@ class HomeKYC extends StatefulWidget {
class _HomeKYCState extends State<HomeKYC> {
Future<EquityOfferings> futureEquities;
bool alreadyRegistered = false;
bool userChecked = false;
bool lihatSemuaIsClicked = false;
List<Ukm> ukmList = [];
void initState() {
super.initState();
......@@ -29,7 +33,7 @@ class _HomeKYCState extends State<HomeKYC> {
Widget buildUkmCarousel(BuildContext context,
AsyncSnapshot<EquityOfferings> snapshot, int index) {
List<Ukm> ukmList = snapshot.data.getUkmList();
ukmList = snapshot.data.getUkmList();
return new Container(
alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(0.0, 24.0, 0.0, 0.0),
......@@ -71,7 +75,7 @@ class _HomeKYCState extends State<HomeKYC> {
child: Column(
children: [
Expanded(
flex: 7,
flex: 8,
child: Container(
key: Key('containerForWholeCarousel'),
decoration: BoxDecoration(
......@@ -371,85 +375,93 @@ class _HomeKYCState extends State<HomeKYC> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
resizeToAvoidBottomInset: false,
appBar: AppBar(
backgroundColor: Colors.white,
title: Image.asset(
'assets/images/fundex.png',
key: Key('logoFundex'),
),
),
body: SafeArea(
child: SingleChildScrollView(
child: Column(
key: Key('wholePageColumn'),
crossAxisAlignment: CrossAxisAlignment.start,
children: [
getCard(),
Container(
alignment: Alignment.center,
key: Key('containerPenawaranAndLihatSemua'),
margin: EdgeInsets.fromLTRB(24.0, 0.0, 24.0, 0.0),
child: Row(
key: Key('rowPenawaranAndLihatSemua'),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
'Penawaran',
key: Key('stringPenawaran'),
style: GoogleFonts.inter(
color: Color.fromRGBO(0, 0, 0, 1.0),
fontSize: 16.0,
),
),
RichText(
key: Key('stringLihatSemua'),
text: TextSpan(
text: 'Lihat Semua >>',
return userChecked == false || lihatSemuaIsClicked == true
? Loading()
: Scaffold(
backgroundColor: Colors.white,
resizeToAvoidBottomInset: false,
appBar: AppBar(
backgroundColor: Colors.white,
title: Image.asset(
'assets/images/fundex.png',
key: Key('logoFundex'),
),
),
body: SafeArea(
child: SingleChildScrollView(
child: Column(
key: Key('wholePageColumn'),
crossAxisAlignment: CrossAxisAlignment.start,
children: [
getCard(),
Container(
alignment: Alignment.center,
key: Key('containerPenawaranAndLihatSemua'),
margin: EdgeInsets.fromLTRB(24.0, 0.0, 24.0, 0.0),
child: Row(
key: Key('rowPenawaranAndLihatSemua'),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
'Penawaran',
key: Key('stringPenawaran'),
style: GoogleFonts.inter(
color: Color.fromRGBO(189, 189, 189, 1.0),
fontSize: 12.0,
color: Color.fromRGBO(0, 0, 0, 1.0),
fontSize: 16.0,
),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return MaterialApp(home: ExploreBusiness());
}));
})),
]),
),
Container(
alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(0.0, 24.0, 0.0, 0.0),
child: FutureBuilder<EquityOfferings>(
future: futureEquities,
builder: (context, snapshot) {
if (snapshot.hasData) {
return buildUkmCarousel(context, snapshot,
snapshot.data.getUkmList().length);
),
RichText(
key: Key('stringLihatSemua'),
text: TextSpan(
text: 'Lihat Semua >>',
style: GoogleFonts.inter(
color: Color.fromRGBO(189, 189, 189, 1.0),
fontSize: 12.0,
),
recognizer: TapGestureRecognizer()
..onTap = () {
setState(() {
lihatSemuaIsClicked = true;
});
Navigator.push(context,
MaterialPageRoute(
builder: (context) {
return MaterialApp(
home: ExploreBusiness());
}));
})),
]),
),
Container(
alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(0.0, 24.0, 0.0, 0.0),
child: FutureBuilder<EquityOfferings>(
future: futureEquities,
builder: (context, snapshot) {
if (snapshot.hasData) {
return buildUkmCarousel(context, snapshot,
snapshot.data.getUkmList().length);
// SingleChildScrollView(
// scrollDirection: Axis.vertical,
// child: buildUkmCard(context, snapshot));
} else if (snapshot.hasError) {
print('${snapshot.error}');
return Container(child: Text('${snapshot.error}'));
} else {
return Container(
width: 0,
height: 0,
);
}
}),
// SingleChildScrollView(
// scrollDirection: Axis.vertical,
// child: buildUkmCard(context, snapshot));
} else if (snapshot.hasError) {
print('${snapshot.error}');
return Container(
child: Text('${snapshot.error}'));
} else {
return Container(
width: 0,
height: 0,
);
}
}),
),
],
),
),
],
),
),
),
);
),
);
}
Future checkUser() async {
......@@ -467,6 +479,9 @@ class _HomeKYCState extends State<HomeKYC> {
alreadyRegistered = true;
});
}
setState(() {
userChecked = true;
});
}
}
}
......
import 'package:flutter/material.dart';
import 'package:fundex_app/api/api.dart';
import 'package:fundex_app/pages/business/homekyc.dart';
import 'package:fundex_app/main-screen.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
_CancelConfirmationState createState() => _CancelConfirmationState();
......@@ -293,9 +291,8 @@ class __OtpFormState extends State<_OtpForm> {
pin6FocusNode.unfocus();
Api().otpInput(
await SecureStorage().readSecureData('token'), otpString);
await new Future.delayed(const Duration(seconds: 5));
Navigator.push(context, MaterialPageRoute(builder: (context) {
return MaterialApp(home: HomeKYC());
return MaterialApp(home: MainScreen());
}));
},
),
......
......@@ -293,6 +293,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.3.5"
flutter_spinkit:
dependency: "direct main"
description:
name: flutter_spinkit
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.2+1"
flutter_svg:
dependency: "direct main"
description:
......
......@@ -40,6 +40,7 @@ dependencies:
time_formatter: ^1.0.0
dependencies:
material_floating_search_bar: ^0.3.4
flutter_spinkit: "^4.1.2"
# The following adds the Cupertino Icons font to your application.
......
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