diff --git a/.flutter-plugins b/.flutter-plugins
index 1b8fa89..f64e696 100644
--- a/.flutter-plugins
+++ b/.flutter-plugins
@@ -1,8 +1,8 @@
# This is a generated file; do not edit or check into version control.
-path_provider_linux=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_linux-0.0.1+2\\
-path_provider_windows=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_windows-0.0.5\\
-shared_preferences=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\shared_preferences-0.5.12+4\\
-shared_preferences_linux=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\shared_preferences_linux-0.0.2+4\\
-shared_preferences_macos=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\shared_preferences_macos-0.0.1+11\\
-shared_preferences_web=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\shared_preferences_web-0.1.2+7\\
-shared_preferences_windows=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\shared_preferences_windows-0.0.2+3\\
+path_provider_linux=C:\\Users\\Jaivardhan\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_linux-0.0.1+2\\
+path_provider_windows=C:\\Users\\Jaivardhan\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_windows-0.0.5\\
+shared_preferences=C:\\Users\\Jaivardhan\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\shared_preferences-0.5.12+4\\
+shared_preferences_linux=C:\\Users\\Jaivardhan\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\shared_preferences_linux-0.0.2+4\\
+shared_preferences_macos=C:\\Users\\Jaivardhan\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\shared_preferences_macos-0.0.1+11\\
+shared_preferences_web=C:\\Users\\Jaivardhan\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\shared_preferences_web-0.1.2+7\\
+shared_preferences_windows=C:\\Users\\Jaivardhan\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\shared_preferences_windows-0.0.2+3\\
diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies
index fe273d4..c21d2a1 100644
--- a/.flutter-plugins-dependencies
+++ b/.flutter-plugins-dependencies
@@ -1 +1 @@
-{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.12+4\\\\","dependencies":[]}],"android":[{"name":"shared_preferences","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.12+4\\\\","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-0.0.1+11\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-0.0.1+2\\\\","dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_linux-0.0.2+4\\\\","dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-0.0.5\\\\","dependencies":[]},{"name":"shared_preferences_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_windows-0.0.2+3\\\\","dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-0.1.2+7\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2021-06-08 12:45:37.936135","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":"shared_preferences","path":"C:\\\\Users\\\\Jaivardhan\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.12+4\\\\","dependencies":[]}],"android":[{"name":"shared_preferences","path":"C:\\\\Users\\\\Jaivardhan\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.12+4\\\\","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"C:\\\\Users\\\\Jaivardhan\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-0.0.1+11\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\Jaivardhan\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-0.0.1+2\\\\","dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\Users\\\\Jaivardhan\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_linux-0.0.2+4\\\\","dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\Jaivardhan\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-0.0.5\\\\","dependencies":[]},{"name":"shared_preferences_windows","path":"C:\\\\Users\\\\Jaivardhan\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_windows-0.0.2+3\\\\","dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"C:\\\\Users\\\\Jaivardhan\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-0.1.2+7\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2021-07-02 17:57:57.678729","version":"2.2.2"}
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/Store-App.iml b/.idea/Store-App.iml
new file mode 100644
index 0000000..d327551
--- /dev/null
+++ b/.idea/Store-App.iml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml
new file mode 100644
index 0000000..fdbfb9c
--- /dev/null
+++ b/.idea/libraries/Dart_Packages.xml
@@ -0,0 +1,484 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml
new file mode 100644
index 0000000..cc41946
--- /dev/null
+++ b/.idea/libraries/Dart_SDK.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml
new file mode 100644
index 0000000..01a5ae6
--- /dev/null
+++ b/.idea/libraries/Flutter_Plugins.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..f8c5fc9
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..4605ccd
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..797acea
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lib/config/ui_icons.dart b/lib/config/ui_icons.dart
index 8429105..c48622d 100644
--- a/lib/config/ui_icons.dart
+++ b/lib/config/ui_icons.dart
@@ -26,6 +26,7 @@ class UiIcons {
static const IconData home = const IconData(0xe800, fontFamily: _kFontFam);
static const IconData heart = const IconData(0xe801, fontFamily: _kFontFam);
+ static const IconData add = const IconData(0xe801, fontFamily: _kFontFam);
static const IconData facebook_circled = const IconData(0xe802, fontFamily: _kFontFam);
static const IconData twitter_circled = const IconData(0xe803, fontFamily: _kFontFam);
static const IconData trash_1 = const IconData(0xe808, fontFamily: _kFontFam);
diff --git a/lib/route_generator.dart b/lib/route_generator.dart
index 55b6850..702d818 100644
--- a/lib/route_generator.dart
+++ b/lib/route_generator.dart
@@ -1,6 +1,7 @@
import 'src/models/route_argument.dart';
import 'src/screens/brand.dart';
import 'src/screens/brands.dart';
+import 'src/screens/wallet.dart';
import 'src/screens/cart.dart';
import 'src/screens/categories.dart';
import 'src/screens/category.dart';
@@ -56,6 +57,8 @@ class RouteGenerator {
return MaterialPageRoute(
builder: (_) =>
ProductWidget(routeArgument: args as RouteArgument));
+ case '/Wallet':
+ return MaterialPageRoute(builder: (_) => WalletWidget());
// case '/Food':
// return MaterialPageRoute(
// builder: (_) => FoodWidget(
diff --git a/lib/src/screens/product.dart b/lib/src/screens/product.dart
index d824015..92bcd6f 100644
--- a/lib/src/screens/product.dart
+++ b/lib/src/screens/product.dart
@@ -1,3 +1,5 @@
+import 'package:store_app/src/models/user.dart';
+
import '../../config/ui_icons.dart';
import '../models/product.dart';
import '../models/route_argument.dart';
@@ -6,6 +8,7 @@ import '../widgets/ProductDetailsTabWidget.dart';
import '../widgets/ProductHomeTabWidget.dart';
import '../widgets/ReviewsListWidget.dart';
import '../widgets/ShoppingCartButtonWidget.dart';
+import '../screens/messages.dart';
import 'package:flutter/material.dart';
class ProductWidget extends StatefulWidget {
@@ -27,7 +30,7 @@ class _ProductWidgetState extends State
TabController _tabController;
final GlobalKey _scaffoldKey = new GlobalKey();
int _tabIndex = 0;
-
+ User _user = new User.init().getCurrentUser();
@override
void initState() {
_tabController =
@@ -72,6 +75,104 @@ class _ProductWidgetState extends State
onPressed: () {
setState(() {
// this.cartCount += this.quantity;
+ showModalBottomSheet(
+ context: context,
+ builder: (BuildContext context) {
+ return Container(
+ height: 600,
+ color: Colors.white,
+ child: ListView(
+ children: [
+ SizedBox(
+ height: 10,
+ ),
+ Padding(
+ padding: EdgeInsets.fromLTRB(15, 5, 15, 0),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Container(
+ child: Text(
+ 'Add To Wishlist',
+ style: TextStyle(
+ color: Theme.of(context).accentColor,
+ fontSize: 20,
+ fontWeight: FontWeight.bold
+ ),
+ ),
+ ),
+ Container(
+ child: Icon(
+ Icons.add,
+ color: Theme.of(context).accentColor,
+
+ ),
+ )
+ ]
+ ),
+ ),
+ Divider(
+ height: 10,
+ color: Colors.grey[200],
+ ),
+ Padding(
+ padding: EdgeInsets.fromLTRB(15, 5, 15, 0),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Container(
+ child: CircleAvatar(
+ backgroundImage: AssetImage(_user.avatar),
+ ),
+ ),
+ SizedBox(
+ width: 15,
+ ),
+ Expanded(
+ child: Container(
+ child: Text(
+ 'Add To My Wishlist',
+ style: TextStyle(
+ color: Theme.of(context).accentColor,
+ fontSize: 20,
+ fontWeight: FontWeight.bold
+ ),
+ ),
+ ),
+ ),
+ Container(
+ child: Icon(
+ Icons.check,
+ color: Theme.of(context).accentColor,
+
+ ),
+ )
+ ]
+ ),
+ ),
+ Divider(
+ height: 10,
+ color: Colors.grey[200],
+ ),
+ MessagesWidget(),
+ FlatButton(
+ onPressed: (){},
+ padding: EdgeInsets.symmetric(vertical: 14, horizontal: 40),
+ color: Theme.of(context).accentColor,
+ child: Text(
+ 'Add to their WishList',
+ style: TextStyle(
+ color: Theme.of(context).primaryColor,
+ ),
+ ),
+ shape: StadiumBorder(),
+ )
+ ],
+ ),
+
+ );
+ },
+ );
});
},
padding: EdgeInsets.symmetric(vertical: 14),
diff --git a/lib/src/screens/wallet.dart b/lib/src/screens/wallet.dart
new file mode 100644
index 0000000..3a82bad
--- /dev/null
+++ b/lib/src/screens/wallet.dart
@@ -0,0 +1,218 @@
+import 'package:flutter/material.dart';
+import 'package:store_app/config/ui_icons.dart';
+import 'package:store_app/src/widgets/ShoppingCartButtonWidget.dart';
+import 'package:store_app/src/widgets/WalletCardWidget.dart';
+import 'package:store_app/src/widgets/WalletHomeTabWidget.dart';
+import 'package:store_app/src/widgets/WalletTransactionWidget.dart';
+// import '../models/route_argument.dart';
+
+class WalletWidget extends StatefulWidget {
+ @override
+ _WalletWidgetState createState() => _WalletWidgetState();
+}
+
+class _WalletWidgetState extends State with SingleTickerProviderStateMixin{
+ TabController _tabController;
+ final GlobalKey _scaffoldKey = new GlobalKey();
+ int _tabIndex = 0;
+
+ @override
+ void initState() {
+ _tabController =
+ TabController(length: 3, initialIndex: _tabIndex, vsync: this);
+ _tabController.addListener(_handleTabSelection);
+ super.initState();
+ }
+
+ void dispose() {
+ _tabController.dispose();
+ super.dispose();
+ }
+
+ _handleTabSelection() {
+ if (_tabController.indexIsChanging) {
+ setState(() {
+ _tabIndex = _tabController.index;
+ });
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return DefaultTabController(
+ initialIndex: 1,
+ length: 3,
+ child: Scaffold(
+ appBar: AppBar(
+ automaticallyImplyLeading: false,
+ leading: new IconButton(
+ icon:
+ new Icon(UiIcons.return_icon, color: Theme.of(context).hintColor),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ backgroundColor: Colors.transparent,
+ elevation: 0,
+ title: Text(
+ 'Wallet',
+ style: Theme.of(context).textTheme.display1,
+ ),
+ actions: [
+ // new ShoppingCartButtonWidget(
+ // iconColor: Theme.of(context).hintColor,
+ // labelColor: Theme.of(context).accentColor),
+ Container(
+ width: 30,
+ height: 30,
+ margin: EdgeInsets.only(top: 12.5, bottom: 12.5, right: 20),
+ child: InkWell(
+ borderRadius: BorderRadius.circular(300),
+ onTap: () {
+ Navigator.of(context).pushNamed('/Tabs', arguments: 1);
+ },
+ child: CircleAvatar(
+ backgroundImage: AssetImage('img/user2.jpg'),
+ ),
+ )),
+ ],
+ bottom: TabBar(
+ controller: _tabController,
+ isScrollable: true,
+ indicatorSize: TabBarIndicatorSize.label ,
+ labelColor: Theme.of(context).hintColor,
+ tabs: [
+ Tab(
+ child: Container(
+ padding: EdgeInsets.symmetric(horizontal: 5),
+ child: Align(
+ alignment: Alignment.center,
+ child: Text(
+ "Wallet",
+ style: Theme.of(context).textTheme.title,
+ ),
+ ),
+ ),
+ ),
+ Tab(
+ child: Container(
+ padding: EdgeInsets.symmetric(horizontal: 5),
+ child: Align(
+ alignment: Alignment.center,
+ child: Text(
+ "Transactions",
+ style: Theme.of(context).textTheme.title,
+ ),
+ ),
+ ),
+ ),
+ Tab(
+ child: Container(
+ padding: EdgeInsets.symmetric(horizontal: 5),
+ child: Align(
+ alignment: Alignment.center,
+ child: Text(
+ "Cards",
+ style: Theme.of(context).textTheme.title,
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ bottomNavigationBar: BottomNavigationBar(
+ type: BottomNavigationBarType.fixed,
+ // selectedItemColor: Theme.of(context).accentColor,
+ selectedFontSize: 0,
+ unselectedFontSize: 0,
+ iconSize: 22,
+ elevation: 0,
+ backgroundColor: Colors.transparent,
+ // selectedIconTheme: IconThemeData(size: 25),
+ unselectedItemColor: Theme.of(context).hintColor.withOpacity(1),
+ // currentIndex: widget.selectedTab,
+ onTap: (int i) {
+ Navigator.of(context).pushNamed('/Tabs', arguments: i);
+ },
+ // this will be set when a new tab is tapped
+ items: [
+ BottomNavigationBarItem(
+ icon: Icon(UiIcons.bell),
+ title: new Container(height: 0.0),
+ ),
+ BottomNavigationBarItem(
+ icon: Icon(UiIcons.user_1),
+ title: new Container(height: 0.0),
+ ),
+ BottomNavigationBarItem(
+ title: new Container(height: 5.0),
+ icon: Container(
+ width: 45,
+ height: 45,
+ decoration: BoxDecoration(
+ color: Theme.of(context).accentColor,
+ borderRadius: BorderRadius.all(
+ Radius.circular(50),
+ ),
+ boxShadow: [
+ BoxShadow(
+ color: Theme.of(context).accentColor.withOpacity(0.4),
+ blurRadius: 40,
+ offset: Offset(0, 15)),
+ BoxShadow(
+ color: Theme.of(context).accentColor.withOpacity(0.4),
+ blurRadius: 13,
+ offset: Offset(0, 3))
+ ],
+ ),
+ child: new Icon(UiIcons.home,
+ color: Theme.of(context).primaryColor),
+ )),
+ BottomNavigationBarItem(
+ icon: new Icon(UiIcons.chat),
+ title: new Container(height: 0.0),
+ ),
+ BottomNavigationBarItem(
+ icon: new Icon(UiIcons.heart),
+ title: new Container(height: 0.0),
+ ),
+ ],
+ ),
+ body: CustomScrollView(
+ slivers: [
+ SliverList(
+ delegate: SliverChildListDelegate([
+ Offstage(
+ offstage: 0 != _tabIndex,
+ child: Column(
+ children: [
+ WalletHomeTabWidget()
+ ],
+ ),
+ ),
+ Offstage(
+ offstage: 1 != _tabIndex,
+ child: Column(
+ children: [
+ WalletTransactionWidget(),
+ ],
+ ),
+ ),
+ Offstage(
+ offstage: 2 != _tabIndex,
+ child: Column(
+ children: [
+ WalletCardWidget(),
+ ],
+ ),
+ ),
+ ]
+ ),
+ )
+ ],
+ )
+
+ ),
+ );
+ }
+}
+
diff --git a/lib/src/widgets/DrawerWidget.dart b/lib/src/widgets/DrawerWidget.dart
index 4a1e888..36446b1 100644
--- a/lib/src/widgets/DrawerWidget.dart
+++ b/lib/src/widgets/DrawerWidget.dart
@@ -95,6 +95,19 @@ class DrawerWidget extends StatelessWidget {
style: Theme.of(context).textTheme.subhead,
),
),
+ ListTile(
+ onTap: () {
+ Navigator.of(context).pushNamed('/Wallet');
+ },
+ leading: Icon(
+ UiIcons.money,
+ color: Theme.of(context).focusColor.withOpacity(1),
+ ),
+ title: Text(
+ "Wallet",
+ style: Theme.of(context).textTheme.subhead,
+ ),
+ ),
ListTile(
dense: true,
title: Text(
diff --git a/lib/src/widgets/WalletCardWidget.dart b/lib/src/widgets/WalletCardWidget.dart
new file mode 100644
index 0000000..340b6c1
--- /dev/null
+++ b/lib/src/widgets/WalletCardWidget.dart
@@ -0,0 +1,231 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import '../widgets/CreditCardsWidget.dart';
+
+class WalletCardWidget extends StatefulWidget {
+
+ @override
+ _WalletCardWidgetState createState() => _WalletCardWidgetState();
+}
+
+class _WalletCardWidgetState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ SizedBox(height: 20.0,),
+ CreditCardsWidget(),
+ SizedBox(height: 20.0,),
+ Padding(
+ padding: EdgeInsets.symmetric(horizontal: 20),
+ child: Align(
+ alignment: Alignment.topLeft,
+ child: Text(
+ 'Card History',
+ style: Theme.of(context).textTheme.display3,
+ ),
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.symmetric(horizontal: 20),
+ decoration: BoxDecoration(
+ // color: Theme.of(context).primaryColor,
+ borderRadius: BorderRadius.circular(6),
+
+ ),
+ child: Row(
+ children: [
+ Expanded(
+ flex: 1,
+ child: Container(
+ color: Colors.grey[200],
+ padding: EdgeInsets.symmetric(vertical: 10, horizontal: 0),
+ child: Column(
+ children: [
+ Icon(
+ Icons.add,
+ color: Theme.of(context).accentColor,
+ size: 30,
+ ),
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 3,
+ child: Container(
+ padding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
+ child: Column(
+ children: [
+ Align(
+ alignment: Alignment.topLeft,
+ child: Text(
+ 'Added Money',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ ),
+ Align(
+ alignment: Alignment.topLeft,
+ child: Text(
+ '14/4/21',
+ style: Theme.of(context).textTheme.overline,
+ ),
+ )
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 2,
+ child: Container(
+ padding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
+ child: Column(
+ children: [
+ Text(
+ '\$ 2000',
+ style: Theme.of(context).textTheme.subtitle1,
+ )
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.symmetric(horizontal: 20),
+ decoration: BoxDecoration(
+ // color: Theme.of(context).primaryColor,
+ borderRadius: BorderRadius.circular(6),
+
+ ),
+ child: Row(
+ children: [
+ Expanded(
+ flex: 1,
+ child: Container(
+ color: Colors.grey[200],
+ padding: EdgeInsets.symmetric(vertical: 10, horizontal: 0),
+ child: Column(
+ children: [
+ Icon(
+ Icons.shopping_bag,
+ color: Theme.of(context).accentColor,
+ size: 30,
+ ),
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 3,
+ child: Container(
+ padding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
+ child: Column(
+ children: [
+ Align(
+ alignment: Alignment.topLeft,
+ child: Text(
+ 'Added Money',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ ),
+ Align(
+ alignment: Alignment.topLeft,
+ child: Text(
+ '12/4/21',
+ style: Theme.of(context).textTheme.overline,
+ ),
+ )
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 2,
+ child: Container(
+ padding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
+ child: Column(
+ children: [
+ Text(
+ '\$ 100',
+ style: Theme.of(context).textTheme.subtitle1,
+ )
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.symmetric(horizontal: 20),
+ decoration: BoxDecoration(
+ // color: Theme.of(context).primaryColor,
+ borderRadius: BorderRadius.circular(6),
+
+ ),
+ child: Row(
+ children: [
+ Expanded(
+ flex: 1,
+ child: Container(
+ color: Colors.grey[200],
+ padding: EdgeInsets.symmetric(vertical: 10, horizontal: 0),
+ child: Column(
+ children: [
+ Icon(
+ Icons.shopping_bag,
+ color: Theme.of(context).accentColor,
+ size: 30,
+ ),
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 3,
+ child: Container(
+ padding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
+ child: Column(
+ children: [
+ Align(
+ alignment: Alignment.topLeft,
+ child: Text(
+ 'Ordered',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ ),
+ Align(
+ alignment: Alignment.topLeft,
+ child: Text(
+ '11/4/21',
+ style: Theme.of(context).textTheme.overline,
+ ),
+ )
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 2,
+ child: Container(
+ padding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
+ child: Column(
+ children: [
+ Text(
+ '\$ 300',
+ style: Theme.of(context).textTheme.subtitle1,
+ )
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/src/widgets/WalletHomeTabWidget.dart b/lib/src/widgets/WalletHomeTabWidget.dart
new file mode 100644
index 0000000..3c66cfb
--- /dev/null
+++ b/lib/src/widgets/WalletHomeTabWidget.dart
@@ -0,0 +1,146 @@
+import 'package:flutter/material.dart';
+import 'package:store_app/config/ui_icons.dart';
+import 'package:syncfusion_flutter_charts/charts.dart';
+
+class WalletHomeTabWidget extends StatefulWidget {
+ @override
+ _WalletHomeTabWidgetState createState() => _WalletHomeTabWidgetState();
+}
+
+class _WalletHomeTabWidgetState extends State {
+ List _chartData;
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ _chartData = getpieData();
+ super.initState();
+ }
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ children: [
+ Container(
+ height: 200,
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 10),
+ child: SfCircularChart(
+ legend: Legend(
+ isVisible: true,
+ overflowMode: LegendItemOverflowMode.wrap
+ ),
+ title: ChartTitle(text: 'Total 1200', textStyle: TextStyle(color: Theme.of(context).accentColor, fontWeight: FontWeight.bold) ),
+ series: [
+ PieSeries(
+ dataSource: _chartData,
+ xValueMapper: (pieData data, _) => data.label,
+ yValueMapper: (pieData data, _) => data.point,
+ )
+ ],
+ ),
+ ),
+ ),
+ Container(
+ padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
+ decoration: BoxDecoration(
+ color: Theme.of(context).primaryColor.withOpacity(0.9),
+ boxShadow: [
+ BoxShadow(
+ color: Theme.of(context).focusColor.withOpacity(0.15),
+ blurRadius: 5,
+ offset: Offset(0, -2)),
+ ],
+ ),
+ child: Row(
+ children: [
+ Expanded(
+ child: FlatButton(
+ onPressed: () {
+ setState(() {});
+ },
+ padding: EdgeInsets.symmetric(vertical: 14),
+ color: Theme.of(context).accentColor,
+ shape: StadiumBorder(),
+ child: Padding(
+ padding: EdgeInsets.symmetric(horizontal: 20.0),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Icon(
+ Icons.add,
+ color: Theme.of(context).primaryColor,
+ ),
+ Text(
+ 'Add Money',
+ style: TextStyle(color: Theme.of(context).primaryColor),
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
+ SizedBox(width: 10),
+ Expanded(
+ child: FlatButton(
+ onPressed: () {
+ setState(() {});
+ },
+ padding: EdgeInsets.symmetric(vertical: 14),
+ color: Theme.of(context).accentColor,
+ shape: StadiumBorder(),
+ child: Padding(
+ padding: EdgeInsets.symmetric(horizontal: 20.0),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Icon(
+ Icons.redo_sharp,
+ color: Theme.of(context).primaryColor,
+ ),
+ Text(
+ 'Share Points',
+ style: TextStyle(color: Theme.of(context).primaryColor),
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
+ SizedBox(width: 10.0),
+ ],
+ ),
+ ),
+ Padding(
+ padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 30.0),
+ child: Align(
+ alignment: Alignment.topLeft,
+ child: Text(
+ 'March 2021',
+ style: TextStyle(
+ color: Theme.of(context).accentColor,
+ fontStyle: FontStyle.italic,
+ fontSize:15
+ ),
+ ),
+ ),
+ )
+ ],
+ );
+ }
+ List getpieData() {
+ final List chartData =[
+ pieData('Redeemable : 200', 200),
+ pieData('Non-Redeemable : 1000', 1000),
+ ];
+ return chartData;
+ }
+
+
+}
+
+class pieData{
+ pieData(this.label, this.point);
+ final String label;
+ final int point;
+}
+
diff --git a/lib/src/widgets/WalletTransactionWidget.dart b/lib/src/widgets/WalletTransactionWidget.dart
new file mode 100644
index 0000000..198c206
--- /dev/null
+++ b/lib/src/widgets/WalletTransactionWidget.dart
@@ -0,0 +1,52 @@
+import 'package:flutter/material.dart';
+import 'package:syncfusion_flutter_charts/charts.dart';
+
+class WalletTransactionWidget extends StatefulWidget {
+
+ @override
+ _WalletTransactionWidgetState createState() => _WalletTransactionWidgetState();
+}
+
+class _WalletTransactionWidgetState extends State {
+ List _chartData;
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ _chartData = getpieData();
+ super.initState();
+ }
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ children: [
+ SfCircularChart(
+ series: [
+ PieSeries(
+ dataSource: _chartData,
+ xValueMapper: (pieData data, _) => data.label,
+ yValueMapper: (pieData data, _) => data.point,
+ )
+ ],
+ ),
+ ],
+ );
+ }
+
+ List getpieData() {
+ final List chartData =[
+ pieData('Redeemable', 200),
+ pieData('Non-Redeemable', 1000),
+ ];
+ return chartData;
+ }
+}
+
+class pieData{
+ pieData(this.label, this.point);
+ final String label;
+ final int point;
+}
+
+
+
diff --git a/pubspec.yaml b/pubspec.yaml
index 8217b3f..21f3b21 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -38,6 +38,7 @@ dependencies:
flutter_staggered_grid_view: ^0.4.0
sticky_headers: ^0.2.0
datetime_picker_formfield: ^2.0.0
+ syncfusion_flutter_charts: ^19.1.67
dev_dependencies:
flutter_test: