Fakultas Ilmu Komputer UI

Commit 16f3564c authored by Habel Christiando Tobing's avatar Habel Christiando Tobing
Browse files

added components.

parent c475ad3f
Pipeline #81887 canceled with stages
in 4 minutes and 32 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=/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/
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":"/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-29 13:50:58.114050","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-05-31 02:33:40.333480","version":"2.0.1"}
\ No newline at end of file
This diff is collapsed.
sdk.dir=/Users/ferdisungkar/Library/Android/sdk
flutter.sdk=/Users/ferdisungkar/flutter
sdk.dir=C:\\Users\\habel\\AppData\\Local\\Android\\sdk
flutter.sdk=D:\\Program Files\\flutter
=======
flutter.buildMode=debug
flutter.versionName=1.0.0
......
import 'dart:convert';
import 'dart:io';
import 'package:fundex_app/pages/business/EquityOfferings.dart';
import 'package:fundex_app/storage/storage.dart';
import 'package:http/http.dart' show Client;
......@@ -411,4 +412,54 @@ class Api {
throw Exception('Failed to get MemberDocsID');
}
}
Future<EquityOfferings> getSortedEquities(
String statusOffering, String businessField, String sortBy) async {
final apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/public/equity-offerings/explore?status_offering=' +
statusOffering +
'&business_field=' +
businessField +
'&sort_by=' +
sortBy);
var token = await secureStorage.readSecureData('accessToken');
var headers = {
'Content-type': 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token',
};
var apiResult = await client.get(apiURL, headers: headers);
print(await secureStorage.readSecureData('accessToken'));
print(apiResult.reasonPhrase);
print(apiResult.request);
print("get equities: " + (apiResult.statusCode).toString());
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
return EquityOfferings.fromJson(jsonData);
} else {
throw Exception('Get Failed');
}
}
Future<EquityOfferings> getEquities() async {
final apiURL = Uri.parse(
'https://canary.fundex.id/api/v1.1/public/equity-offerings/explore?status_offering=&business_field=&sort_by=');
var token = await secureStorage.readSecureData('accessToken');
var headers = {
'Content-type': 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token',
};
var apiResult = await client.get(apiURL, headers: headers);
print(await secureStorage.readSecureData('accessToken'));
print(apiResult.reasonPhrase);
print(apiResult.request);
print("get equities: " + (apiResult.statusCode).toString());
if (apiResult.statusCode == 200) {
var jsonObject = json.decode(apiResult.body);
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
return EquityOfferings.fromJson(jsonData);
} else {
throw Exception('Get Failed');
}
}
}
import 'Ukm.dart';
class EquityOfferings {
List<Ukm> ukmList;
EquityOfferings({this.ukmList});
factory EquityOfferings.fromJson(Map<String, dynamic> jsonData) {
var list = jsonData['equity_offerings'] as List;
print(list.runtimeType);
List<Ukm> ukmLists = list.map((i) => Ukm.fromJson(i)).toList();
return EquityOfferings(ukmList: ukmLists);
}
List<Ukm> getUkmList() {
return this.ukmList;
}
}
import 'package:intl/intl.dart';
import 'package:time_formatter/time_formatter.dart';
class Ukm {
final String ukmName;
final String ukmCompanyName;
final String ukmLogo;
final String ukmPic;
String ukmStatus;
final String ukmBusinessField;
double fundTarget;
double unitPrice;
Duration remainingTime;
int minInvest;
int fundCollectedPercentage;
double fundCollected;
int investorSum;
Ukm(
this.ukmName,
this.ukmCompanyName,
this.ukmPic,
this.ukmLogo,
this.ukmStatus,
this.ukmBusinessField,
this.fundTarget,
this.unitPrice,
int id;
String bannerImg;
String equityName;
int remainingTime;
String descriptionId;
String descriptionEn;
String price;
String fundingTarget;
String minInvest;
int totalInvestor;
String totalRaised;
int statusOffering;
String progress;
String logoUrl;
Ukm({
this.id,
this.bannerImg,
this.equityName,
this.remainingTime,
this.descriptionId,
this.descriptionEn,
this.price,
this.fundingTarget,
this.minInvest,
this.fundCollectedPercentage,
this.fundCollected,
this.investorSum);
this.totalInvestor,
this.totalRaised,
this.statusOffering,
this.progress,
this.logoUrl,
});
factory Ukm.fromJson(Map<String, dynamic> jsonData) {
return Ukm(
id: jsonData['id'],
bannerImg: jsonData['banner_img'],
equityName: jsonData['equity_name'],
remainingTime: jsonData['remaining_time'],
descriptionId: jsonData['description_id'],
descriptionEn: jsonData['description_en'],
price: jsonData['price'],
fundingTarget: jsonData['funding_target'],
minInvest: jsonData['min_invest'],
totalInvestor: jsonData['total_investor'],
totalRaised: jsonData['total_raised'],
statusOffering: jsonData['status_offering'],
progress: jsonData['progress'],
logoUrl: jsonData['logo_url']);
}
String get beautifyUnitPrice {
final currencyFormatter = NumberFormat.currency(locale: 'ID');
return currencyFormatter.format(this.unitPrice);
String get beautifyPrice {
final currencyFormatter = NumberFormat('#,##0.00', 'ID');
return "Rp " + currencyFormatter.format(int.parse(this.price));
}
String get beautifyMinInvest {
if (int.parse(this.minInvest) >= 1000000.00 &&
int.parse(this.minInvest) < 999999999.99) {
double result = int.parse(this.minInvest) / 1000000;
return "Rp " + result.toInt().toString() + " Juta";
} else if (int.parse(this.minInvest) >= 1000000000.00 &&
int.parse(this.minInvest) < 999999999999.99) {
double result = int.parse(this.minInvest) / 1000000000;
return "Rp " + result.toInt().toString() + " Milyar";
} else {
final currencyFormatter = NumberFormat('#,##0.00', 'ID');
return "Rp " + currencyFormatter.format(double.parse(this.minInvest));
}
// final currencyFormatter = NumberFormat.currency(locale: 'ID');
// return currencyFormatter.format(this.minInvest);
}
String get beautifyProgress {
double progress = double.parse(this.progress);
double result = double.parse(progress.toStringAsFixed(2));
return result.toString();
}
String get beautifyFundTarget {
if (this.fundTarget >= 1000000.00 && this.fundTarget < 999999999.99) {
double result = this.fundTarget / 1000000;
return "IDR" + result.toInt().toString() + " Juta";
} else if (this.fundTarget >= 1000000000.00 &&
this.fundTarget < 999999999999.99) {
double result = this.fundTarget / 1000000000;
return "IDR" + result.toInt().toString() + " Milyar";
}
final currencyFormatter = NumberFormat.currency(locale: 'ID');
return currencyFormatter.format(this.fundTarget);
if (int.parse(this.fundingTarget) >= 1000000.00 &&
int.parse(this.fundingTarget) < 999999999.99) {
double result = int.parse(this.fundingTarget) / 1000000;
return "Rp " + result.toInt().toString() + " Juta";
} else if (int.parse(this.fundingTarget) >= 1000000000.00 &&
int.parse(this.fundingTarget) < 999999999999.99) {
double result = int.parse(this.fundingTarget) / 1000000000;
return "Rp " + result.toInt().toString() + " Milyar";
} else {
final currencyFormatter = NumberFormat('#,##0.00', 'ID');
return "Rp " + currencyFormatter.format(double.parse(this.fundingTarget));
}
}
String get beautifyDate {
var date = DateTime.fromMillisecondsSinceEpoch(this.remainingTime);
return DateFormat.yMMMd().format(date);
}
String get beautifyTime {
return formatTime(remainingTime);
}
}
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'exploreBusiness.dart';
Widget unregisteredUser(BuildContext context) {
return Container(
alignment: Alignment.center,
margin: EdgeInsets.all(16.0),
height: 150,
width: double.infinity,
key: Key('cardContainer'),
child: GestureDetector(
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return MaterialApp(home: ExploreBusiness());
}));
},
child: Card(
key: Key('statusCard'),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
side: BorderSide(
color: Colors.grey.withOpacity(0.4),
width: 1,
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
key: Key('rowStatusCard'),
children: <Widget>[
Expanded(
flex: 2,
child: Container(
height: double.infinity,
margin: EdgeInsets.all(16),
child: Image.asset(
'assets/images/unregisteredUser.png',
height: double.infinity,
width: double.infinity,
key: Key(
'statusLogo',
),
),
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.fromLTRB(0, 16, 16, 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Selamat Datang!',
key: Key('stringStatus'),
style: GoogleFonts.inter(
color: Color.fromRGBO(18, 40, 75, 1.0),
fontWeight: FontWeight.bold,
fontSize: 18.0),
),
SizedBox(
height: 4.0,
),
Text(
'Selesaikan pendaftaran e-KYC',
style: GoogleFonts.notoSans(
color: Color.fromRGBO(18, 40, 75, 1.0),
fontWeight: FontWeight.bold,
fontSize: 12.0),
),
Text(
'(Know Your Customer) untuk dapat memulai pengajuan dana',
style: GoogleFonts.notoSans(
color: Color.fromRGBO(18, 40, 75, 1.0),
fontWeight: FontWeight.w500,
fontSize: 12.0),
),
SizedBox(
key: Key(
'spaceBetweenFundTargetValueAndMinInvestString'),
height: 4.0,
),
Text(
'Ketuk kartu ini untuk menyelesaikan pendaftaran',
style: GoogleFonts.notoSans(
color: Color.fromRGBO(18, 40, 75, 1.0),
fontWeight: FontWeight.bold,
fontSize: 12.0),
),
]),
))
],
),
),
),
);
}
Widget waitingUser(BuildContext context) {
return Container(
alignment: Alignment.center,
margin: EdgeInsets.all(16.0),
key: Key('cardContainer'),
child: Card(
key: Key('statusCard'),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
side: BorderSide(
color: Colors.grey.withOpacity(0.4),
width: 1,
),
),
child: Padding(
key: Key('paddingStatusCard'),
padding: const EdgeInsets.fromLTRB(24.0, 32.0, 24.0, 32.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
key: Key('rowStatusCard'),
children: <Widget>[
Image.asset(
'assets/images/cardLogo.png',
key: Key('statusLogo'),
),
Text(
'Pendaftaran E-KYC berhasil \ndisetujui',
key: Key('stringStatus'),
style: GoogleFonts.inter(
color: Color.fromRGBO(18, 40, 75, 1.0),
fontWeight: FontWeight.bold,
fontSize: 14.0),
),
],
),
),
),
);
}
Widget registeredUser(BuildContext context) {
return Container(
alignment: Alignment.center,
margin: EdgeInsets.all(16.0),
height: 150,
width: double.infinity,
key: Key('cardContainer'),
child: Card(
key: Key('statusCard'),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
side: BorderSide(
color: Colors.grey.withOpacity(0.4),
width: 1,
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
key: Key('rowStatusCard'),
children: <Widget>[
Expanded(
flex: 2,
child: Container(
height: double.infinity,
margin: EdgeInsets.all(16),
child: Image.asset(
'assets/images/registeredUser.png',
height: double.infinity,
width: double.infinity,
key: Key(
'statusLogo',
),
),
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.fromLTRB(0, 16, 16, 16),
child: Text(
'Pendaftaran E-KYC berhasil \ndisetujui',
key: Key('stringStatus'),
style: GoogleFonts.inter(
color: Color.fromRGBO(18, 40, 75, 1.0),
fontWeight: FontWeight.bold,
fontSize: 14.0),
),
))
],
),
),
);
}
Widget errorUser(BuildContext context) {
return Container(
alignment: Alignment.center,
margin: EdgeInsets.all(16.0),
key: Key('cardContainer'),
child: Card(
key: Key('statusCard'),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
side: BorderSide(
color: Colors.grey.withOpacity(0.4),
width: 1,
),
),
child: Padding(
key: Key('paddingStatusCard'),
padding: const EdgeInsets.fromLTRB(24.0, 32.0, 24.0, 32.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
key: Key('rowStatusCard'),
children: <Widget>[
Image.asset(
'assets/images/cardLogo.png',
key: Key('statusLogo'),
),
Text(
'Pendaftaran E-KYC berhasil \ndisetujui',
key: Key('stringStatus'),
style: GoogleFonts.inter(
color: Color.fromRGBO(18, 40, 75, 1.0),
fontWeight: FontWeight.bold,
fontSize: 14.0),
),
],
),
),
),
);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -686,6 +686,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.15"
time_formatter:
dependency: "direct main"
description:
name: time_formatter
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0+5"
timing:
dependency: transitive
description:
......
......@@ -36,6 +36,7 @@ dependencies:
dotted_border: ^1.0.7
image_picker: any
flutter_multi_carousel: ^1.0.0
time_formatter: ^1.0.0
# The following adds the Cupertino Icons font to your application.
......
......@@ -3,35 +3,6 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:fundex_app/pages/business/exploreBusiness.dart';
void main() {
testWidgets('Explore Business has widgets', (WidgetTester tester) async {
// initialize
final stringTitle = find.byKey(Key('stringTitle'));
final backIcon = find.byKey(Key('backIcon'));
final jenisPenawaranDropDownButton =
find.byKey(Key('jenisPenawaranDropDownButton'));
final progressDropDownButton = find.byKey(Key('progressDropDownButton'));
final urutkanDropDownButton = find.byKey(Key('urutkanDropDownButton'));
final clearFilterTextButton = find.byKey(Key('clearFilterTextButton'));
final jenisPenawaranDropDownMenuItem =
find.byKey(Key('jenisPenawaranDropDownMenuItem'));
final progressDropDownMenuItem =
find.byKey(Key('progressDropDownMenuItem'));
final urutkanDropDownMenuItem = find.byKey(Key('urutkanDropDownMenuItem'));
// execute
await tester.pumpWidget(MaterialApp(home: ExploreBusiness()));
// check outputs
expect(stringTitle, findsOneWidget);
expect(backIcon, findsOneWidget);
expect(jenisPenawaranDropDownButton, findsOneWidget);
expect(progressDropDownButton, findsOneWidget);
expect(urutkanDropDownButton, findsOneWidget);
expect(jenisPenawaranDropDownMenuItem, findsNWidgets(10));
expect(progressDropDownMenuItem, findsNWidgets(3));
expect(urutkanDropDownMenuItem, findsNWidgets(3));
expect(clearFilterTextButton, findsOneWidget);
});
testWidgets('Back Icon navigate into Dashboard when pressed',
(WidgetTester tester) async {
// initialize
......@@ -48,74 +19,4 @@ void main() {
// check outputs
expect(penawaranString, findsOneWidget);
});
testWidgets('Testing filter and sort', (WidgetTester tester) async {
// initialize
final ukmCardHealth = find.byKey(Key('ukmCard: Health'));
final ukmCardEntertainment = find.byKey(Key('ukmCard: Entertainment'));
final ukmCardEdu = find.byKey(Key('ukmCard: Edu'));
final jenisPenawaranDropDown =