backup.
This commit is contained in:
61
lib/widgets/mobile/mobile_download_apps.dart
Normal file
61
lib/widgets/mobile/mobile_download_apps.dart
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/widgets/general/download_item.dart';
|
||||
import '../../store/store.dart';
|
||||
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
|
||||
|
||||
class MobileDownloadApps extends StatefulWidget {
|
||||
final Map<String, dynamic> data;
|
||||
|
||||
MobileDownloadApps(this.data, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return MobileDownloadAppsState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class MobileDownloadAppsState extends State<MobileDownloadApps> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (widget.data == null) {
|
||||
return Container();
|
||||
}
|
||||
Column col = Column(
|
||||
children: [
|
||||
Container(
|
||||
child: Util.showImage(
|
||||
'https:${widget.data['download-image']['image']}'
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
List<Widget> apps = _getApps();
|
||||
for (int i = 0; i < apps.length; i++) {
|
||||
col.children.add(apps[i]);
|
||||
}
|
||||
return col;
|
||||
}
|
||||
|
||||
List<Widget> _getApps() {
|
||||
List<Widget> apps = [];
|
||||
for (int i = 0; i < (widget.data['apps'] as List).length; i++) {
|
||||
apps.add(DownloadItem((widget.data['apps'] as List)[i], width: MediaQuery.of(context).size.width,));
|
||||
if (i + 1 < (widget.data['apps'] as List).length) {
|
||||
apps.add(Container(
|
||||
padding: EdgeInsets.only(top: 10.0, bottom: 5.0),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
width: 0.5,
|
||||
color: Colors.black38,
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
return apps;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/generated/l10n.dart';
|
||||
import '../../generated/l10n.dart';
|
||||
import '../../widgets/general/text_link.dart';
|
||||
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
|
||||
|
||||
class MobileIndexMainContent2 extends StatefulWidget {
|
||||
@@ -97,16 +98,11 @@ class MobileIndexMainContent2State extends State<MobileIndexMainContent2> {
|
||||
));
|
||||
}
|
||||
col.children.add(
|
||||
GestureDetector(
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 0.0),
|
||||
child: Text(
|
||||
S.of(context).learn_more,
|
||||
style: TextStyle(
|
||||
color: Colors.blue,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.centerRight,
|
||||
child: TextLink(
|
||||
S.of(context).learn_more,
|
||||
'/minipos-learn-more',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/generated/l10n.dart';
|
||||
import '../../generated/l10n.dart';
|
||||
import '../../widgets/general/text_link.dart';
|
||||
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
|
||||
|
||||
class MobileIndexMainContent3 extends StatefulWidget {
|
||||
@@ -100,16 +101,11 @@ class MobileIndexMainContent3State extends State<MobileIndexMainContent3> {
|
||||
));
|
||||
}
|
||||
col.children.add(
|
||||
GestureDetector(
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 0.0),
|
||||
child: Text(
|
||||
S.of(context).learn_more,
|
||||
style: TextStyle(
|
||||
color: Colors.blue,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.centerRight,
|
||||
child: TextLink(
|
||||
S.of(context).learn_more,
|
||||
'/igoshow-learn-more',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -8,11 +8,12 @@ class MobileNavigationDrawerHeader extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 40.0,
|
||||
padding: EdgeInsets.only(top: 10.0),
|
||||
height: kToolbarHeight + 30.0,
|
||||
padding: EdgeInsets.only(top: 16.0, bottom: 16.0),
|
||||
color: Colors.green,
|
||||
alignment: Alignment.center,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
S.of(context).navigation,
|
||||
|
||||
@@ -4,8 +4,12 @@ import 'package:flutter_wisetronic/events/eventbus.dart';
|
||||
import 'package:flutter_wisetronic/events/events.dart';
|
||||
import 'package:flutter_wisetronic/widgets/general/navigationbar_logo.dart';
|
||||
|
||||
import '../../routes.dart';
|
||||
|
||||
class MobileNavigationBar extends StatefulWidget {
|
||||
const MobileNavigationBar({Key key}) : super(key: key);
|
||||
final String title;
|
||||
final bool back;
|
||||
const MobileNavigationBar({Key key, this.title, this.back}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
@@ -18,57 +22,43 @@ class MobileNavigationBarState extends State<MobileNavigationBar> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.only(left: 10.0, right: 10.0),
|
||||
height: 80.0,
|
||||
color: Colors.blue,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.menu),
|
||||
onPressed: () {
|
||||
eventBus.fire(OpenDrawer());
|
||||
},
|
||||
),
|
||||
Container(
|
||||
child: NavigationBarLogo(),
|
||||
padding: EdgeInsets.only(left: 10.0, right: 10.0, top: 5.0, bottom: 5.0),
|
||||
),
|
||||
Container()
|
||||
],
|
||||
return AppBar(
|
||||
leading: widget.back ?
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.arrow_back_ios,
|
||||
color: Colors.white,
|
||||
),
|
||||
onPressed: () {
|
||||
Routes.router.pop(context);
|
||||
},
|
||||
) :
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.menu,
|
||||
color: Colors.white,
|
||||
),
|
||||
onPressed: () {
|
||||
eventBus.fire(OpenDrawer());
|
||||
},
|
||||
),
|
||||
title: Container(
|
||||
child: widget.title.isNotEmpty ?
|
||||
Container(
|
||||
child: Text(
|
||||
'${widget.title}',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
) :
|
||||
NavigationBarLogo(),
|
||||
padding: EdgeInsets.only(left: 10.0, right: 10.0, top: 5.0, bottom: 5.0),
|
||||
),
|
||||
centerTitle: true,
|
||||
);
|
||||
// return Stack(
|
||||
// children: [
|
||||
// Container(
|
||||
// height: 80.0,
|
||||
// color: Colors.blue,
|
||||
// ),
|
||||
// Container(
|
||||
// padding: EdgeInsets.only(left: 10.0, right: 10.0),
|
||||
// height: 80.0,
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// IconButton(
|
||||
// icon: Icon(Icons.menu),
|
||||
// onPressed: () {
|
||||
//
|
||||
// },
|
||||
// ),
|
||||
// Container(
|
||||
// child: NavigationBarLogo(),
|
||||
// padding: EdgeInsets.only(left: 10.0, right: 10.0, top: 5.0, bottom: 5.0),
|
||||
// ),
|
||||
// Container()
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user