backup.
This commit is contained in:
76
lib/widgets/desktop/desktop_download_apps.dart
Normal file
76
lib/widgets/desktop/desktop_download_apps.dart
Normal file
@@ -0,0 +1,76 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../widgets/general/download_item.dart';
|
||||
import '../../store/store.dart';
|
||||
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
|
||||
|
||||
class DesktopDownloadApps extends StatefulWidget {
|
||||
final Map<String, dynamic> data;
|
||||
|
||||
DesktopDownloadApps(this.data, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return DesktopDownloadAppsState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class DesktopDownloadAppsState extends State<DesktopDownloadApps> {
|
||||
double sideSpace = 0;
|
||||
double mainSpace = 1200;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (widget.data == null) {
|
||||
return Container();
|
||||
}
|
||||
if (MediaQuery.of(context).size.width <= 1200) {
|
||||
mainSpace = MediaQuery.of(context).size.width;
|
||||
sideSpace = 0;
|
||||
} else {
|
||||
mainSpace = 1200;
|
||||
sideSpace = (MediaQuery.of(context).size.width - 1200) / 2;
|
||||
}
|
||||
Column col = Column(
|
||||
children: [
|
||||
Util.showImage(
|
||||
'https:${widget.data['download-image']['image']}'
|
||||
),
|
||||
],
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
);
|
||||
List<Widget> apps = _getApps();
|
||||
Wrap wrap = Wrap(
|
||||
children: [],
|
||||
);
|
||||
for (int i = 0; i < apps.length; i++) {
|
||||
wrap.children.add(apps[i]);
|
||||
}
|
||||
col.children.add(wrap);
|
||||
return Row(
|
||||
children: [
|
||||
Container(
|
||||
width: sideSpace,
|
||||
),
|
||||
Container(
|
||||
width: mainSpace,
|
||||
child: col,
|
||||
),
|
||||
Container(
|
||||
width: sideSpace,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
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: mainSpace / 2.0,));
|
||||
}
|
||||
return apps;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/generated/l10n.dart';
|
||||
import 'package:flutter_wisetronic/widgets/general/text_link.dart';
|
||||
|
||||
import '../../constants.dart';
|
||||
|
||||
class DesktopIndexMainContent3 extends StatefulWidget {
|
||||
final Map<String, dynamic> content;
|
||||
const DesktopIndexMainContent3(this.content, {Key key}) : super(key: key);
|
||||
@@ -100,8 +102,8 @@ class DesktopIndexMainContent3State extends State<DesktopIndexMainContent3> {
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe800,
|
||||
fontFamily: 'company',
|
||||
Constants.FONT_GOOGLE,
|
||||
fontFamily: 'wisetronic',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.white24,
|
||||
@@ -112,8 +114,8 @@ class DesktopIndexMainContent3State extends State<DesktopIndexMainContent3> {
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe801,
|
||||
fontFamily: 'company',
|
||||
Constants.FONT_ALEXA,
|
||||
fontFamily: 'wisetronic',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.white24,
|
||||
@@ -124,8 +126,8 @@ class DesktopIndexMainContent3State extends State<DesktopIndexMainContent3> {
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe802,
|
||||
fontFamily: 'company',
|
||||
Constants.FONT_APPLE,
|
||||
fontFamily: 'wisetronic',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.white24,
|
||||
@@ -136,8 +138,8 @@ class DesktopIndexMainContent3State extends State<DesktopIndexMainContent3> {
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe803,
|
||||
fontFamily: 'company',
|
||||
Constants.FONT_EBAY,
|
||||
fontFamily: 'wisetronic',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.white24,
|
||||
@@ -148,8 +150,8 @@ class DesktopIndexMainContent3State extends State<DesktopIndexMainContent3> {
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe804,
|
||||
fontFamily: 'company',
|
||||
Constants.FONT_QUICKBOOKS,
|
||||
fontFamily: 'wisetronic',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.white24,
|
||||
@@ -160,8 +162,8 @@ class DesktopIndexMainContent3State extends State<DesktopIndexMainContent3> {
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Icon(
|
||||
IconData(
|
||||
0xe805,
|
||||
fontFamily: 'company',
|
||||
Constants.FONT_SHOPIFY,
|
||||
fontFamily: 'wisetronic',
|
||||
fontPackage: null
|
||||
),
|
||||
color: Colors.white24,
|
||||
|
||||
@@ -33,60 +33,68 @@ class DesktopNavigationBarState extends State<DesktopNavigationBar> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
NavigationBarLogo(),
|
||||
Container(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SizedBox(width: 20.0,),
|
||||
TextLink(
|
||||
S.of(context).home,
|
||||
'/',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/',
|
||||
Expanded(
|
||||
child: Container(
|
||||
alignment: Alignment.centerRight,
|
||||
padding: EdgeInsets.only(left: 8.0, right: 16.0),
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SizedBox(width: 20.0,),
|
||||
TextLink(
|
||||
S.of(context).home,
|
||||
'/',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/',
|
||||
clearStack: true,
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).download,
|
||||
'/download',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/download',
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).tutorials,
|
||||
'/tutorials',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/tutorials',
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).support,
|
||||
'/support',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/support',
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).shop,
|
||||
'/shop',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/shop',
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).blog,
|
||||
'/blog',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/blog',
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).login,
|
||||
'/login',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/login',
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).download,
|
||||
'/download',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/download',
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).tutorials,
|
||||
'/tutorials',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/tutorials',
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).support,
|
||||
'/support',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/support',
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).shop,
|
||||
'/shop',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/shop',
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).blog,
|
||||
'/blog',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/blog',
|
||||
),
|
||||
SizedBox(width: 15.0,),
|
||||
TextLink(
|
||||
S.of(context).login,
|
||||
'/login',
|
||||
color: Colors.white,
|
||||
selected: currentRoute == '/login',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user