updated new flutter version
This commit is contained in:
@@ -472,6 +472,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"under_renovation" : MessageLookupByLibrary.simpleMessage("The store is under renovation"),
|
||||
"unpaid" : MessageLookupByLibrary.simpleMessage("Unpaid"),
|
||||
"update_success" : MessageLookupByLibrary.simpleMessage("Updated success"),
|
||||
"used_and_trust_by" : MessageLookupByLibrary.simpleMessage("Used & trusted by"),
|
||||
"user_account_created_success" : MessageLookupByLibrary.simpleMessage("User account created success"),
|
||||
"user_registration" : MessageLookupByLibrary.simpleMessage("User registration"),
|
||||
"user_registration_desc" : MessageLookupByLibrary.simpleMessage("Please enter your mobile phone number then click the \'Get code\' button to get the validation code."),
|
||||
|
||||
@@ -468,6 +468,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"under_renovation" : MessageLookupByLibrary.simpleMessage("本店还在装修"),
|
||||
"unpaid" : MessageLookupByLibrary.simpleMessage("未付款"),
|
||||
"update_success" : MessageLookupByLibrary.simpleMessage("更新成功"),
|
||||
"used_and_trust_by" : MessageLookupByLibrary.simpleMessage("客户展示"),
|
||||
"user_account_created_success" : MessageLookupByLibrary.simpleMessage("用户账号成功创建"),
|
||||
"user_registration" : MessageLookupByLibrary.simpleMessage("用户注册"),
|
||||
"user_registration_desc" : MessageLookupByLibrary.simpleMessage("请输入您的手机号码,然后单击“获取验证码”按钮。"),
|
||||
|
||||
@@ -4118,6 +4118,16 @@ class S {
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Used & trusted by`
|
||||
String get used_and_trust_by {
|
||||
return Intl.message(
|
||||
'Used & trusted by',
|
||||
name: 'used_and_trust_by',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||
|
||||
@@ -406,5 +406,6 @@
|
||||
"domain_unavailable_token": "{domain} (unavailable)",
|
||||
"place_order_now": "Place order now",
|
||||
"mobile": "mobile",
|
||||
"renew_service_now": "Renew service now"
|
||||
"renew_service_now": "Renew service now",
|
||||
"used_and_trust_by": "Used & trusted by"
|
||||
}
|
||||
@@ -402,5 +402,6 @@
|
||||
"domain_unavailable_token": "{domain} (不可用)",
|
||||
"place_order_now": "马上下单",
|
||||
"mobile": "手机",
|
||||
"renew_service_now": "马上续期"
|
||||
"renew_service_now": "马上续期",
|
||||
"used_and_trust_by": "客户展示"
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import 'package:geolocator/geolocator.dart' as geolocator;
|
||||
import 'package:url_strategy/url_strategy.dart';
|
||||
import 'models/located_address.dart';
|
||||
import 'pages/create_online_store_1.dart';
|
||||
import 'pages/download.dart';
|
||||
import 'pages/me.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import 'package:splashscreen/splashscreen.dart';
|
||||
@@ -196,6 +197,11 @@ class MyApp extends StatelessWidget {
|
||||
CreateOnlineStore1()
|
||||
);
|
||||
}
|
||||
if (pathElements[1] == 'download') {
|
||||
return MaterialPageRoute(builder: (BuildContext context) =>
|
||||
Download()
|
||||
);
|
||||
}
|
||||
return MaterialPageRoute(
|
||||
builder: (BuildContext context) =>
|
||||
Home(title: Constants.APP_TITLE,),
|
||||
|
||||
@@ -17,6 +17,7 @@ import '../store/store.dart';
|
||||
import '../utils/http_util.dart';
|
||||
import '../utils/utils.dart';
|
||||
import '../widgets/desktop/desktop_Index_carousel.dart';
|
||||
import '../widgets/desktop/desktop_customers_logo.dart';
|
||||
import '../widgets/desktop/desktop_index_main_content_1.dart';
|
||||
import '../widgets/desktop/desktop_index_main_content_2.dart';
|
||||
import '../widgets/desktop/desktop_index_main_content_3.dart';
|
||||
@@ -92,6 +93,7 @@ class HomeState extends State<Home> {
|
||||
DesktopIndexCarousel(galleries),
|
||||
DesktopIndexMainContent1(content1Message),
|
||||
DesktopIndexMainContent2(content2),
|
||||
CustomersLogo(),
|
||||
DesktopIndexMainContent3(content2),
|
||||
],
|
||||
),
|
||||
@@ -105,6 +107,7 @@ class HomeState extends State<Home> {
|
||||
DesktopIndexCarousel(galleries),
|
||||
DesktopIndexMainContent1(content1Message),
|
||||
DesktopIndexMainContent2(content2),
|
||||
CustomersLogo(),
|
||||
DesktopIndexMainContent3(content2),
|
||||
],
|
||||
),
|
||||
|
||||
127
lib/widgets/desktop/desktop_customers_logo.dart
Normal file
127
lib/widgets/desktop/desktop_customers_logo.dart
Normal file
@@ -0,0 +1,127 @@
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../generated/l10n.dart';
|
||||
import '../../utils/http_util.dart';
|
||||
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
|
||||
|
||||
class CustomersLogo extends StatefulWidget {
|
||||
|
||||
const CustomersLogo({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => CustomersLogoState();
|
||||
}
|
||||
|
||||
class CustomersLogoState extends State<CustomersLogo> {
|
||||
double sideSpace = 0;
|
||||
double mainSpace = 1200;
|
||||
bool _visible = true;
|
||||
List<dynamic> images = [];
|
||||
var timer;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
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;
|
||||
}
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
margin: EdgeInsets.only(top: 20.0),
|
||||
padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 0.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: sideSpace,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 0),
|
||||
width: mainSpace,
|
||||
child: _getBody(),
|
||||
),
|
||||
Container(
|
||||
width: sideSpace,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_loadData();
|
||||
timer = Timer.periodic(
|
||||
const Duration(seconds: 10,), ((t) {
|
||||
setState(() {
|
||||
_visible = false;
|
||||
});
|
||||
Future.delayed(const Duration(milliseconds: 500), () {
|
||||
_loadData();
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
void _loadData() {
|
||||
HttpUtil.httpGet('v1/get-random-customer-logos')
|
||||
.then((value) {
|
||||
print('the value: $value');
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
images = value;
|
||||
_visible = true;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Widget _getBody() {
|
||||
List<Widget> children = [];
|
||||
for (int i = 0; i < images.length; i++) {
|
||||
Container container = Container(
|
||||
padding: EdgeInsets.only(left: 0, top: 0, right: 0, bottom: 0),
|
||||
child: Util.showImage(images[i]['image'], width: mainSpace / 8),
|
||||
);
|
||||
children.add(container);
|
||||
}
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 0, bottom: 16, left: 0, right: 0),
|
||||
child: Text(
|
||||
S.of(context).used_and_trust_by,
|
||||
style: TextStyle(
|
||||
fontSize: 20.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.blueGrey,
|
||||
),
|
||||
),
|
||||
),
|
||||
AnimatedOpacity(
|
||||
opacity: _visible ? 1.0 : 0.0,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
child: Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: children,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -392,5 +392,3 @@ class DesktopPayNowState extends State<DesktopPayNow> {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 198.54.117.10
|
||||
@@ -66,7 +66,7 @@ class DesktopStripePayWebState extends State<DesktopStripePayWeb> {
|
||||
),
|
||||
);
|
||||
if (widget.stripePaymentMethod == null) {
|
||||
form = CardForm(card: card, formKey: formKey,);
|
||||
form = CardForm(card: card, formKey: formKey, displayPostalCode: false,);
|
||||
body = ListView(
|
||||
children: <Widget>[
|
||||
form,
|
||||
|
||||
@@ -275,20 +275,40 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
||||
}
|
||||
}
|
||||
|
||||
var disabledRule = Rule.getRule(extraJson, Rule.RULE_DISABLED_IF_FIELD_EQUALS_TO);
|
||||
var disabledRule =
|
||||
Rule.getRule(extraJson, Rule.RULE_DISABLED_IF_FIELD_EQUALS_TO);
|
||||
if (disabledRule != null) {
|
||||
if (disabledRule is List) {
|
||||
for (var i = 0; i < (disabledRule as List).length; i++) {
|
||||
Map<String, dynamic> disabledRule1 = disabledRule[i];
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(selections, disabledRule1[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0 && disabledRule1.containsKey(attValues[0])) {
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(
|
||||
selections, disabledRule1[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0 &&
|
||||
disabledRule1.containsKey(attValues[0])) {
|
||||
disabled = true;
|
||||
}
|
||||
if (attValues.length > 0) {
|
||||
for (String s in attValues) {
|
||||
if (disabledRule1.containsKey(s) && disabledRule1[s]) {
|
||||
disabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (disabled) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(selections, disabledRule[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0 && disabledRule.containsKey(attValues[0])) {
|
||||
disabled = true;
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(
|
||||
selections, disabledRule[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0) {
|
||||
for (String s in attValues) {
|
||||
if (disabledRule.containsKey(s) && disabledRule[s]) {
|
||||
disabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,20 +283,40 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
||||
}
|
||||
}
|
||||
|
||||
var disabledRule = Rule.getRule(extraJson, Rule.RULE_DISABLED_IF_FIELD_EQUALS_TO);
|
||||
var disabledRule =
|
||||
Rule.getRule(extraJson, Rule.RULE_DISABLED_IF_FIELD_EQUALS_TO);
|
||||
if (disabledRule != null) {
|
||||
if (disabledRule is List) {
|
||||
for (var i = 0; i < (disabledRule as List).length; i++) {
|
||||
Map<String, dynamic> disabledRule1 = disabledRule[i];
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(selections, disabledRule1[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0 && disabledRule1.containsKey(attValues[0])) {
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(
|
||||
selections, disabledRule1[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0 &&
|
||||
disabledRule1.containsKey(attValues[0])) {
|
||||
disabled = true;
|
||||
}
|
||||
if (attValues.length > 0) {
|
||||
for (String s in attValues) {
|
||||
if (disabledRule1.containsKey(s) && disabledRule1[s]) {
|
||||
disabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (disabled) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(selections, disabledRule[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0 && disabledRule.containsKey(attValues[0])) {
|
||||
disabled = true;
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(
|
||||
selections, disabledRule[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0) {
|
||||
for (String s in attValues) {
|
||||
if (disabledRule.containsKey(s) && disabledRule[s]) {
|
||||
disabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,20 +187,40 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
|
||||
}
|
||||
}
|
||||
|
||||
var disabledRule = Rule.getRule(extraJson, Rule.RULE_DISABLED_IF_FIELD_EQUALS_TO);
|
||||
var disabledRule =
|
||||
Rule.getRule(extraJson, Rule.RULE_DISABLED_IF_FIELD_EQUALS_TO);
|
||||
if (disabledRule != null) {
|
||||
if (disabledRule is List) {
|
||||
for (var i = 0; i < (disabledRule as List).length; i++) {
|
||||
Map<String, dynamic> disabledRule1 = disabledRule[i];
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(selections, disabledRule1[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0 && disabledRule1.containsKey(attValues[0])) {
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(
|
||||
selections, disabledRule1[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0 &&
|
||||
disabledRule1.containsKey(attValues[0])) {
|
||||
disabled = true;
|
||||
}
|
||||
if (attValues.length > 0) {
|
||||
for (String s in attValues) {
|
||||
if (disabledRule1.containsKey(s) && disabledRule1[s]) {
|
||||
disabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (disabled) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(selections, disabledRule[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0 && disabledRule.containsKey(attValues[0])) {
|
||||
disabled = true;
|
||||
List<String> attValues = Utils.getSelectedAttributeValue(
|
||||
selections, disabledRule[Rule.RULE_KEY_FIELD_KEY]);
|
||||
if (attValues.length > 0) {
|
||||
for (String s in attValues) {
|
||||
if (disabledRule.containsKey(s) && disabledRule[s]) {
|
||||
disabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import "package:universal_html/html.dart";
|
||||
|
||||
import '../../constants.dart';
|
||||
import '../../generated/l10n.dart';
|
||||
@@ -22,7 +23,7 @@ class DownloadItem extends StatefulWidget {
|
||||
}
|
||||
|
||||
class DownloadItemState extends State<DownloadItem> {
|
||||
final double buttonWidth = 114.0;
|
||||
final double buttonWidth = 122.0;
|
||||
final double iconWidth = 48.0;
|
||||
|
||||
@override
|
||||
@@ -275,8 +276,14 @@ class DownloadItemState extends State<DownloadItem> {
|
||||
],
|
||||
),
|
||||
onPressed: () async {
|
||||
if (await canLaunch(downloadUrl)) {
|
||||
await launch('$downloadUrl');
|
||||
if (kIsWeb) {
|
||||
AnchorElement anchorElement = new AnchorElement(href: downloadUrl);
|
||||
anchorElement.download = downloadUrl;
|
||||
anchorElement.click();
|
||||
} else {
|
||||
if (!await launchUrl(Uri.parse('$downloadUrl'))) {
|
||||
throw 'Could not launch $downloadUrl';
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
@@ -53,7 +53,7 @@ class MobileStripePayWebState extends State<MobileStripePayWeb> {
|
||||
),
|
||||
);
|
||||
if (widget.stripePaymentMethod == null) {
|
||||
form = CardForm(card: card, formKey: formKey,);
|
||||
form = CardForm(card: card, formKey: formKey, displayPostalCode: false,);
|
||||
body = ListView(
|
||||
children: <Widget>[form,],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user