diff --git a/assets/nicasiaassets/air.png b/assets/nicasiaassets/air.png new file mode 100644 index 00000000..e43c053f Binary files /dev/null and b/assets/nicasiaassets/air.png differ diff --git a/assets/nicasiaassets/brand_alternate.png b/assets/nicasiaassets/brand_alternate.png new file mode 100644 index 00000000..59966308 Binary files /dev/null and b/assets/nicasiaassets/brand_alternate.png differ diff --git a/assets/nicasiaassets/brand_f1soft.png b/assets/nicasiaassets/brand_f1soft.png new file mode 100644 index 00000000..fbbc7e1e Binary files /dev/null and b/assets/nicasiaassets/brand_f1soft.png differ diff --git a/assets/nicasiaassets/contact_list.png b/assets/nicasiaassets/contact_list.png new file mode 100644 index 00000000..758f8058 Binary files /dev/null and b/assets/nicasiaassets/contact_list.png differ diff --git a/assets/nicasiaassets/credit_cards.png b/assets/nicasiaassets/credit_cards.png new file mode 100644 index 00000000..b5e14808 Binary files /dev/null and b/assets/nicasiaassets/credit_cards.png differ diff --git a/assets/nicasiaassets/crop__ic_cancel.png b/assets/nicasiaassets/crop__ic_cancel.png new file mode 100644 index 00000000..fbcdc9d6 Binary files /dev/null and b/assets/nicasiaassets/crop__ic_cancel.png differ diff --git a/assets/nicasiaassets/crop__ic_done.png b/assets/nicasiaassets/crop__ic_done.png new file mode 100644 index 00000000..6c6b3057 Binary files /dev/null and b/assets/nicasiaassets/crop__ic_done.png differ diff --git a/assets/nicasiaassets/el.png b/assets/nicasiaassets/el.png new file mode 100644 index 00000000..8fb23c2b Binary files /dev/null and b/assets/nicasiaassets/el.png differ diff --git a/assets/nicasiaassets/esewa.jpg b/assets/nicasiaassets/esewa.jpg new file mode 100644 index 00000000..cf0d4a63 Binary files /dev/null and b/assets/nicasiaassets/esewa.jpg differ diff --git a/assets/nicasiaassets/fill_1_copy.png b/assets/nicasiaassets/fill_1_copy.png new file mode 100644 index 00000000..3f753d6a Binary files /dev/null and b/assets/nicasiaassets/fill_1_copy.png differ diff --git a/assets/nicasiaassets/general_inquiry.png b/assets/nicasiaassets/general_inquiry.png new file mode 100644 index 00000000..7685674a Binary files /dev/null and b/assets/nicasiaassets/general_inquiry.png differ diff --git a/assets/nicasiaassets/ic_account.png b/assets/nicasiaassets/ic_account.png new file mode 100644 index 00000000..7dd4115e Binary files /dev/null and b/assets/nicasiaassets/ic_account.png differ diff --git a/assets/nicasiaassets/ic_accout_list_24.png b/assets/nicasiaassets/ic_accout_list_24.png new file mode 100644 index 00000000..95fcc49d Binary files /dev/null and b/assets/nicasiaassets/ic_accout_list_24.png differ diff --git a/assets/nicasiaassets/ic_action_payment.png b/assets/nicasiaassets/ic_action_payment.png new file mode 100644 index 00000000..48f05fd5 Binary files /dev/null and b/assets/nicasiaassets/ic_action_payment.png differ diff --git a/assets/nicasiaassets/ic_calendar.png b/assets/nicasiaassets/ic_calendar.png new file mode 100644 index 00000000..31a9f1b5 Binary files /dev/null and b/assets/nicasiaassets/ic_calendar.png differ diff --git a/assets/nicasiaassets/ic_contact_list_24.png b/assets/nicasiaassets/ic_contact_list_24.png new file mode 100644 index 00000000..84296a10 Binary files /dev/null and b/assets/nicasiaassets/ic_contact_list_24.png differ diff --git a/assets/nicasiaassets/ic_fingerprint.png b/assets/nicasiaassets/ic_fingerprint.png new file mode 100644 index 00000000..61da3b6f Binary files /dev/null and b/assets/nicasiaassets/ic_fingerprint.png differ diff --git a/assets/nicasiaassets/ic_fund_transfer.png b/assets/nicasiaassets/ic_fund_transfer.png new file mode 100644 index 00000000..558acb6c Binary files /dev/null and b/assets/nicasiaassets/ic_fund_transfer.png differ diff --git a/assets/nicasiaassets/ic_launcher_round.png b/assets/nicasiaassets/ic_launcher_round.png new file mode 100644 index 00000000..092038d5 Binary files /dev/null and b/assets/nicasiaassets/ic_launcher_round.png differ diff --git a/assets/nicasiaassets/ic_payments_64_4.png b/assets/nicasiaassets/ic_payments_64_4.png new file mode 100644 index 00000000..51c2a15b Binary files /dev/null and b/assets/nicasiaassets/ic_payments_64_4.png differ diff --git a/assets/nicasiaassets/ic_scan2pay_64_4.png b/assets/nicasiaassets/ic_scan2pay_64_4.png new file mode 100644 index 00000000..8e52c6c4 Binary files /dev/null and b/assets/nicasiaassets/ic_scan2pay_64_4.png differ diff --git a/assets/nicasiaassets/ic_sch_payment_64_4.png b/assets/nicasiaassets/ic_sch_payment_64_4.png new file mode 100644 index 00000000..f5a292aa Binary files /dev/null and b/assets/nicasiaassets/ic_sch_payment_64_4.png differ diff --git a/assets/nicasiaassets/ic_sms_32.png b/assets/nicasiaassets/ic_sms_32.png new file mode 100644 index 00000000..2c65fd15 Binary files /dev/null and b/assets/nicasiaassets/ic_sms_32.png differ diff --git a/assets/nicasiaassets/ic_topup.png b/assets/nicasiaassets/ic_topup.png new file mode 100644 index 00000000..74ffbebb Binary files /dev/null and b/assets/nicasiaassets/ic_topup.png differ diff --git a/assets/nicasiaassets/ic_transfer_32_4.png b/assets/nicasiaassets/ic_transfer_32_4.png new file mode 100644 index 00000000..9514c42f Binary files /dev/null and b/assets/nicasiaassets/ic_transfer_32_4.png differ diff --git a/assets/nicasiaassets/ic_username.png b/assets/nicasiaassets/ic_username.png new file mode 100644 index 00000000..05e3e3b0 Binary files /dev/null and b/assets/nicasiaassets/ic_username.png differ diff --git a/assets/nicasiaassets/ic_view_statement.png b/assets/nicasiaassets/ic_view_statement.png new file mode 100644 index 00000000..863fce05 Binary files /dev/null and b/assets/nicasiaassets/ic_view_statement.png differ diff --git a/assets/nicasiaassets/icon_more.png b/assets/nicasiaassets/icon_more.png new file mode 100644 index 00000000..f48f5f44 Binary files /dev/null and b/assets/nicasiaassets/icon_more.png differ diff --git a/assets/nicasiaassets/logo.png b/assets/nicasiaassets/logo.png new file mode 100644 index 00000000..9074fec1 Binary files /dev/null and b/assets/nicasiaassets/logo.png differ diff --git a/assets/nicasiaassets/mountain.png b/assets/nicasiaassets/mountain.png new file mode 100644 index 00000000..ac9a4aac Binary files /dev/null and b/assets/nicasiaassets/mountain.png differ diff --git a/assets/nicasiaassets/nicLogo.png b/assets/nicasiaassets/nicLogo.png new file mode 100644 index 00000000..5890b39f Binary files /dev/null and b/assets/nicasiaassets/nicLogo.png differ diff --git a/assets/nicasiaassets/powered_by_google_light.png b/assets/nicasiaassets/powered_by_google_light.png new file mode 100644 index 00000000..5c14a03f Binary files /dev/null and b/assets/nicasiaassets/powered_by_google_light.png differ diff --git a/assets/nicasiaassets/profile.jpg b/assets/nicasiaassets/profile.jpg new file mode 100644 index 00000000..88294d1c Binary files /dev/null and b/assets/nicasiaassets/profile.jpg differ diff --git a/assets/nicasiaassets/router.png b/assets/nicasiaassets/router.png new file mode 100644 index 00000000..bcd469a2 Binary files /dev/null and b/assets/nicasiaassets/router.png differ diff --git a/assets/nicasiaassets/sas.png b/assets/nicasiaassets/sas.png new file mode 100644 index 00000000..4e6149d7 Binary files /dev/null and b/assets/nicasiaassets/sas.png differ diff --git a/assets/nicasiaassets/scan_2_pay.png b/assets/nicasiaassets/scan_2_pay.png new file mode 100644 index 00000000..846ddc29 Binary files /dev/null and b/assets/nicasiaassets/scan_2_pay.png differ diff --git a/assets/nicasiaassets/settings.png b/assets/nicasiaassets/settings.png new file mode 100644 index 00000000..0a7c6442 Binary files /dev/null and b/assets/nicasiaassets/settings.png differ diff --git a/assets/nicasiaassets/tv.png b/assets/nicasiaassets/tv.png new file mode 100644 index 00000000..df6aef66 Binary files /dev/null and b/assets/nicasiaassets/tv.png differ diff --git a/assets/nicasiaassets/umb.png b/assets/nicasiaassets/umb.png new file mode 100644 index 00000000..cdb07700 Binary files /dev/null and b/assets/nicasiaassets/umb.png differ diff --git a/lib/core/presentation/routes.dart b/lib/core/presentation/routes.dart index d0aa2d4b..fef59d36 100644 --- a/lib/core/presentation/routes.dart +++ b/lib/core/presentation/routes.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_ui_challenges/core/data/models/menu.dart'; +import 'package:flutter_ui_challenges/src/nic_asia_clone/nic_asia_app.dart'; import 'package:flutter_ui_challenges/src/pages/animations/anim4.dart'; import 'package:flutter_ui_challenges/src/pages/animations/anim5.dart'; import 'package:flutter_ui_challenges/src/pages/bike/bike_details.dart'; @@ -304,7 +305,8 @@ final List pages = [ SubMenuItem('Music player', MusicPlayer(), path: MusicPlayer.path), ]), - SubMenuItem("Grocery UI Kit", GroceryHomePage(), path: GroceryHomePage.path) + SubMenuItem("Grocery UI Kit", GroceryHomePage(), path: GroceryHomePage.path), + SubMenuItem("Bank App Clone", NicAsiaApp(), path: NicAsiaApp.path), ]; SubMenuItem getItemForKey(String key) { diff --git a/lib/src/nic_asia_clone/nic_asia_app.dart b/lib/src/nic_asia_clone/nic_asia_app.dart new file mode 100644 index 00000000..95febd41 --- /dev/null +++ b/lib/src/nic_asia_clone/nic_asia_app.dart @@ -0,0 +1,42 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + + +import 'package:flutter/material.dart'; +import 'pages/dashboard.dart'; +import 'pages/login.dart'; +import 'util/constant.dart'; + +class NicAsiaApp extends StatelessWidget { + static final String path = "lib/src/nic_asia_clone/nic_asia_app.dart"; + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + title: 'NIC ASIA', + theme: ThemeData( + primaryColor: primaryColor, + accentColor: primaryColorLight, + ), + initialRoute: '/', + routes: { + '/': (BuildContext context) => SafeArea( + top: true, + child: Login(), + ), + '/dashboard': (context) => SafeArea( + top: true, + child: Dashboard(), + ), + }, + onUnknownRoute: (RouteSettings settings) { + print('INSIDE Unknown routes'); + return MaterialPageRoute( + builder: (BuildContext context) => Login(), + ); + }, + ); + } +} diff --git a/lib/src/nic_asia_clone/pages/dashboard.dart b/lib/src/nic_asia_clone/pages/dashboard.dart new file mode 100644 index 00000000..5d71c0f3 --- /dev/null +++ b/lib/src/nic_asia_clone/pages/dashboard.dart @@ -0,0 +1,204 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import '../util/constant.dart'; +import '../widget/dashboard/categories.dart'; +import '../widget/dashboard/last_transactions.dart'; +import '../widget/dashboard/top_account_info.dart'; +import '../widget/profile_image.dart'; + +class Dashboard extends StatelessWidget { + @override + Widget build(BuildContext context) { + Size deviceSize = MediaQuery.of(context).size; + return Scaffold( + drawer: Drawer( + child: Column( + children: [ + buildUserInfo(context), + buildDrawerItem, + ], + ), + ), + appBar: buildAppBar(), + body: Stack( + children: [ + Container( + color: primaryColor, + height: deviceSize.height * 0.1, + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: deviceSize.width * 0.03, + ), + child: Column( + children: [ + TopAccountInfo(), + Flexible( + fit: FlexFit.tight, + child: ListView( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + children: [ + Categories(), + LastTransactions(), + ], + ), + ) + ], + ), + ) + ], + ), + ); + } + + final buildDrawerItem = Flexible( + child: Container( + color: drawerColoSecondary, + padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 10.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + mainAxisSize: MainAxisSize.min, + children: [ + for (Draw item in drawerItems) + ListTile( + leading: Icon( + item.icon, + color: Colors.white70, + ), + title: Text( + item.title, + style: TextStyle( + color: Colors.white70, + ), + ), + ), + ], + ), + ListTile( + leading: Icon( + Icons.lock, + color: Colors.white, + ), + title: Text( + 'Logout', + style: TextStyle( + color: Colors.white, + ), + ), + ), + ], + ), + ), + ); + + buildUserInfo(context) => Container( + color: drawerColoPrimary, + //height: deviceSize.height * 0.3, + padding: EdgeInsets.only(bottom: 25.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + ListTile( + onTap: () { + Navigator.of(context).pop(); + }, + leading: Icon( + Icons.arrow_back, + color: Colors.white, + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Good Afternoon!', + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w300, + color: Colors.white, + ), + ), + SizedBox( + width: 5, + ), + Text( + 'MAUSAM'.toUpperCase(), + style: TextStyle( + fontSize: 17.0, + fontWeight: FontWeight.w300, + color: Colors.white, + ), + ), + ], + ), + SizedBox( + height: 15.0, + ), + ProfileImage( + color: Colors.white, + height: 70.0, + width: 70.0, + ), + SizedBox( + height: 15.0, + ), + Text( + 'MAUSAM rayamajhi'.toUpperCase(), + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.w300, + color: Colors.white, + ), + ) + ], + ), + ); + + AppBar buildAppBar() { + return AppBar( + elevation: 0.0, + // centerTitle: true, + title: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Welcome!', + style: TextStyle( + fontSize: 17.0, + fontWeight: FontWeight.w300, + color: Colors.white, + ), + ), + SizedBox( + width: 5, + ), + Text( + 'MAUSAM'.toUpperCase(), + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w300, + color: Colors.white, + ), + ) + ], + ), + actions: [ + IconButton( + icon: Image.asset('assets/nicasiaassets/ic_scan2pay_64_4.png'), + tooltip: 'QR Scan', + onPressed: () {}, + ), + ], + ); + } +} diff --git a/lib/src/nic_asia_clone/pages/login.dart b/lib/src/nic_asia_clone/pages/login.dart new file mode 100644 index 00000000..b89e1218 --- /dev/null +++ b/lib/src/nic_asia_clone/pages/login.dart @@ -0,0 +1,26 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/material.dart'; +import '../util/constant.dart'; +import '../widget/login/login_container.dart'; + +class Login extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + body: LoginContainer(), + backgroundColor: Colors.white, + floatingActionButton: FloatingActionButton( + child: Image.asset( + 'assets/nicasiaassets/nicLogo.png', + color: Colors.white, + ), + backgroundColor: primaryColor, + onPressed: () {}, + ), + ); + } +} diff --git a/lib/src/nic_asia_clone/util/constant.dart b/lib/src/nic_asia_clone/util/constant.dart new file mode 100644 index 00000000..1423ecf9 --- /dev/null +++ b/lib/src/nic_asia_clone/util/constant.dart @@ -0,0 +1,115 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + + +import 'package:flutter/material.dart'; + +const Color primaryColor = Color(0xFFD20910); +const Color primaryColorLight = Color(0xFFED1B2E); +const Color drawerColoPrimary = Color(0xFF88070B); +const Color drawerColoSecondary = Color(0xFFCF0A11); + +final String path = 'assets/nicasiaassets/'; + +final List drawerItems = [ + Draw(title: 'Quick Payment', icon: Icons.photo_camera), + Draw(title: 'Favorite Account', icon: Icons.supervised_user_circle), + Draw(title: 'Invoice History', icon: Icons.receipt), + Draw(title: 'Complain', icon: Icons.speaker_notes), + Draw(title: 'Activity Log', icon: Icons.assessment), + Draw(title: 'Settings', icon: Icons.settings), +]; +final List imageList = [ + {'name': 'el', 'title': 'Electricity'}, + {'name': 'air', 'title': 'Airlines'}, + {'name': 'router', 'title': 'Internet'}, + {'name': 'tv', 'title': 'TV'}, + {'name': 'umb', 'title': 'Insurance'}, + {'name': 'sas', 'title': 'Sasto Tickets'}, + {'name': 'icon_more', 'title': 'Load More'}, +]; + +final List categories = [ + {'image': path + 'ic_username.png', 'title': 'My Account'}, + {'image': path + 'esewa.jpg', 'title': 'Load eSewa'}, + {'image': path + 'ic_payments_64_4.png', 'title': 'Payment'}, + {'image': path + 'ic_transfer_32_4.png', 'title': 'Fund Transfer'}, + {'image': path + 'ic_sch_payment_64_4.png', 'title': 'Schedule Payment'}, + {'image': path + 'ic_scan2pay_64_4.png', 'title': 'Scan To Pay'}, +]; + +final List transactions = [ + Trx( + type: 'cwdr/', + number: '974884/9874513365478965', + amount: '10,000.00', + date: '10-06-2019', + ), + Trx( + type: 'cwdr/', + number: '974884/9874513365478965', + amount: '11,000.00', + date: '10-06-2019', + ), + Trx( + type: 'cwdr/', + number: '974884/9874513365478965', + amount: '12,000.00', + date: '10-06-2019', + ), + Trx( + type: 'cwdr/', + number: '974884/9874513365478965', + amount: '13,000.00', + date: '10-06-2019', + ), + Trx( + type: 'cwdr/', + number: '974884/9874513365478965', + amount: '14,000.00', + date: '10-06-2019', + ), + Trx( + type: 'cwdr/', + number: '974884/9874513365478965', + amount: '15,000.00', + date: '10-06-2019', + ), + Trx( + type: 'cwdr/', + number: '974884/9874513365478965', + amount: '16,000.00', + date: '10-06-2019', + ), + Trx( + type: 'cwdr/', + number: '974884/9874513365478965', + amount: '55,000.00', + date: '10-06-2019', + ), + Trx( + type: 'cwdr/', + number: '974884/9874513365478965', + amount: '15,000.00', + date: '10-06-2019', + ), + Trx( + type: 'cwdr/', + number: '974884/9874513365478965', + amount: '25,000.00', + date: '10-06-2019', + ), +]; + +class Trx { + final String type, number, amount, date; + Trx({this.type, this.amount, this.date, this.number}); +} + +class Draw { + final String title; + final IconData icon; + Draw({this.title, this.icon}); +} diff --git a/lib/src/nic_asia_clone/widget/dashboard/categories.dart b/lib/src/nic_asia_clone/widget/dashboard/categories.dart new file mode 100644 index 00000000..97a9bd3a --- /dev/null +++ b/lib/src/nic_asia_clone/widget/dashboard/categories.dart @@ -0,0 +1,46 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + + +import 'package:flutter/material.dart'; +import '../../util/constant.dart'; +import '../../widget/dashboard/category.dart'; + +import '../heading.dart'; + +class Categories extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + height: 10.0, + ), + Heading( + title: 'would you like to?', + ), + SizedBox( + height: 25.0, + ), + Flexible( + fit: FlexFit.loose, + child: GridView.count( + crossAxisCount: 3, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + // primary: true, + children: categories + .map((item) => Category( + title: item['title'], + image: item['image'], + )) + .toList(), + ), + ), + ], + ); + } +} diff --git a/lib/src/nic_asia_clone/widget/dashboard/category.dart b/lib/src/nic_asia_clone/widget/dashboard/category.dart new file mode 100644 index 00000000..464701c0 --- /dev/null +++ b/lib/src/nic_asia_clone/widget/dashboard/category.dart @@ -0,0 +1,49 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/material.dart'; + +class Category extends StatelessWidget { + final String image, title; + Category({this.title, this.image}); + @override + Widget build(BuildContext context) { + return Card( + margin: EdgeInsets.only(right: 10.0, bottom: 10.0), + child: Container( + height: 140.0, + width: 130.0, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + title != 'Load eSewa' + ? Image.asset( + image, + height: 50.0, + color: Colors.red[900], + ) + : Image.asset( + image, + height: 40.0, + ), + SizedBox( + height: 15.0, + ), + Text( + title, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/src/nic_asia_clone/widget/dashboard/last_transactions.dart b/lib/src/nic_asia_clone/widget/dashboard/last_transactions.dart new file mode 100644 index 00000000..d3dcf761 --- /dev/null +++ b/lib/src/nic_asia_clone/widget/dashboard/last_transactions.dart @@ -0,0 +1,46 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import '../../util/constant.dart'; +import '../../widget/dashboard/transaction.dart'; +import '../../widget/heading.dart'; + +class LastTransactions extends StatelessWidget { + @override + Widget build(BuildContext context) { + Size deviceSize = MediaQuery.of(context).size; + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + height: 10.0, + ), + Heading( + title: 'Last transactions', + ), + SizedBox( + height: 25.0, + ), + Flexible( + child: Container( + // color: Colors.red, + height: deviceSize.height * 0.3, + child: ListView.builder( + shrinkWrap: true, + // physics: NeverScrollableScrollPhysics(), + physics: BouncingScrollPhysics(), + itemCount: transactions.length, + itemBuilder: (context, int index) => Transaction( + transaction: transactions[index], + ), + ), + ), + ), + ], + ); + } +} diff --git a/lib/src/nic_asia_clone/widget/dashboard/top_account_info.dart b/lib/src/nic_asia_clone/widget/dashboard/top_account_info.dart new file mode 100644 index 00000000..7f4172aa --- /dev/null +++ b/lib/src/nic_asia_clone/widget/dashboard/top_account_info.dart @@ -0,0 +1,108 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/material.dart'; +import '../../util/constant.dart'; +import '../../widget/profile_image.dart'; + +class TopAccountInfo extends StatelessWidget { + @override + Widget build(BuildContext context) { + Size deviceSize = MediaQuery.of(context).size; + return Card( + elevation: 3.0, + margin: EdgeInsets.symmetric( + //horizontal: deviceSize.width * 0.03, + vertical: deviceSize.height * 0.02, + ), + child: Container( + alignment: Alignment.center, + height: deviceSize.height * 0.2, + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisSize: MainAxisSize.min, + children: [ + ProfileImage(), + buildAcountDetail, + ], + ), + Container( + height: 8.0, + width: 8.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: primaryColor, + ), + ), + ], + ), + ), + ); + } + + final buildAcountDetail = Container( + padding: EdgeInsets.only( + left: 15.0, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'sammunati bachat khata'.toUpperCase(), + style: TextStyle( + fontSize: 15.0, + color: Colors.black, + fontWeight: FontWeight.w600, + ), + ), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'NPR.', + style: TextStyle( + fontSize: 17.0, + color: primaryColorLight, + fontWeight: FontWeight.w500, + ), + ), + SizedBox( + width: 3.0, + ), + Text( + '1,00,999.35', + style: TextStyle( + fontSize: 20.0, + color: primaryColor, + fontWeight: FontWeight.bold, + ), + ), + SizedBox( + width: 10.0, + ), + Icon( + Icons.remove_red_eye, + color: Colors.teal.shade200, + size: 20.0, + ) + ], + ), + Text( + '281656484161548651', + style: TextStyle( + fontSize: 15.0, + color: Colors.black, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ); +} diff --git a/lib/src/nic_asia_clone/widget/dashboard/transaction.dart b/lib/src/nic_asia_clone/widget/dashboard/transaction.dart new file mode 100644 index 00000000..3ff0133b --- /dev/null +++ b/lib/src/nic_asia_clone/widget/dashboard/transaction.dart @@ -0,0 +1,83 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/material.dart'; +import '../../util/constant.dart'; + +class Transaction extends StatelessWidget { + final Trx transaction; + Transaction({this.transaction}); + + @override + Widget build(BuildContext context) { + print('${transaction.amount}'); + Size deviceSize = MediaQuery.of(context).size; + return Padding( + padding: EdgeInsets.only(bottom: 15.0), + child: Material( + borderRadius: BorderRadius.all(Radius.circular(8.0)), + elevation: 3.0, + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(8.0)), + child: Container( + height: deviceSize.height * 0.10, + padding: EdgeInsets.symmetric(horizontal: 10.0), + decoration: BoxDecoration( + border: Border( + left: BorderSide( + width: 10.0, + color: primaryColor, + ), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + transaction.type.toUpperCase(), + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14.0, + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + transaction.number.toUpperCase(), + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14.0, + ), + ), + Text( + 'NPR. ' + transaction.amount.toUpperCase(), + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14.0, + ), + ), + ], + ), + SizedBox( + height: 5.0, + ), + Text( + transaction.date.toUpperCase(), + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 10.0, + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/src/nic_asia_clone/widget/heading.dart b/lib/src/nic_asia_clone/widget/heading.dart new file mode 100644 index 00000000..5e4b3c2f --- /dev/null +++ b/lib/src/nic_asia_clone/widget/heading.dart @@ -0,0 +1,37 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class Heading extends StatelessWidget { + final String title; + Heading({this.title}); + + @override + Widget build(BuildContext context) { + return Row( + children: [ + Image.asset( + 'assets/nicasiaassets/fill_1_copy.png', + height: 20.0, + ), + SizedBox( + width: 15.0, + ), + Expanded( + child: Text( + title.toUpperCase(), + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.w600, + fontSize: 18.0, + ), + ), + ) + ], + ); + } +} diff --git a/lib/src/nic_asia_clone/widget/login/custome_input.dart b/lib/src/nic_asia_clone/widget/login/custome_input.dart new file mode 100644 index 00000000..ada85a43 --- /dev/null +++ b/lib/src/nic_asia_clone/widget/login/custome_input.dart @@ -0,0 +1,37 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/material.dart'; +import '../../util/constant.dart'; + +class CustomInputField extends StatelessWidget { + final String textHint; + final TextInputType keyboardType; + final bool showInputText; + CustomInputField({ + this.textHint, + this.showInputText = false, + this.keyboardType = TextInputType.text, + }); + @override + Widget build(BuildContext context) { + return TextField( + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + ), + obscureText: showInputText, + keyboardType: keyboardType, + textAlign: TextAlign.center, + decoration: InputDecoration( + contentPadding: EdgeInsets.symmetric(vertical: 15.0), + border: OutlineInputBorder( + borderSide: new BorderSide(color: primaryColor), + ), + hintText: textHint, + ), + ); + } +} diff --git a/lib/src/nic_asia_clone/widget/login/login_container.dart b/lib/src/nic_asia_clone/widget/login/login_container.dart new file mode 100644 index 00000000..43f33a42 --- /dev/null +++ b/lib/src/nic_asia_clone/widget/login/login_container.dart @@ -0,0 +1,77 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/material.dart'; +import '../../widget/login/login_input_sction.dart'; +import '../../widget/login/login_top_section.dart'; + +class LoginContainer extends StatelessWidget { + @override + Widget build(BuildContext context) { + Size deviceSize = MediaQuery.of(context).size; + return SingleChildScrollView( + child: Container( + alignment: Alignment.center, + height: deviceSize.height, + child: Stack( + children: [ + Container( + height: deviceSize.height * 0.53, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + 'assets/nicasiaassets/mountain.png', + ), + fit: BoxFit.fill, + ), + ), + ), + Column( + children: [ + SizedBox(height: 25.0), + buildLogo(deviceSize), + SizedBox( + height: 20.0, + ), + LoginTopSection(), + SizedBox( + height: 30.0, + ), + LoginInputSection() + ], + ) + ], + ), + ), + ); + } + + Row buildLogo(Size deviceSize) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + SizedBox(width: deviceSize.width * 0.4), + Container( + alignment: Alignment.center, + child: Image.asset( + 'assets/nicasiaassets/logo.png', + color: Colors.white, + fit: BoxFit.cover, + ), + ), + SizedBox(width: deviceSize.width * 0.14), + Container( + alignment: Alignment.topRight, + child: Image.asset( + 'assets/nicasiaassets/ic_sms_32.png', + height: 30.0, + color: Colors.white, + fit: BoxFit.cover, + ), + ) + ], + ); + } +} diff --git a/lib/src/nic_asia_clone/widget/login/login_input_sction.dart b/lib/src/nic_asia_clone/widget/login/login_input_sction.dart new file mode 100644 index 00000000..b2d56b53 --- /dev/null +++ b/lib/src/nic_asia_clone/widget/login/login_input_sction.dart @@ -0,0 +1,136 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/material.dart'; +import '../../util/constant.dart'; +import '../../widget/login/custome_input.dart'; + +class LoginInputSection extends StatelessWidget { + @override + Widget build(BuildContext context) { + Size deviceSize = MediaQuery.of(context).size; + return Material( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + elevation: 3.0, + child: Wrap( + children: [ + Container( + //padding: EdgeInsets.symmetric(horizontal: 25.0), + width: deviceSize.width * 0.9, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(5.0)), + ), + child: Column( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 25.0), + child: Column( + children: [ + SizedBox( + height: 25.0, + ), + CustomInputField( + textHint: 'Mobile number', + keyboardType: TextInputType.number, + showInputText: false, + ), + SizedBox( + height: 15.0, + ), + CustomInputField( + textHint: 'Password', + showInputText: true, + ), + ], + ), + ), + SizedBox( + height: 3.0, + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 10.0), + child: Checkbox( + value: false, + onChanged: (bool value) {}, + ), + ), + Text( + 'Remember mobile number', + style: TextStyle( + color: primaryColorLight, + ), + ) + ], + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 25.0), + child: Column( + children: [ + MaterialButton( + color: primaryColorLight, + height: 50.0, + onPressed: () { + Navigator.of(context) + .pushReplacementNamed('/dashboard'); + }, + child: Row( + children: [ + SizedBox(width: deviceSize.width * 0.25), + Text( + 'Log in', + style: TextStyle( + fontSize: 20.0, + color: Colors.white, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(width: deviceSize.width * 0.2), + Image.asset( + 'assets/nicasiaassets/ic_fingerprint.png', + width: 40.0, + ) + ], + ), + ), + SizedBox( + height: 15.0, + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'Reset Device', + style: TextStyle( + color: primaryColor, + ), + ), + Text( + 'Activate Now', + style: TextStyle( + color: primaryColor, + ), + ), + ], + ), + SizedBox( + height: 25.0, + ) + ], + ), + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/src/nic_asia_clone/widget/login/login_top_section.dart b/lib/src/nic_asia_clone/widget/login/login_top_section.dart new file mode 100644 index 00000000..d1053c60 --- /dev/null +++ b/lib/src/nic_asia_clone/widget/login/login_top_section.dart @@ -0,0 +1,66 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import '../../util/constant.dart'; + +class LoginTopSection extends StatelessWidget { + @override + Widget build(BuildContext context) { + Size deviceSize = MediaQuery.of(context).size; + return Container( + margin: EdgeInsets.symmetric( + horizontal: 20.0, + ), + decoration: BoxDecoration( + color: Colors.transparent, + border: Border.all( + width: 2.0, + color: Colors.white, + ), + ), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + SizedBox( + height: 10.0, + ), + Container( + child: Image.asset('assets/nicasiaassets/brand_alternate.png'), + ), + SizedBox( + height: 15.0, + ), + Container( + height: deviceSize.height < 700 + ? deviceSize.height * 0.19 + : deviceSize.height * 0.18, + child: GridView.count( + crossAxisCount: 3, + children: imageList + .map((item) => Column( + children: [ + Image.asset( + '$path${item['name']}.png', + height: 50.0, + ), + SizedBox( + height: 10.0, + ), + Text( + item['title'], + style: TextStyle(color: Colors.white), + ), + ], + )) + .toList(), + ), + ) + ], + ), + ); + } +} diff --git a/lib/src/nic_asia_clone/widget/profile_image.dart b/lib/src/nic_asia_clone/widget/profile_image.dart new file mode 100644 index 00000000..8eadf416 --- /dev/null +++ b/lib/src/nic_asia_clone/widget/profile_image.dart @@ -0,0 +1,33 @@ +/** + * Author: Mausam Rayamajhi + * profile: https://github.com/mausamRayamajhi + */ + +import 'package:flutter/material.dart'; +import '../util/constant.dart'; + +class ProfileImage extends StatelessWidget { + final double height, width; + final Color color; + ProfileImage( + {this.height = 100.0, this.width = 100.0, this.color = primaryColor}); + @override + Widget build(BuildContext context) { + return Container( + width: width, + height: height, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.red, + image: DecorationImage( + image: AssetImage('assets/nicasiaassets/profile.jpg'), + fit: BoxFit.contain, + ), + border: Border.all( + color: color, + width: 3.0, + ), + ), + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index a9dbcfec..c79909a4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -93,6 +93,8 @@ flutter: - lib/src/pages/settings/ - lib/src/pages/travel/ - lib/src/pages/invitation/ + - lib/src/nic_asia_clone/ + - assets/nicasiaassets/ # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see