Fakultas Ilmu Komputer UI

Commit f10a9ceb authored by Manuel Yoseph Ray's avatar Manuel Yoseph Ray
Browse files

[REFACTOR] menghapus duplicate line

parent a179ac62
Pipeline #81940 passed with stages
in 6 minutes and 27 seconds
{"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-07 05:20:09.262005","version":"2.0.1"} {"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-07 05:28:09.805145","version":"2.0.1"}
\ No newline at end of file \ No newline at end of file
import 'package:flutter/material.dart';
import 'package:fundex_app/my_flutter_app_icons.dart';
import 'package:fundex_app/pages/profile/profile_base_page.dart';
import 'package:fundex_app/pages/transaction/Transaction.dart';
import 'package:google_fonts/google_fonts.dart';
class MainScreen extends StatefulWidget {
@override
_MainScreenState createState() => _MainScreenState();
}
class _MainScreenState extends State<MainScreen> {
int _selectedIndex = 0;
List<Widget> _widgetOptions = <Widget>[
Transaction(),
Transaction(),
Transaction(),
Transaction(),
ProfilBasePage(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
bottomNavigationBar: BottomNavigationBar(
currentIndex: _selectedIndex,
key: Key('bottomNavigationBar'),
backgroundColor: Colors.white,
selectedLabelStyle: GoogleFonts.inter(
fontWeight: FontWeight.bold,
fontSize: 12.0,
color: Color.fromRGBO(18, 40, 75, 1.0),
),
unselectedLabelStyle: GoogleFonts.inter(
fontWeight: FontWeight.bold,
fontSize: 12.0,
color: Color.fromRGBO(196, 196, 196, 1.0),
),
selectedItemColor: Color.fromRGBO(18, 40, 75, 1.0),
unselectedItemColor: Color.fromRGBO(196, 196, 196, 1.0),
type: BottomNavigationBarType.fixed,
items: [
BottomNavigationBarItem(
icon: Icon(
MyFlutterApp.selectedhomeicon,
key: Key('homeIcon'),
),
label: 'Beranda',
),
BottomNavigationBarItem(
icon: Icon(
MyFlutterApp.unselectedportfolio,
key: Key('portfolioIcon'),
),
label: 'Portfolio',
),
BottomNavigationBarItem(
icon: Icon(
MyFlutterApp.unselectedtransaction,
key: Key('transactionIcon'),
),
label: 'Transaksi',
),
BottomNavigationBarItem(
icon: Icon(
MyFlutterApp.unselectedhelp,
key: Key('helpIcon'),
),
label: 'Bantuan',
),
BottomNavigationBarItem(
icon: Icon(
MyFlutterApp.unselectedaccount,
key: Key('accountIcon'),
),
label: 'Akun',
),
],
onTap: (index) {
setState(() {
_selectedIndex = index;
});
},
),
body: _widgetOptions.elementAt(_selectedIndex),
);
}
}
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:fundex_app/main-screen.dart';
import 'package:fundex_app/api/api.dart'; import 'package:fundex_app/api/api.dart';
import 'package:fundex_app/pages/forget-password/ForgetPassword.dart'; import 'package:fundex_app/pages/forget-password/ForgetPassword.dart';
import 'package:fundex_app/pages/register/register.dart'; import 'package:fundex_app/pages/register/register.dart';
import 'package:fundex_app/pages/transaction/Transaction.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import 'package:fundex_app/assets/colors.dart'; import 'package:fundex_app/assets/colors.dart';
...@@ -208,7 +208,7 @@ class _LoginState extends State<Login> { ...@@ -208,7 +208,7 @@ class _LoginState extends State<Login> {
MaterialPageRoute( MaterialPageRoute(
builder: (context) { builder: (context) {
return MaterialApp( return MaterialApp(
home: MainScreen()); home: Transaction());
})); }));
}, },
child: Text( child: Text(
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:fundex_app/main-screen.dart'; import 'package:fundex_app/pages/transaction/Transaction.dart';
import 'package:fundex_app/pages/kyc/design.dart'; import 'package:fundex_app/pages/kyc/design.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import 'package:fundex_app/assets/colors.dart'; import 'package:fundex_app/assets/colors.dart';
...@@ -287,7 +287,7 @@ class __OtpFormState extends State<_OtpForm> { ...@@ -287,7 +287,7 @@ class __OtpFormState extends State<_OtpForm> {
pin6FocusNode.unfocus(); pin6FocusNode.unfocus();
otp = int.parse(otpString); otp = int.parse(otpString);
Navigator.push(context, MaterialPageRoute(builder: (context) { Navigator.push(context, MaterialPageRoute(builder: (context) {
return MaterialApp(home: MainScreen()); return MaterialApp(home: Transaction());
})); }));
}, },
), ),
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:fundex_app/assets/colors.dart'; import 'package:fundex_app/assets/colors.dart';
import 'package:fundex_app/main-screen.dart'; import 'package:fundex_app/pages/transaction/Transaction.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
...@@ -24,7 +24,7 @@ class _DetailTransactionDepositState extends State<DetailTransactionDeposit> { ...@@ -24,7 +24,7 @@ class _DetailTransactionDepositState extends State<DetailTransactionDeposit> {
context, context,
new MaterialPageRoute( new MaterialPageRoute(
builder: (BuildContext context) => builder: (BuildContext context) =>
MaterialApp(home: MainScreen()))); MaterialApp(home: Transaction())));
}), }),
appBar: AppBar( appBar: AppBar(
backgroundColor: white, backgroundColor: white,
......
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:fundex_app/main-screen.dart';
void main() {
Widget createWidgetForTesting({Widget child}) {
return MaterialApp(
home: child,
);
}
testWidgets('Testing bottom navigation bar', (WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('bottomNavigationBar')), findsOneWidget);
});
testWidgets('Testing home icon on bottom navbar',
(WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('homeIcon')), findsOneWidget);
});
testWidgets('Testing portfolio icon on bottom navbar',
(WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('portfolioIcon')), findsOneWidget);
});
testWidgets('Testing transaction icon on bottom navbar',
(WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('transactionIcon')), findsOneWidget);
});
testWidgets('Testing help icon on bottom navbar',
(WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('helpIcon')), findsOneWidget);
});
testWidgets('Testing account icon on bottom navbar',
(WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('accountIcon')), findsOneWidget);
});
}
// import 'package:flutter/material.dart';
// import 'package:flutter_test/flutter_test.dart';
// import 'package:fundex_app/pages/profile/profile_base_page.dart';
// void main() {
// Widget createWidgetForTesting({Widget child}) {
// return MaterialApp(
// home: child,
// );
// }
// testWidgets('Testing Scaffold', (WidgetTester tester) async {
// await tester.pumpWidget(createWidgetForTesting(child: ProfilBasePage()));
// expect(find.byKey(Key('scaffold-base')), findsOneWidget);
// });
// }
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:fundex_app/main-screen.dart';
void main() {
Widget createWidgetForTesting({Widget child}) {
return MaterialApp(
home: child,
);
}
testWidgets('Testing bottom navigation bar', (WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('bottomNavigationBar')), findsOneWidget);
});
testWidgets('Testing home icon on bottom navbar',
(WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('homeIcon')), findsOneWidget);
});
testWidgets('Testing portfolio icon on bottom navbar',
(WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('portfolioIcon')), findsOneWidget);
});
testWidgets('Testing transaction icon on bottom navbar',
(WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('transactionIcon')), findsOneWidget);
});
testWidgets('Testing help icon on bottom navbar',
(WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('helpIcon')), findsOneWidget);
});
testWidgets('Testing account icon on bottom navbar',
(WidgetTester tester) async {
await tester.pumpWidget(createWidgetForTesting(child: MainScreen()));
expect(find.byKey(Key('accountIcon')), findsOneWidget);
});
}
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