This commit is contained in:
2020-12-28 00:19:04 -05:00
parent 86c845b49b
commit c378a6203c
33 changed files with 833 additions and 200 deletions

View File

@@ -4,6 +4,8 @@ import 'package:flutter_wisetronic/generated/l10n.dart';
import 'package:flutter_wisetronic/widgets/general/text_link.dart';
import 'package:flutter_wisetronic/widgets/mobile/mobile_navigation_drawer_header.dart';
import '../../constants.dart';
class MobileNavigationDrawer extends StatefulWidget {
const MobileNavigationDrawer({Key key}) : super(key: key);
@@ -20,7 +22,7 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
String currentRoute = ModalRoute.of(context).settings.name;
return Container(
width: 300.0,
width: 200.0,
height: MediaQuery.of(context).size.height,
decoration: BoxDecoration(
color: Colors.white,
@@ -38,6 +40,8 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
paddingVertical: 10.0,
paddingHorizontal: 15.0,
selected: currentRoute == '/',
closeDrawer: true,
clearStack: true,
),
TextLink(
S.of(context).download,
@@ -45,6 +49,7 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
paddingVertical: 10.0,
paddingHorizontal: 15.0,
selected: currentRoute == '/download',
closeDrawer: true,
),
TextLink(
S.of(context).tutorials,
@@ -52,6 +57,7 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
paddingVertical: 10.0,
paddingHorizontal: 15.0,
selected: currentRoute == '/tutorials',
closeDrawer: true,
),
TextLink(
S.of(context).support,
@@ -59,6 +65,7 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
paddingVertical: 10.0,
paddingHorizontal: 15.0,
selected: currentRoute == '/support',
closeDrawer: true,
),
TextLink(
S.of(context).shop,
@@ -66,6 +73,7 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
paddingVertical: 10.0,
paddingHorizontal: 15.0,
selected: currentRoute == '/shop',
closeDrawer: true,
),
TextLink(
S.of(context).blog,
@@ -73,6 +81,7 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
paddingVertical: 10.0,
paddingHorizontal: 15.0,
selected: currentRoute == '/blog',
closeDrawer: true,
),
TextLink(
S.of(context).login,
@@ -80,6 +89,7 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
paddingVertical: 10.0,
paddingHorizontal: 15.0,
selected: currentRoute == '/login',
closeDrawer: true,
),
Container(
margin: EdgeInsets.only(top: 20.0),
@@ -102,24 +112,28 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
'/service_policy',
paddingVertical: 5.0,
paddingHorizontal: 10.0,
closeDrawer: true,
),
TextLink(
S.of(context).return_policy,
'/return_policy',
paddingVertical: 5.0,
paddingHorizontal: 10.0,
closeDrawer: true,
),
TextLink(
S.of(context).privacy_policy,
'/privacy_policy',
paddingVertical: 5.0,
paddingHorizontal: 10.0,
closeDrawer: true,
),
TextLink(
S.of(context).license_agreement,
'/license_agreement',
paddingVertical: 5.0,
paddingHorizontal: 10.0,
closeDrawer: true,
),
Container(
margin: EdgeInsets.only(top: 20.0, bottom: 10.0),
@@ -132,11 +146,11 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
),
),
),
TextLink(S.of(context).wiki, '/wiki', paddingVertical: 5.0, paddingHorizontal: 10.0,),
TextLink(S.of(context).support_ticket, '/support_ticket', paddingVertical: 5.0, paddingHorizontal: 10.0,),
TextLink(S.of(context).contact_us, '/contact_us', paddingVertical: 5.0, paddingHorizontal: 10.0,),
TextLink(S.of(context).about_us, '/about_us', paddingVertical: 5.0, paddingHorizontal: 10.0,),
TextLink(S.of(context).renew_license, '/renew_license', paddingVertical: 5.0, paddingHorizontal: 10.0,),
TextLink(S.of(context).wiki, '/wiki', paddingVertical: 5.0, paddingHorizontal: 10.0, closeDrawer: true,),
TextLink(S.of(context).support_ticket, '/support_ticket', paddingVertical: 5.0, paddingHorizontal: 10.0, closeDrawer: true,),
TextLink(S.of(context).contact_us, '/contact_us', paddingVertical: 5.0, paddingHorizontal: 10.0, closeDrawer: true,),
TextLink(S.of(context).about_us, '/about_us', paddingVertical: 5.0, paddingHorizontal: 10.0, closeDrawer: true,),
TextLink(S.of(context).renew_license, '/renew_license', paddingVertical: 5.0, paddingHorizontal: 10.0, closeDrawer: true,),
Container(
margin: EdgeInsets.only(top: 20.0, bottom: 10.0),
child: Text(
@@ -154,8 +168,8 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
padding: EdgeInsets.all(10.0),
child: Icon(
IconData(
0xe800,
fontFamily: 'company',
Constants.FONT_GOOGLE,
fontFamily: 'wisetronic',
fontPackage: null
),
color: Colors.black26,
@@ -166,8 +180,8 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
padding: EdgeInsets.all(10.0),
child: Icon(
IconData(
0xe801,
fontFamily: 'company',
Constants.FONT_ALEXA,
fontFamily: 'wisetronic',
fontPackage: null
),
color: Colors.black26,
@@ -178,8 +192,8 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
padding: EdgeInsets.all(10.0),
child: Icon(
IconData(
0xe802,
fontFamily: 'company',
Constants.FONT_APPLE,
fontFamily: 'wisetronic',
fontPackage: null
),
color: Colors.black26,
@@ -190,8 +204,8 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
padding: EdgeInsets.all(10.0),
child: Icon(
IconData(
0xe803,
fontFamily: 'company',
Constants.FONT_EBAY,
fontFamily: 'wisetronic',
fontPackage: null
),
color: Colors.black26,
@@ -202,8 +216,8 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
padding: EdgeInsets.all(10.0),
child: Icon(
IconData(
0xe804,
fontFamily: 'company',
Constants.FONT_QUICKBOOKS,
fontFamily: 'wisetronic',
fontPackage: null
),
color: Colors.black26,
@@ -214,8 +228,8 @@ class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
padding: EdgeInsets.all(10.0),
child: Icon(
IconData(
0xe805,
fontFamily: 'company',
Constants.FONT_SHOPIFY,
fontFamily: 'wisetronic',
fontPackage: null
),
color: Colors.black26,