forked from lohanidamodar/flutter_ui_challenges
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef839e4
commit 050bcd1
Showing
25 changed files
with
1,163 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Author: Mausam Rayamajhi | ||
* profile: https://github.com/mausamRayamajhi | ||
*/ | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'pages/furniture.dart'; | ||
import 'pages/profile.dart'; | ||
|
||
class FurnitureApp extends StatelessWidget { | ||
static final String path = "lib/src/furniture_app/furniture_app.dart"; | ||
@override | ||
Widget build(BuildContext context) { | ||
return MaterialApp( | ||
debugShowCheckedModeBanner: false, | ||
title: 'Flutter Demo', | ||
initialRoute: '/', | ||
routes: <String, WidgetBuilder>{ | ||
'/': (BuildContext context) => SafeArea( | ||
child: SafeArea( | ||
child: Profile(), | ||
), | ||
), | ||
'/furniture': (BuildContext context) => SafeArea( | ||
child: SafeArea( | ||
child: Furniture(), | ||
), | ||
), | ||
}, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import 'package:flutter/widgets.dart'; | ||
|
||
class CustomIcon { | ||
CustomIcon._(); | ||
|
||
static const _icomoon = 'icomoon'; | ||
static const _kFontFam = 'MyFlutterApp'; | ||
|
||
static const IconData truck = const IconData(0xe800, fontFamily: _kFontFam); | ||
static const IconData chat = const IconData(0xe801, fontFamily: _kFontFam); | ||
static const IconData money = const IconData(0xe802, fontFamily: _kFontFam); | ||
static const IconData account_balance_wallet = | ||
const IconData(0xf008, fontFamily: _kFontFam); | ||
|
||
static const IconData wallet = const IconData(0xe910, fontFamily: _icomoon); | ||
static const IconData delivery = const IconData(0xe904, fontFamily: _icomoon); | ||
static const IconData message = const IconData(0xe900, fontFamily: _icomoon); | ||
static const IconData service = const IconData(0xe90f, fontFamily: _icomoon); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import '../utils/constant.dart'; | ||
import '../widgets/furniture/bottomItem.dart'; | ||
import '../widgets/furniture/furniture_category.dart'; | ||
import '../widgets/furniture/item_navigation.dart'; | ||
import '../widgets/furniture/lamp.dart'; | ||
import '../widgets/title_large.dart'; | ||
import '../widgets/title_small.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class Furniture extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
Size deviceSize = MediaQuery.of(context).size; | ||
return Material( | ||
color: Colors.white, | ||
child: SingleChildScrollView( | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: <Widget>[ | ||
Padding( | ||
padding: const EdgeInsets.only( | ||
left: 20.0, | ||
right: 20.0, | ||
top: 20.0, | ||
), | ||
child: TitleLarge( | ||
title: 'Furniture', | ||
icon: Icons.add_shopping_cart, | ||
), | ||
), | ||
buildFurnitureCategories, | ||
Padding( | ||
padding: const EdgeInsets.only( | ||
left: 20.0, | ||
right: 20.0, | ||
), | ||
child: TitleSmall( | ||
subTitle: 'Good quality item', | ||
title: 'Modern', | ||
), | ||
), | ||
SizedBox( | ||
height: 20.0, | ||
), | ||
buildLampsWithSlider(), | ||
Padding( | ||
padding: const EdgeInsets.only(left: 20.0, right: 20.0, top: 10.0), | ||
child: TitleSmall( | ||
subTitle: 'In recent month', | ||
title: 'Popular', | ||
), | ||
), | ||
SizedBox( | ||
height: 15.0, | ||
), | ||
BottomItem(), | ||
const SizedBox(height: 10.0), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
|
||
Container buildLampsWithSlider() { | ||
return Container( | ||
//color: Colors.yellow, | ||
height: 350, | ||
child: Stack( | ||
children: <Widget>[ | ||
buildLamps, | ||
Positioned( | ||
bottom: 40.0, | ||
right: 50.0, | ||
child: ItemNavigation(), | ||
) | ||
], | ||
), | ||
); | ||
} | ||
|
||
final buildLamps = ListView.builder( | ||
scrollDirection: Axis.horizontal, | ||
physics: BouncingScrollPhysics(), | ||
shrinkWrap: true, | ||
itemCount: lampList.length, | ||
itemBuilder: (context, int index) => Lamp( | ||
item: lampList[index], | ||
index: index, | ||
), | ||
); | ||
final buildFurnitureCategories = Container( | ||
height: 100.0, | ||
//color: Colors.red, | ||
child: ListView.builder( | ||
scrollDirection: Axis.horizontal, | ||
itemCount: furnitureCategoriesList.length, | ||
itemBuilder: (context, int index) => FurnitureCategory( | ||
item: furnitureCategoriesList[index], | ||
), | ||
), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import '../widgets/profile/profile_categories.dart'; | ||
import '../widgets/profile/profile_detail.dart'; | ||
import '../widgets/profile/profile_menu.dart'; | ||
import '../widgets/title_large.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class Profile extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Material( | ||
color: Colors.white, | ||
child: Padding( | ||
padding: const EdgeInsets.only( | ||
left: 20.0, | ||
right: 20.0, | ||
top: 30.0, | ||
), | ||
child: Column( | ||
//mainAxisSize: MainAxisSize.max, | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: <Widget>[ | ||
TitleLarge( | ||
title: 'Center', | ||
), | ||
SizedBox( | ||
height: 20.0, | ||
), | ||
ProfileDetail(), | ||
SizedBox( | ||
height: 30.0, | ||
), | ||
ProfileCategories(), | ||
SizedBox( | ||
height: 30.0, | ||
), | ||
Flexible(child: ProfileMenu()), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import '../icon/custome_icon.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
//COLORS | ||
const Color profile_info_background = Color(0xFF3775FD); | ||
const Color profile_info_categories_background = Color(0xFFF6F5F8); | ||
const Color profile_info_address = Color(0xFF8D7AEE); | ||
const Color profile_info_privacy = Color(0xFFF369B7); | ||
const Color profile_info_general = Color(0xFFFFC85B); | ||
const Color profile_info_notification = Color(0xFF5DD1D3); | ||
const Color profile_item_color = Color(0xFFC4C5C9); | ||
const String imagePath = 'assets/image'; | ||
|
||
const String devMausam = 'https://firebasestorage.googleapis.com/v0/b/dl-flutter-ui-challenges.appspot.com/o/mausam%2Fprofile.jpg?alt=media&token=83fa8b83-f53b-489c-a799-ca5d5aceae7b'; | ||
|
||
const Color furnitureCateDisableColor = Color(0xFF939BA9); | ||
const List lampsImage = [ | ||
{'image': 'https://firebasestorage.googleapis.com/v0/b/dl-flutter-ui-challenges.appspot.com/o/mausam%2Fa.jpg?alt=media&token=6af6cfed-84a6-4cf3-a5ce-875fe47f8c5b'}, | ||
{'image': 'https://firebasestorage.googleapis.com/v0/b/dl-flutter-ui-challenges.appspot.com/o/mausam%2Fb.jpg?alt=media&token=801b2f22-94fd-419b-8b84-c9b4fbd45d4d'}, | ||
{'image': 'https://firebasestorage.googleapis.com/v0/b/dl-flutter-ui-challenges.appspot.com/o/mausam%2Fc.jpg?alt=media&token=b4470e0b-411f-4925-acaf-d6cb9292a44e'}, | ||
{'image': 'https://firebasestorage.googleapis.com/v0/b/dl-flutter-ui-challenges.appspot.com/o/mausam%2Fd.jpg?alt=media&token=01ed6f8d-8e1d-403a-a5a0-423b7aa958be'}, | ||
{'image': 'https://firebasestorage.googleapis.com/v0/b/dl-flutter-ui-challenges.appspot.com/o/mausam%2Fe.jpg?alt=media&token=a9342ee6-9dc6-452d-ade7-4a1d7783e7fe'}, | ||
{'image': 'https://firebasestorage.googleapis.com/v0/b/dl-flutter-ui-challenges.appspot.com/o/mausam%2Ff.jpg?alt=media&token=c65c13ad-5b2f-494e-82eb-13d730d823ce'}, | ||
]; | ||
List<ProfileMenu> lampList = [ | ||
ProfileMenu(title: 'Landscape', subTitle: '384'), | ||
ProfileMenu(title: 'Discus Pendant', subTitle: '274'), | ||
ProfileMenu(title: 'Mushroom Lamp', subTitle: '374'), | ||
ProfileMenu(title: 'Titanic Pendant', subTitle: '562'), | ||
ProfileMenu(title: 'Torn Lighting', subTitle: '105'), | ||
ProfileMenu(title: 'Abduction Pendant', subTitle: '365'), | ||
]; | ||
const List profileItems = [ | ||
{'count': '846', 'name': 'Collect'}, | ||
{'count': '51', 'name': 'Attention'}, | ||
{'count': '267', 'name': 'Track'}, | ||
{'count': '39', 'name': 'Coupons'}, | ||
]; | ||
|
||
List<Catg> listProfileCategories = [ | ||
Catg(name: 'Wallet', icon: CustomIcon.account_balance_wallet, number: 0), | ||
Catg(name: 'Delivery', icon: CustomIcon.truck, number: 0), | ||
Catg(name: 'Message', icon: CustomIcon.chat, number: 2), | ||
Catg(name: 'Service', icon: CustomIcon.money, number: 0), | ||
]; | ||
|
||
List<FurnitureCatg> furnitureCategoriesList = [ | ||
FurnitureCatg(icon: Icons.desktop_windows, elivation: true), | ||
FurnitureCatg(icon: CustomIcon.account_balance_wallet, elivation: false), | ||
FurnitureCatg(icon: Icons.security, elivation: false), | ||
FurnitureCatg(icon: CustomIcon.chat, elivation: false), | ||
FurnitureCatg(icon: CustomIcon.money, elivation: false), | ||
]; | ||
|
||
List<ProfileMenu> profileMenuList = [ | ||
ProfileMenu( | ||
title: 'Address', | ||
subTitle: 'Ensure your harvesting address', | ||
iconColor: profile_info_address, | ||
icon: Icons.location_on, | ||
), | ||
ProfileMenu( | ||
title: 'Privacy', | ||
subTitle: 'System permission change', | ||
iconColor: profile_info_privacy, | ||
icon: Icons.lock, | ||
), | ||
ProfileMenu( | ||
title: 'General', | ||
subTitle: 'Basic functional settings', | ||
iconColor: profile_info_general, | ||
icon: Icons.layers, | ||
), | ||
ProfileMenu( | ||
title: 'Notification', | ||
subTitle: 'Take over the news in time', | ||
iconColor: profile_info_notification, | ||
icon: Icons.notifications, | ||
), | ||
]; | ||
|
||
class ProfileMenu { | ||
String title; | ||
String subTitle; | ||
IconData icon; | ||
Color iconColor; | ||
ProfileMenu({this.icon, this.title, this.iconColor, this.subTitle}); | ||
} | ||
|
||
class Catg { | ||
String name; | ||
IconData icon; | ||
int number; | ||
Catg({this.icon, this.name, this.number}); | ||
} | ||
|
||
class FurnitureCatg { | ||
IconData icon; | ||
bool elivation; | ||
FurnitureCatg({this.icon, this.elivation}); | ||
} |
Oops, something went wrong.