backup.
This commit is contained in:
233
lib/widgets/mobile/mobile_navigation_drawer.dart
Normal file
233
lib/widgets/mobile/mobile_navigation_drawer.dart
Normal file
@@ -0,0 +1,233 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
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';
|
||||
|
||||
class MobileNavigationDrawer extends StatefulWidget {
|
||||
const MobileNavigationDrawer({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return MobileNavigationDrawerState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class MobileNavigationDrawerState extends State<MobileNavigationDrawer> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String currentRoute = ModalRoute.of(context).settings.name;
|
||||
|
||||
return Container(
|
||||
width: 300.0,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(color: Colors.black12, blurRadius: 16.0),
|
||||
],
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
MobileNavigationDrawerHeader(),
|
||||
TextLink(
|
||||
S.of(context).home,
|
||||
'/',
|
||||
paddingVertical: 10.0,
|
||||
paddingHorizontal: 15.0,
|
||||
selected: currentRoute == '/',
|
||||
),
|
||||
TextLink(
|
||||
S.of(context).download,
|
||||
'/download',
|
||||
paddingVertical: 10.0,
|
||||
paddingHorizontal: 15.0,
|
||||
selected: currentRoute == '/download',
|
||||
),
|
||||
TextLink(
|
||||
S.of(context).tutorials,
|
||||
'/tutorials',
|
||||
paddingVertical: 10.0,
|
||||
paddingHorizontal: 15.0,
|
||||
selected: currentRoute == '/tutorials',
|
||||
),
|
||||
TextLink(
|
||||
S.of(context).support,
|
||||
'/support',
|
||||
paddingVertical: 10.0,
|
||||
paddingHorizontal: 15.0,
|
||||
selected: currentRoute == '/support',
|
||||
),
|
||||
TextLink(
|
||||
S.of(context).shop,
|
||||
'/shop',
|
||||
paddingVertical: 10.0,
|
||||
paddingHorizontal: 15.0,
|
||||
selected: currentRoute == '/shop',
|
||||
),
|
||||
TextLink(
|
||||
S.of(context).blog,
|
||||
'/blog',
|
||||
paddingVertical: 10.0,
|
||||
paddingHorizontal: 15.0,
|
||||
selected: currentRoute == '/blog',
|
||||
),
|
||||
TextLink(
|
||||
S.of(context).login,
|
||||
'/login',
|
||||
paddingVertical: 10.0,
|
||||
paddingHorizontal: 15.0,
|
||||
selected: currentRoute == '/login',
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20.0),
|
||||
height: 0.5,
|
||||
color: Colors.green,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20.0, bottom: 10.0),
|
||||
child: Text(
|
||||
S.of(context).information,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black54,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextLink(
|
||||
S.of(context).service_policy,
|
||||
'/service_policy',
|
||||
paddingVertical: 5.0,
|
||||
paddingHorizontal: 10.0,
|
||||
),
|
||||
TextLink(
|
||||
S.of(context).return_policy,
|
||||
'/return_policy',
|
||||
paddingVertical: 5.0,
|
||||
paddingHorizontal: 10.0,
|
||||
),
|
||||
TextLink(
|
||||
S.of(context).privacy_policy,
|
||||
'/privacy_policy',
|
||||
paddingVertical: 5.0,
|
||||
paddingHorizontal: 10.0,
|
||||
),
|
||||
TextLink(
|
||||
S.of(context).license_agreement,
|
||||
'/license_agreement',
|
||||
paddingVertical: 5.0,
|
||||
paddingHorizontal: 10.0,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20.0, bottom: 10.0),
|
||||
child: Text(
|
||||
S.of(context).support,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black54,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
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,),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20.0, bottom: 10.0),
|
||||
child: Text(
|
||||
S.of(context).developer_of,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black54,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Wrap(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe800,
|
||||
fontFamily: 'company',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.black26,
|
||||
size: 48.0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe801,
|
||||
fontFamily: 'company',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.black26,
|
||||
size: 48.0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe802,
|
||||
fontFamily: 'company',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.black26,
|
||||
size: 48.0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe803,
|
||||
fontFamily: 'company',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.black26,
|
||||
size: 48.0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe804,
|
||||
fontFamily: 'company',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.black26,
|
||||
size: 48.0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe805,
|
||||
fontFamily: 'company',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.black26,
|
||||
size: 48.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user