Fakultas Ilmu Komputer UI

Commit 2ba83e47 authored by Ferdi Salim Sungkar's avatar Ferdi Salim Sungkar
Browse files

Merge branch 'PBI-27-prospectus-page' into 'staging'

merging Pbi 27 prospectus page into staging

See merge request !52
parents 7c9d9837 8004bd51
Pipeline #80012 passed with stages
in 20 minutes and 35 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=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\\
flutter_keyboard_visibility=/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_keyboard_visibility-5.0.0/
flutter_keyboard_visibility_web=/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_keyboard_visibility_web-2.0.0/
flutter_plugin_android_lifecycle=/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.1/
flutter_secure_storage=/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.5/
image_picker=/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/
image_picker_for_web=/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_for_web-2.0.0/
path_provider=/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.1/
path_provider_linux=/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.0.0/
path_provider_macos=/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.0/
path_provider_windows=/Users/ferdisungkar/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":"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-05-31 02:33:40.333480","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":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_keyboard_visibility-5.0.0/","dependencies":[]},{"name":"flutter_secure_storage","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.5/","dependencies":[]},{"name":"image_picker","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/","dependencies":[]},{"name":"path_provider","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.1/","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_keyboard_visibility-5.0.0/","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.1/","dependencies":[]},{"name":"flutter_secure_storage","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.5/","dependencies":[]},{"name":"image_picker","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.1/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.0/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.0.0/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.0/","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"/Users/ferdisungkar/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_keyboard_visibility_web-2.0.0/","dependencies":[]},{"name":"image_picker_for_web","path":"/Users/ferdisungkar/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-31 03:53:38.101105","version":"2.0.1"}
\ No newline at end of file
This diff is collapsed.
sdk.dir=C:\\Users\\habel\\AppData\\Local\\Android\\sdk
flutter.sdk=D:\\Program Files\\flutter
sdk.dir=/Users/ferdisungkar/Library/Android/sdk
flutter.sdk=/Users/ferdisungkar/flutter
=======
flutter.buildMode=debug
flutter.versionName=1.0.0
......
......@@ -413,6 +413,69 @@ class Api {
}
}
Future getEquityOfferingsByID(String iD) async {
final apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/public/equity-offerings/$iD');
var headers = {'Content-type': 'application/json'};
var apiResult = await client.get(apiURL, headers: headers);
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
var equityOffering = jsonData['equity_offering'];
return equityOffering;
}
}
Future getEquityOfferingDocsByID(String iD) async {
final apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/public/equity-offerings/$iD');
var headers = {'Content-type': 'application/json'};
var apiResult = await client.get(apiURL, headers: headers);
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
var equityOfferingDocs = jsonData['offering_docs'];
return equityOfferingDocs;
}
}
Future getEquityOfferingBannersByID(String iD) async {
final apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/public/equity-offerings/$iD');
var headers = {'Content-type': 'application/json'};
var apiResult = await client.get(apiURL, headers: headers);
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
var equityOfferingBanners = jsonData['offering_banners'];
return equityOfferingBanners;
}
}
Future getEquityOfferingSummaryByID(String iD) async {
final apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/public/equity-offerings/$iD/summary');
var headers = {'Content-type': 'application/json'};
var apiResult = await client.get(apiURL, headers: headers);
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
var equityOfferingsSummary = jsonData['summary'];
return equityOfferingsSummary;
}
}
Future getEquityOfferingDetailsByID(String iD) async {
final apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/public/equities/$iD');
var headers = {'Content-type': 'application/json'};
var apiResult = await client.get(apiURL, headers: headers);
var jsonObject = json.decode(apiResult.body);
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
var equityOfferingDetails = jsonData['equity'];
return equityOfferingDetails;
}
Future<EquityOfferings> getSortedEquities(
String statusOffering, String businessField, String sortBy) async {
final apiURL = Uri.parse(
......
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:fundex_app/pages/kyc/biodata_body.dart';
import 'package:google_fonts/google_fonts.dart';
import 'exploreBusiness.dart';
Widget unregisteredUser(BuildContext context) {
return Container(
......@@ -13,7 +13,7 @@ Widget unregisteredUser(BuildContext context) {
child: GestureDetector(
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return MaterialApp(home: ExploreBusiness());
return MaterialApp(home: BiodataBody());
}));
},
child: Card(
......
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:fundex_app/main-screen.dart';
import 'package:fundex_app/pages/business/prospectus_page.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:percent_indicator/percent_indicator.dart';
import '../../api/api.dart';
import 'EquityOfferings.dart';
import 'Ukm.dart';
import 'homekyc.dart';
class ExploreBusiness extends StatefulWidget {
@override
......@@ -35,7 +36,11 @@ class _ExploreBusinessState extends State<ExploreBusiness> {
height: 400,
margin: EdgeInsets.fromLTRB(16, 8, 16, 8),
child: GestureDetector(
onTap: () {},
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (context) =>
ProspectusPage((ukmLists[index].id).toString())));
},
child: Card(
key: Key('ukmCard: ' + ukmLists[index].equityName),
child: Column(
......@@ -89,31 +94,25 @@ class _ExploreBusinessState extends State<ExploreBusiness> {
children: <Widget>[
Expanded(
flex: 2,
child: Image.network(
ukmLists[index].logoUrl,
key: Key('ukmLogo'),
child: Container(
margin: EdgeInsets.fromLTRB(8, 0, 8, 0),
child: Image.network(
ukmLists[index].logoUrl,
key: Key('ukmLogo'),
),
),
),
Expanded(
flex: 8,
child: Column(
key: Key('companyColumn'),
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text(
ukmLists[index].equityName,
key: Key('ukmName'),
style: GoogleFonts.inter(
color:
Color.fromRGBO(74, 74, 74, 1.0),
fontSize: 16.0,
fontWeight: FontWeight.w500,
),
),
]),
child: Text(
ukmLists[index].equityName,
key: Key('ukmName'),
style: GoogleFonts.inter(
color: Color.fromRGBO(74, 74, 74, 1.0),
fontSize: 16.0,
fontWeight: FontWeight.w500,
),
),
),
],
),
......@@ -365,7 +364,7 @@ class _ExploreBusinessState extends State<ExploreBusiness> {
),
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return MaterialApp(home: HomeKYC());
return MaterialApp(home: MainScreen());
}));
}),
Text(
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,32 +2,127 @@ import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart';
import 'package:fundex_app/api/api.dart';
import 'package:fundex_app/assets/colors.dart';
import 'package:fundex_app/main-screen.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:flutter_multi_carousel/carousel.dart';
import 'package:intl/intl.dart';
import 'package:percent_indicator/linear_percent_indicator.dart';
import 'homekyc.dart';
// ignore: must_be_immutable
class ProspectusPage extends StatefulWidget {
String prevId;
ProspectusPage(this.prevId);
@override
_ProspectusPageState createState() => _ProspectusPageState();
_ProspectusPageState createState() => _ProspectusPageState(prevId);
}
class _ProspectusPageState extends State<ProspectusPage> {
var isVisible;
int id;
int equityId;
String fundingTarget;
String premoneyValuation;
String minimumPurchase;
String price;
String securityType;
String totalRaised;
String progress;
int totalInvestor;
List<dynamic> listMap = [];
List<Image> equityImages = [];
String name;
String code;
String prevId;
_ProspectusPageState(this.prevId);
@override
void initState() {
init();
super.initState();
isVisible = false;
}
Widget build(BuildContext context) {
List<AssetImage> equityImages = [
AssetImage('assets/images/pizzaInc.jpg'),
AssetImage('assets/images/gymInc.png'),
];
Future init() async {
final Map<String, dynamic> equityOffering =
await Api().getEquityOfferingsByID(prevId);
final Map<String, dynamic> equityOfferingSummary =
await Api().getEquityOfferingSummaryByID(prevId);
final List<dynamic> equityOfferingBanners =
await Api().getEquityOfferingBannersByID(prevId);
id = equityOffering['id'];
equityId = equityOffering['equity_id'];
if (int.parse(equityOffering['funding_target']) >= 1000000.00 &&
int.parse(equityOffering['funding_target']) < 999999999.99) {
fundingTarget =
(int.parse(equityOffering['funding_target']) / 1000000).toString() +
'0 juta';
} else if (int.parse(equityOffering['funding_target']) >= 1000000000.00 &&
int.parse(equityOffering['funding_target']) < 999999999999.99) {
fundingTarget = (int.parse(equityOffering['funding_target']) / 1000000000)
.toString() +
'0 Milyar';
} else {
final currencyFormatter = NumberFormat('#,##0.00', 'ID');
fundingTarget = currencyFormatter
.format(double.parse(equityOffering['funding_target']));
}
premoneyValuation = equityOffering['premoney_valuation'];
minimumPurchase = (int.parse(equityOffering['minimum_purchase']) *
int.parse(equityOffering['price']))
.toString();
price = equityOffering['price'];
securityType = equityOffering['security_type'];
if (int.parse(equityOfferingSummary['total_raised']) >= 1000000.00 &&
int.parse(equityOfferingSummary['total_raised']) < 999999999.99) {
totalRaised = (int.parse(equityOfferingSummary['total_raised']) / 1000000)
.toString() +
'0 juta';
} else if (int.parse(equityOfferingSummary['total_raised']) >=
1000000000.00 &&
int.parse(equityOfferingSummary['total_raised']) < 999999999999.99) {
totalRaised =
(int.parse(equityOfferingSummary['total_raised']) / 1000000000)
.toString() +
'0 Milyar';
} else {
final currencyFormatter = NumberFormat('#,##0.00', 'ID');
totalRaised = currencyFormatter
.format(double.parse(equityOfferingSummary['total_raised']));
}
progress =
double.parse(equityOfferingSummary['progress']).toStringAsFixed(2);
totalInvestor = equityOfferingSummary['total_investor'];
listMap = equityOfferingBanners;
final Map<String, dynamic> equityOfferingDetails = await Api()
.getEquityOfferingDetailsByID((equityOffering['equity_id']).toString());
name = equityOfferingDetails['name'];
code = equityOfferingDetails['code'];
setState(() {
this.id = id;
this.fundingTarget = fundingTarget;
this.premoneyValuation = premoneyValuation;
this.minimumPurchase = minimumPurchase;
this.price = price;
this.securityType = securityType;
this.totalRaised = totalRaised;
this.totalInvestor = totalInvestor;
this.listMap = listMap;
this.equityImages = equityImages;
print(equityImages.length);
for (int i = 0; i < listMap.length; i++) {
equityImages.add(Image.network(listMap[i]['url']));
}
this.name = name;
this.code = code;
});
}
Widget build(BuildContext context) {
void _changed() {
setState(() {
isVisible = !isVisible;
......@@ -49,11 +144,11 @@ class _ProspectusPageState extends State<ProspectusPage> {
),
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return MaterialApp(home: HomeKYC());
return MaterialApp(home: MainScreen());
}));
}),
Text(
'Italiano Pizza (ITAP)',
'$name ($code)',
key: Key('appBarTitle'),
style: GoogleFonts.inter(
color: Color.fromRGBO(18, 40, 75, 1.0),
......@@ -88,7 +183,7 @@ class _ProspectusPageState extends State<ProspectusPage> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.0),
image: DecorationImage(
image: equityImages[i],
image: equityImages[i].image,
fit: BoxFit.cover,
),
),
......@@ -127,7 +222,7 @@ class _ProspectusPageState extends State<ProspectusPage> {
height: 4.0,
),
Text(
'Rp100 Juta',
'Rp $fundingTarget',
key: Key('tagetPendanaanValue'),
style: GoogleFonts.roboto(
color: Color.fromRGBO(47, 47, 47, 1.0),
......@@ -151,7 +246,7 @@ class _ProspectusPageState extends State<ProspectusPage> {
height: 4.0,
),
Text(
'Rp xxxx',
'Rp $minimumPurchase',
key: Key('minimumInvestValue'),
style: GoogleFonts.roboto(
color: Color.fromRGBO(47, 47, 47, 1.0),
......@@ -175,7 +270,7 @@ class _ProspectusPageState extends State<ProspectusPage> {
height: 4.0,
),
Text(
'Ekuitas',
'$securityType',
key: Key('effectTypeValue'),
style: GoogleFonts.roboto(
color: Color.fromRGBO(47, 47, 47, 1.0),
......@@ -208,7 +303,7 @@ class _ProspectusPageState extends State<ProspectusPage> {
height: 4.0,
),
Text(
'Rp xxxx',
'Rp $premoneyValuation',
key: Key('preValuationValue'),
style: GoogleFonts.roboto(
color: Color.fromRGBO(47, 47, 47, 1.0),
......@@ -232,7 +327,7 @@ class _ProspectusPageState extends State<ProspectusPage> {
height: 4.0,
),
Text(
'Rp100 Ribu',
'Rp $price',
key: Key('hargaSatuanValue'),
style: GoogleFonts.roboto(
color: Color.fromRGBO(47, 47, 47, 1.0),
......@@ -256,7 +351,7 @@ class _ProspectusPageState extends State<ProspectusPage> {
height: 4.0,
),
Text(
'Rp 40 Juta',
'Rp $totalRaised',
key: Key('gatheredFundsValue'),
style: GoogleFonts.roboto(
color: Color.fromRGBO(47, 47, 47, 1.0),
......@@ -290,7 +385,7 @@ class _ProspectusPageState extends State<ProspectusPage> {
),
children: <TextSpan>[
TextSpan(
text: '40% dana ',
text: '$progress% ',
style: GoogleFonts.notoSans(
color:
Color.fromRGBO(47, 47, 47, 1.0),
......@@ -308,7 +403,7 @@ class _ProspectusPageState extends State<ProspectusPage> {
),
),
TextSpan(
text: '4 investor.',
text: '$totalInvestor investor.',
style: GoogleFonts.notoSans(
color:
Color.fromRGBO(47, 47, 47, 1.0),
......@@ -328,7 +423,7 @@ class _ProspectusPageState extends State<ProspectusPage> {
backgroundColor:
Color.fromRGBO(223, 223, 223, 1.0),
lineHeight: 16.0,
percent: 0.4,
percent: double.parse(progress) / 100,
)),
Container(
margin: const EdgeInsets.fromLTRB(0, 40, 0, 0),
......@@ -431,29 +526,13 @@ class _ProspectusPageState extends State<ProspectusPage> {
child: SizedBox(
width: 295,
height: 40,
child: ElevatedButton(
key: Key('loginButton'),
onPressed: () {
return null;
},
child: Text(
'Harga',
style: GoogleFonts.notoSans(
fontSize: 12,
fontWeight: FontWeight.normal,
color: black1,
),
),
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all<Color>(gray4),
shape: MaterialStateProperty.all<
RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(8.0)),
),
),
child: Text(
'$price',
textAlign: TextAlign.center,
style: GoogleFonts.roboto(
color: black1,
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
),
......
import 'package:flutter/material.dart';
import 'package:fundex_app/api/api.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/homekycUnregsitered.dart';
class CancelConfirmation extends StatefulWidget {
@override
_CancelConfirmationState createState() => _CancelConfirmationState();
......@@ -292,7 +293,7 @@ class __OtpFormState extends State<_OtpForm> {
Api().otpInput(
await SecureStorage().readSecureData('token'), otpString);
Navigator.push(context, MaterialPageRoute(builder: (context) {
return MaterialApp(home: MainScreen());
return MaterialApp(home: HomeKYCUnregistered());
}));
},
),
......
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:fundex_app/pages/business/prospectus_page.dart';
void main() {
testWidgets('texts and images are present on the page',
(WidgetTester tester) async {
//initialize
final backIcon = find.byKey(Key('backIcon'));
final appBarTitle = find.byKey(Key('appBarTitle'));
final targetPendnaaanText = find.byKey(Key('targetPendnaaanText'));
final tagetPendanaanValue = find.byKey(Key('tagetPendanaanValue'));
final minimumInvestText = find.byKey(Key('minimumInvestText'));
final minimumInvestValue = find.byKey(Key('minimumInvestValue'));
final effectTypeText = find.byKey(Key('effectTypeText'));
final effectTypeValue = find.byKey(Key('effectTypeValue'));
final preValuationText = find.byKey(Key('preValuationText'));
final preValuationValue = find.byKey(Key('preValuationValue'));
final hargaSatuanText = find.byKey(Key('hargaSatuanText'));
final hargaSatuanValue = find.byKey(Key('hargaSatuanValue'));
final gatheredFundsText = find.byKey(Key('gatheredFundsText'));
final gatheredFundsValue = find.byKey(Key('gatheredFundsValue'));
final fundprogressString = find.byKey(Key('fundprogressString'));
final fundprogressBar = find.byKey(Key('fundprogressBar'));
final buyButton = find.byKey(Key('buyButton'));
final remainingTimeValue = find.byKey(Key('remainingTimeValue'));
// execute
await tester.pumpWidget(MaterialApp(home: ProspectusPage()));
// check outputs
expect(backIcon, findsOneWidget);
expect(appBarTitle, findsOneWidget);
expect(targetPendnaaanText, findsOneWidget);
expect(tagetPendanaanValue, findsOneWidget);
expect(minimumInvestText, findsOneWidget);
expect(minimumInvestValue, findsOneWidget);
expect(effectTypeText, findsOneWidget);
expect(effectTypeValue, findsOneWidget);
expect(preValuationText, findsOneWidget);
expect(preValuationValue, findsOneWidget);
expect(hargaSatuanText, findsOneWidget);
expect(hargaSatuanValue, findsOneWidget);
expect(gatheredFundsText, findsOneWidget);
expect(gatheredFundsValue, findsOneWidget);
expect(fundprogressString, findsOneWidget);
expect(fundprogressBar, findsOneWidget);
expect(buyButton, findsOneWidget);
expect(remainingTimeValue, findsOneWidget);
});
testWidgets('tab system works and can be switched',
(WidgetTester tester) async {
// initialize
final highlightsTabText = find.byKey(Key('highlightsTabText'));
final summaryTabText = find.byKey(Key('summaryTabText'));
final servicesTabText = find.byKey(Key('servicesTabText'));
final bulletPoints = find.byKey(Key('bulletPoints'));
final highlightsContent = find.byKey(Key('highlightsContent'));
// execute
await tester.pumpWidget(MaterialApp(home: ProspectusPage()));
await tester.tap(highlightsTabText);
await tester.pumpAndSettle();
// check outputs
expect(highlightsTabText, findsOneWidget);
expect(summaryTabText, findsOneWidget);
expect(