diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 673eb0f5..994434db 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ 05C5426026BB9CEB00D26AC2 /* liblibIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F33A2695816000237A5E /* liblibIO.a */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
6EE8F3452695816000237A5E /* __uniappes6.js in Resources */ = {isa = PBXBuildFile; fileRef = 6EE8F2E62695815A00237A5E /* __uniappes6.js */; };
@@ -16,7 +17,6 @@
6EE8F3492695816000237A5E /* weex-polyfill.js in Resources */ = {isa = PBXBuildFile; fileRef = 6EE8F2EA2695815A00237A5E /* weex-polyfill.js */; };
6EE8F34A2695816000237A5E /* weexUniJs.js in Resources */ = {isa = PBXBuildFile; fileRef = 6EE8F2EB2695815A00237A5E /* weexUniJs.js */; };
6EE8F34B2695816000237A5E /* libSDWebImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F3392695816000237A5E /* libSDWebImage.a */; };
- 6EE8F34C2695816000237A5E /* liblibIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F33A2695816000237A5E /* liblibIO.a */; };
6EE8F34D2695816000237A5E /* liblibWeex.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F33B2695816000237A5E /* liblibWeex.a */; };
6EE8F34E2695816000237A5E /* liblibPDRCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F33C2695816000237A5E /* liblibPDRCore.a */; };
6EE8F34F2695816000237A5E /* liblibNativeUI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F33D2695816000237A5E /* liblibNativeUI.a */; };
@@ -255,6 +255,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 05C5426026BB9CEB00D26AC2 /* liblibIO.a in Frameworks */,
89A626B026A80E520004A8F0 /* AMapFoundationKit.framework in Frameworks */,
89A626B126A80E520004A8F0 /* AMapLocationKit.framework in Frameworks */,
89A626B226A80E520004A8F0 /* libAMapLocationPlugin.a in Frameworks */,
@@ -292,7 +293,6 @@
89AEFA3F26A67FBD00DD2817 /* AMapSearchKit.framework in Frameworks */,
C9444B3318AB7FB815E97950 /* libPods-Runner.a in Frameworks */,
6EE8F3522695816000237A5E /* liblibStorage.a in Frameworks */,
- 6EE8F34C2695816000237A5E /* liblibIO.a in Frameworks */,
6EE8F34D2695816000237A5E /* liblibWeex.a in Frameworks */,
6EE8F3552695816000237A5E /* storage.framework in Frameworks */,
6EE8F3512695816000237A5E /* libcoreSupport.a in Frameworks */,
@@ -715,7 +715,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
B8122AB2E6A8A2B1AD0AB3F7 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
@@ -846,7 +846,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
- CURRENT_PROJECT_VERSION = 28;
+ CURRENT_PROJECT_VERSION = 32;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -881,7 +881,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
- MARKETING_VERSION = 1.0.28;
+ MARKETING_VERSION = 1.0.32;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@@ -929,6 +929,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.zsw.hx;
PRODUCT_NAME = "$(TARGET_NAME)";
+ SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
@@ -1046,7 +1047,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
- CURRENT_PROJECT_VERSION = 28;
+ CURRENT_PROJECT_VERSION = 32;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -1081,7 +1082,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
- MARKETING_VERSION = 1.0.28;
+ MARKETING_VERSION = 1.0.32;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@@ -1139,7 +1140,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
- CURRENT_PROJECT_VERSION = 28;
+ CURRENT_PROJECT_VERSION = 32;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -1174,7 +1175,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
- MARKETING_VERSION = 1.0.28;
+ MARKETING_VERSION = 1.0.32;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@@ -1222,6 +1223,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.zsw.hx;
PRODUCT_NAME = "$(TARGET_NAME)";
+ SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 39e20baf..fb2dffc4 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -81,7 +81,7 @@
buildConfiguration = "Debug">
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index b7b14b0a..eb266313 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -5,7 +5,7 @@
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleDisplayName
- 迴響
+ 迴鄉
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart
index 0f5fa8e6..41bd1080 100644
--- a/lib/login/login_page.dart
+++ b/lib/login/login_page.dart
@@ -559,7 +559,10 @@ class _MyLoginPageState extends State with TickerProviderStateMixin {
),
child: Text(
S.of(context).login,
- style: TextStyle(fontSize: 18.sp,fontWeight: FontWeight.w400, color: Colors.white),
+ style: TextStyle(
+ fontSize: 18.sp,
+ fontWeight: FontWeight.w400,
+ color: Colors.white),
),
),
),
@@ -918,7 +921,8 @@ class _MyLoginPageState extends State with TickerProviderStateMixin {
backgroundColor: Colors.transparent,
elevation: 0,
shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.all(Radius.circular(6))),
+ borderRadius: BorderRadius.circular(6),
+ ),
children: [
Stack(
alignment: Alignment.bottomCenter,
@@ -927,11 +931,11 @@ class _MyLoginPageState extends State with TickerProviderStateMixin {
alignment: Alignment.center,
width: double.infinity,
height: 305.h,
- // margin: EdgeInsets.only(left: 40.w, right: 40.w),
padding: EdgeInsets.only(left: 16.w, right: 16.w),
decoration: new BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.all(Radius.circular(8))),
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(8),
+ ),
child: Column(
children: [
Padding(
@@ -950,10 +954,11 @@ class _MyLoginPageState extends State with TickerProviderStateMixin {
TextSpan(
text: S.of(context).yinsizhengce1,
style: TextStyle(
- fontWeight: FontWeight.w500,
- fontSize: 14.sp,
- height: 1.3.h,
- color: Color(0xff727272)),
+ fontWeight: FontWeight.w500,
+ fontSize: 14.sp,
+ height: 1.3.h,
+ color: Color(0xff727272),
+ ),
),
TextSpan(
text: S.of(context).yinsixieyi,
@@ -993,7 +998,7 @@ class _MyLoginPageState extends State with TickerProviderStateMixin {
GestureDetector(
onTap: () {
Navigator.of(context).pop();
- // Navigator.of(context).pop();
+ exit(0);
},
child: Container(
height: 40.h,
@@ -1001,7 +1006,11 @@ class _MyLoginPageState extends State with TickerProviderStateMixin {
margin: EdgeInsets.only(bottom: 20.h),
child: BorderText(
padding: EdgeInsets.only(
- top: 10.h, bottom: 10.h, left: 36.w, right: 36.w),
+ top: 10.h,
+ bottom: 10.h,
+ left: 36.w,
+ right: 36.w,
+ ),
text: S.of(context).jujue,
fontSize: 12.sp,
textColor: Color(0xFF32A060),
@@ -1027,7 +1036,8 @@ class _MyLoginPageState extends State with TickerProviderStateMixin {
value.setBool("isShowPrivacyPolicy", true);
});
SharesdkPlugin.uploadPrivacyPermissionStatus(
- 1, (success) => {
+ 1,
+ (success) => {
Navigator.of(context).pop(),
},
);
diff --git a/lib/main.dart b/lib/main.dart
index 4a4442ae..cda30c1b 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -98,21 +98,21 @@ initSdk() async {
///此处配置为iOS的appID信息,Android信息在build.gradle文件中
xgFlutterPlugin.startXg("1680005688", "IYIB3R2XRE22");
- XgAndroidApi androidApi = xgFlutterPlugin.getXgAndroidApi();
-
- //小米
- // androidApi.setMiPushAppId(appId:"APP_ID");
- // androidApi.setMiPushAppKey(appKey: "APPKEY");
-
- androidApi.enableOtherPush();
- androidApi.regPush();
+ if (Platform.isAndroid) {
+ XgAndroidApi androidApi = xgFlutterPlugin.getXgAndroidApi();
+ //小米
+ // androidApi.setMiPushAppId(appId:"APP_ID");
+ // androidApi.setMiPushAppKey(appKey: "APPKEY");
+ androidApi.enableOtherPush();
+ androidApi.regPush();
+ }
ShareSDKRegister shareSDKRegister = ShareSDKRegister();
- // shareSDKRegister.setup
shareSDKRegister.setupWechat("wx3b269e795ed23e5f",
"64020361b8ec4c99936c0e3999a9f249", "https://hx.lotus-wallet.com/app/");
shareSDKRegister.setupFacebook(
"523308712059457", "d3a1b6377100871799d8973fbe84794a", "回乡");
+
SharesdkPlugin.regist(shareSDKRegister);
}
diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart
index 709f0b3b..70837ac0 100644
--- a/lib/order/order_detail_page.dart
+++ b/lib/order/order_detail_page.dart
@@ -79,10 +79,11 @@ class _OrderDetailPage extends State {
titleColor: Colors.white,
background: Color(0xFF3A405A),
leadingColor: Colors.white,
+ toolbarHeight: (orderStatus >= 4 ? 98 : 108) + MediaQuery.of(context).padding.top + kToolbarHeight,
bottom: PreferredSize(
- preferredSize: Size(double.infinity, orderStatus >= 4 ? 98.h : 108.h),
+ preferredSize: Size(double.infinity, orderStatus >= 4 ? 98 : 108),
child: Container(
- height: orderStatus >= 4 ? 98.h : 108.h,
+ height: orderStatus >= 4 ? 98 : 108,
padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 10.h),
child: Column(
children: [
@@ -172,7 +173,7 @@ class _OrderDetailPage extends State {
left: 0,
right: 0,
child: Container(
- height: 36.h,
+ height: 36,
color: Color(0xFF3A405A),
),
),
diff --git a/lib/order/write_off_page.dart b/lib/order/write_off_page.dart
index 23660e99..e12b29f5 100644
--- a/lib/order/write_off_page.dart
+++ b/lib/order/write_off_page.dart
@@ -26,8 +26,7 @@ class _WriteOffPage extends State {
super.initState();
coupon = Coupon.fromJson(widget.arguments["coupon"]);
- if(mounted)
- setState(() {});
+ if (mounted) setState(() {});
}
@override
@@ -102,19 +101,24 @@ class _WriteOffPage extends State {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
- coupon != null ? "${coupon.id.substring(0, 4)} "
- "${coupon.id.substring(4, 8)} "
- "${coupon.id.substring(8, 12)} "
- "${coupon.id.substring(12, 16)} "
- "${coupon.id.substring(16, coupon.id.length)}"
+ coupon != null
+ ? "${coupon.id.substring(0, 4)} "
+ "${coupon.id.substring(4, 8)} "
+ "${coupon.id.substring(8, 12)} "
+ "${coupon.id.substring(12, 16)} "
+ "${coupon.id.substring(16, coupon.id.length)}"
: "",
style: TextStyle(
fontSize: 14.sp,
- wordSpacing: coupon == null ? 10
- : (MediaQuery.of(context).size.width - 64.w) /
+ wordSpacing: coupon == null
+ ? 10
+ : (MediaQuery.of(context).size.width -
+ 64.w) /
(((coupon.id.length) * 4)),
- letterSpacing: coupon == null ? 8
- : (MediaQuery.of(context).size.width - 64.w) /
+ letterSpacing: coupon == null
+ ? 8
+ : (MediaQuery.of(context).size.width -
+ 64.w) /
(((coupon.id.length) * 4)),
fontWeight: FontWeight.bold,
color: Color(0xFF353535),
@@ -196,7 +200,8 @@ class _WriteOffPage extends State {
),
Expanded(
child: Text(
- S.of(context)
+ S
+ .of(context)
.qianwanghuixiangmendianduihuanhexiao,
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
diff --git a/lib/retrofit/data/activity.dart b/lib/retrofit/data/activity.dart
index 54bdb56e..e769ba24 100644
--- a/lib/retrofit/data/activity.dart
+++ b/lib/retrofit/data/activity.dart
@@ -1,6 +1,4 @@
-
class Activity {
-
Activity();
String id;
@@ -17,6 +15,8 @@ class Activity {
String endTime;
int state;
int isDelete;
+ int likes;
+ int viewers;
String storeName;
factory Activity.fromJson(Map json) => Activity()
@@ -34,62 +34,28 @@ class Activity {
..endTime = json['endTime']
..state = json['state']
..isDelete = json['isDelete']
+ ..likes = json["likes"]
+ ..viewers = json["viewers"]
..storeName = json['storeName'];
-
Map toJson() => {
- 'id': this.id,
- 'createTime': this.createTime,
- 'createUser': this.createUser,
- 'updateTime': this.updateTime,
- 'updateUser': this.updateUser,
- 'storeId': this.storeId,
- 'mainTitle': this.mainTitle,
- 'viceTitle': this.viceTitle,
- 'content': this.content,
- 'coverImg': this.coverImg,
- 'startTime': this.startTime,
- 'endTime': this.endTime,
- 'state': this.state,
- 'isDelete': this.isDelete,
- 'storeName': this.storeName,
- };
-
- // Activity _$ActivityFromJson(Map json) {
- // return Activity()
- // ..id = json['id'] as String
- // ..createTime = json['createTime'] as String
- // ..createUser = json['createUser']
- // ..updateTime = json['updateTime'] as String
- // ..updateUser = json['updateUser']
- // ..storeId = json['storeId'] as String
- // ..mainTitle = json['mainTitle'] as String
- // ..viceTitle = json['viceTitle'] as String
- // ..content = json['content'] as String
- // ..coverImg = json['coverImg'] as String
- // ..startTime = json['startTime'] as String
- // ..endTime = json['endTime'] as String
- // ..state = json['state'] as int
- // ..isDelete = json['isDelete'] as int
- // ..storeName = json['storeName'] as String;
- // }
-
- // Map _$ActivityToJson(Activity instance) => {
- // 'id': instance.id,
- // 'createTime': instance.createTime,
- // 'createUser': instance.createUser,
- // 'updateTime': instance.updateTime,
- // 'updateUser': instance.updateUser,
- // 'storeId': instance.storeId,
- // 'mainTitle': instance.mainTitle,
- // 'viceTitle': instance.viceTitle,
- // 'content': instance.content,
- // 'coverImg': instance.coverImg,
- // 'startTime': instance.startTime,
- // 'endTime': instance.endTime,
- // 'state': instance.state,
- // 'isDelete': instance.isDelete,
- // 'storeName': instance.storeName,
- // };
-
-}
\ No newline at end of file
+ 'id': this.id,
+ 'createTime': this.createTime,
+ 'createUser': this.createUser,
+ 'updateTime': this.updateTime,
+ 'updateUser': this.updateUser,
+ 'storeId': this.storeId,
+ 'mainTitle': this.mainTitle,
+ 'viceTitle': this.viceTitle,
+ 'content': this.content,
+ 'coverImg': this.coverImg,
+ 'startTime': this.startTime,
+ 'endTime': this.endTime,
+ 'state': this.state,
+ 'isDelete': this.isDelete,
+ 'likes': this.likes,
+ 'viewers': this.viewers,
+ 'storeName': this.storeName
+ };
+
+}
diff --git a/lib/retrofit/data/article.dart b/lib/retrofit/data/article.dart
index 447d1aa7..33c789da 100644
--- a/lib/retrofit/data/article.dart
+++ b/lib/retrofit/data/article.dart
@@ -37,6 +37,8 @@ class Article {
String _endTime;
int _state;
int _isDelete;
+ int _likes;
+ int _viewers;
dynamic _storeName;
String get id => _id;
@@ -55,6 +57,8 @@ class Article {
String get endTime => _endTime;
int get state => _state;
int get isDelete => _isDelete;
+ int get likes => _likes;
+ int get viewers => _viewers;
dynamic get storeName => _storeName;
Article({
@@ -74,6 +78,8 @@ class Article {
String endTime,
int state,
int isDelete,
+ int likes,
+ int viewers,
dynamic storeName}){
_id = id;
_createTime = createTime;
@@ -91,6 +97,8 @@ class Article {
_endTime = endTime;
_state = state;
_isDelete = isDelete;
+ _likes = likes;
+ _viewers = viewers;
_storeName = storeName;
}
@@ -111,6 +119,8 @@ class Article {
_endTime = json["endTime"];
_state = json["state"];
_isDelete = json["isDelete"];
+ _likes = json["likes"];
+ _viewers = json["viewers"];
_storeName = json["storeName"];
}
@@ -132,6 +142,8 @@ class Article {
map["endTime"] = _endTime;
map["state"] = _state;
map["isDelete"] = _isDelete;
+ map["likes"] = _likes;
+ map["viewers"] = _viewers;
map["storeName"] = _storeName;
return map;
}
diff --git a/lib/union/store_details_page.dart b/lib/union/store_details_page.dart
index bfca22ce..a75b8024 100644
--- a/lib/union/store_details_page.dart
+++ b/lib/union/store_details_page.dart
@@ -80,16 +80,18 @@ class _StoreDetailsPage extends State {
: article != null
? article.viceTitle
: "",
- [activity != null
- ? activity.coverImg
- : article != null
- ? article.coverImg
- : "",],
+ [
+ activity != null
+ ? activity.coverImg
+ : article != null
+ ? article.coverImg
+ : "",
+ ],
activity != null
? activity.coverImg
: article != null
- ? article.coverImg
- : "",
+ ? article.coverImg
+ : "",
"",
"http://hx.lotus-wallet.com/index.html?id=${widget.arguments["activityId"] ?? widget.arguments["articleId"]}",
"",
@@ -101,29 +103,27 @@ class _StoreDetailsPage extends State {
debugPrint(activity != null
? activity.coverImg
: article != null
- ? article.coverImg
- : "");
+ ? article.coverImg
+ : "");
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (context) {
- return ShareDialog((platform){
+ return ShareDialog((platform) {
if (platform == ShareSDKPlatforms.line) {
params.map["type"] = SSDKContentTypes.text.value;
- params.map["text"] = "${activity != null
- ? activity.viceTitle
- : article != null
- ? article.viceTitle
- : ""} http://hx.lotus-wallet.com/index.html?id=${widget.arguments["activityId"] ?? widget.arguments["articleId"]}";
+ params.map["text"] =
+ "${activity != null ? activity.viceTitle : article != null ? article.viceTitle : ""} http://hx.lotus-wallet.com/index.html?id=${widget.arguments["activityId"] ?? widget.arguments["articleId"]}";
}
- SharesdkPlugin.share(platform, params, (state, userData, contentEntity, error) {
- print("share!$state");
- print("share!$platform");
- print("share!$userData");
- print("share!$contentEntity");
- print("share!$error");
- print("share!");
+ SharesdkPlugin.share(platform, params,
+ (state, userData, contentEntity, error) {
+ print("share!$state");
+ print("share!$platform");
+ print("share!$userData");
+ print("share!$contentEntity");
+ print("share!$error");
+ print("share!");
});
});
});
@@ -199,7 +199,7 @@ class _StoreDetailsPage extends State {
},
),
SizedBox(
- width: 10,
+ width: 10.w,
),
Text(
activity != null
@@ -228,9 +228,9 @@ class _StoreDetailsPage extends State {
networkSourceMatcher(extension: "svg"):
svgNetworkImageRender(),
networkSourceMatcher(): networkImageRender(
- loadingWidget: () {
- return Container();
- },
+ loadingWidget: () {
+ return Container();
+ },
// mapUrl: (url) {
// print("objectUrl: $url");
// return "$url?imageMogr2/format/webp/blur/1x0/quality/75";
@@ -238,26 +238,43 @@ class _StoreDetailsPage extends State {
),
},
customRender: {
- "video" : (context, parsedChild, attributes, element) {
+ "video": (context, parsedChild, attributes, element) {
print("video attributes: ${element.attributes}");
print("video attributes: ${element.attributeSpans}");
- print("video attributes: ${element.children.first.attributes["src"]}");
+ print(
+ "video attributes: ${element.children.first.attributes["src"]}");
print("video attributes: $parsedChild");
- return videoWidget(double.tryParse(attributes['width'] ?? ""), double.tryParse(element.attributes['height'] ?? ""), element.children.first.attributes["src"], element.attributes["sandbox"]);
+ return videoWidget(
+ double.tryParse(attributes['width'] ?? ""),
+ double.tryParse(element.attributes['height'] ?? ""),
+ element.children.first.attributes["src"],
+ element.attributes["sandbox"]);
},
- "iframe" : (context, parsedChild, attributes, element) {
+ "iframe": (context, parsedChild, attributes, element) {
print("iframe attributes: ${element.toString()}");
print("iframe attributes: $parsedChild");
- return videoWidget(double.tryParse(attributes['width'] ?? ""), double.tryParse(element.attributes['height'] ?? ""), element.children.first.attributes["src"], element.attributes["sandbox"]);
+ return videoWidget(
+ double.tryParse(attributes['width'] ?? ""),
+ double.tryParse(element.attributes['height'] ?? ""),
+ element.children.first.attributes["src"],
+ element.attributes["sandbox"]);
},
- "audio" : (context, parsedChild, attributes, element) {
+ "audio": (context, parsedChild, attributes, element) {
final sources = [
- if (element.attributes['src'] != null) element.attributes['src'],
+ if (element.attributes['src'] != null)
+ element.attributes['src'],
];
- if (sources == null || sources.isEmpty || sources.first == null) {
+ if (sources == null ||
+ sources.isEmpty ||
+ sources.first == null) {
return EmptyContentElement();
}
- return audioWidget(attributes['controls'] != null, attributes['loop'] != null, attributes['autoplay'] != null, sources, context.style.width ?? 300.w);
+ return audioWidget(
+ attributes['controls'] != null,
+ attributes['loop'] != null,
+ attributes['autoplay'] != null,
+ sources,
+ context.style.width ?? 300.w);
},
},
),
@@ -279,7 +296,8 @@ class _StoreDetailsPage extends State {
height: (MediaQuery.of(context).size.width) / (width / height),
child: chewies = Chewie(
controller: chewieAudioController = ChewieController(
- videoPlayerController: videoPlayerController = VideoPlayerController.network(
+ videoPlayerController: videoPlayerController =
+ VideoPlayerController.network(
src,
),
aspectRatio: width / height,
@@ -320,13 +338,10 @@ class _StoreDetailsPage extends State {
@override
void dispose() {
- if (chewieAudioController != null)
- chewieAudioController.dispose();
+ if (chewieAudioController != null) chewieAudioController.dispose();
- if (videoPlayerController != null)
- videoPlayerController.dispose();
+ if (videoPlayerController != null) videoPlayerController.dispose();
super.dispose();
}
-
}
diff --git a/lib/view_widget/custom_image.dart b/lib/view_widget/custom_image.dart
index e03f9d4c..529f6e56 100644
--- a/lib/view_widget/custom_image.dart
+++ b/lib/view_widget/custom_image.dart
@@ -13,8 +13,7 @@ class MImage extends StatelessWidget {
final BoxFit fit;
final bool isCircle;
- MImage(
- this.src, {
+ MImage(this.src, {
this.errorSrc = "assets/image/default_2_1.png",
this.fadeSrc = "assets/image/default_2_1.png",
this.aspectRatio,
@@ -28,7 +27,12 @@ class MImage extends StatelessWidget {
@override
Widget build(BuildContext context) {
Widget image = LayoutBuilder(builder: (context, constraints) {
- String imageUrl = "$src?imageMogr2/thumbnail/${constraints.constrainWidth() * 2}x${constraints.constrainHeight() * 2}/format/webp/blur/1x0/quality/75";
+ String imageUrl = "";
+ if (src != null && src != "") {
+ imageUrl = "$src?imageMogr2/thumbnail/${constraints.constrainWidth() *
+ 2}x${constraints.constrainHeight() *
+ 2}/format/webp/blur/1x0/quality/75";
+ }
print("imageUrl: $imageUrl");
return CachedNetworkImage(
imageUrl: imageUrl,
@@ -48,7 +52,6 @@ class MImage extends StatelessWidget {
);
},
placeholder: (context, placeholder) {
- print("object $placeholder");
return Image.asset(
fadeSrc,
fit: fit,
@@ -57,11 +60,11 @@ class MImage extends StatelessWidget {
);
});
- var clipRRect ;
+ var clipRRect;
if (isCircle) {
clipRRect = ClipOval(
- clipBehavior: Clip.antiAlias,
- child: image
+ clipBehavior: Clip.antiAlias,
+ child: image
);
} else {
clipRRect = ClipRRect(
diff --git a/lib/view_widget/explosion_effect_widget.dart b/lib/view_widget/explosion_effect_widget.dart
index 1593b613..a0ef6da0 100644
--- a/lib/view_widget/explosion_effect_widget.dart
+++ b/lib/view_widget/explosion_effect_widget.dart
@@ -7,7 +7,6 @@ import 'package:flutter/rendering.dart';
import 'package:huixiang/utils/pixel_utils.dart';
class ExplosionWidget extends StatefulWidget {
-
final Widget child;
final Rect bound;
final String tag;
@@ -19,12 +18,10 @@ class ExplosionWidget extends StatefulWidget {
State createState() {
return _ExplosionWidget();
}
-
}
class _ExplosionWidget extends State
with SingleTickerProviderStateMixin {
-
ByteData _byteData;
Size _imageSize;
diff --git a/lib/view_widget/mine_vip_view.dart b/lib/view_widget/mine_vip_view.dart
index bcab6976..7ef8a40c 100644
--- a/lib/view_widget/mine_vip_view.dart
+++ b/lib/view_widget/mine_vip_view.dart
@@ -114,6 +114,7 @@ class MineVipView extends StatelessWidget {
],
),
child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -169,7 +170,7 @@ class MineVipView extends StatelessWidget {
],
),
Container(
- margin: EdgeInsets.only(left: 13.w, right: 12.w),
+ margin: EdgeInsets.only(left: 13.w, right: 12.w, bottom:12.h),
child: Column(
children: [
Row(
diff --git a/lib/view_widget/no_data_view.dart b/lib/view_widget/no_data_view.dart
index 951c33b0..03a40908 100644
--- a/lib/view_widget/no_data_view.dart
+++ b/lib/view_widget/no_data_view.dart
@@ -1,13 +1,16 @@
import 'package:flutter/material.dart';
import 'package:huixiang/view_widget/round_button.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
class NoDataView extends StatelessWidget {
final bool isShowBtn;
final String text;
final double fontSize;
final EdgeInsets margin;
+
NoDataView(
- {this.isShowBtn = true, this.text,
+ {this.isShowBtn = true,
+ this.text,
this.fontSize,
this.margin = const EdgeInsets.only(top: 30)});
@@ -20,24 +23,26 @@ class NoDataView extends StatelessWidget {
children: [
Image(image: AssetImage("assets/image/icon_empty.png")),
SizedBox(
- height: 35,
+ height: 35.h,
),
Text(
text,
- style: TextStyle(fontSize: fontSize, color: Color(0xFF353535)),
+ style: TextStyle(
+ fontSize: fontSize,
+ color: Color(0xFF353535),
+ ),
),
SizedBox(
- height: 10,
+ height: 10.h,
),
if (isShowBtn)
Container(
- margin: EdgeInsets.symmetric(horizontal: 16),
+ margin: EdgeInsets.symmetric(horizontal: 16.w),
child: RoundButton(
text: "返回首页",
textColor: Colors.white,
- fontSize: 14,
- padding:
- EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
+ fontSize: 14.sp,
+ padding: EdgeInsets.all(12.w),
backgroup: Color(0xFF32A060),
radius: 4,
),
diff --git a/pubspec.yaml b/pubspec.yaml
index bf0d0fe2..e0d55bf0 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -66,13 +66,9 @@ dependencies:
qr_flutter: ^4.0.0
url_launcher: ^6.0.5
-# app_links: ^2.1.0
-# crop_image: ^1.0.1
image_cropper: ^1.4.1
image_picker_gallery_camera: ^0.1.6
-# flukit: ^1.0.2
-# azlistview: ^1.1.1
path_provider: ^1.2.0
cached_network_image: ^2.0.0