Commit ebeb6a5944bd6491a693639d56b48ccf201944cf

Authored by wdn127929
1 parent 9bd55fde

应用内更新弹框提示页面字体大小不跟随系统字体改变

@@ -18,19 +18,19 @@ if (flutterRoot == null) { @@ -18,19 +18,19 @@ if (flutterRoot == null) {
18 18
19 19
20 20
21 -def flutterVersionCode = "520" 21 +def flutterVersionCode = "519"
22 if (flutterVersionCode == null) { 22 if (flutterVersionCode == null) {
23 - flutterVersionCode = '520' 23 + flutterVersionCode = '519'
24 24
25 25
26 26
27 } 27 }
28 28
29 29
30 -def flutterVersionName = "5.2.0" 30 +def flutterVersionName = "5.1.9"
31 31
32 if (flutterVersionName == null) { 32 if (flutterVersionName == null) {
33 - flutterVersionName = '5.2.0' 33 + flutterVersionName = '5.1.9'
34 34
35 35
36 } 36 }
1 import 'dart:convert'; 1 import 'dart:convert';
2 2
  3 +
3 import 'package:common_utils/common_utils.dart'; 4 import 'package:common_utils/common_utils.dart';
4 5
5 class CommentsModel { 6 class CommentsModel {
@@ -210,6 +211,7 @@ class CommentsImageModel { @@ -210,6 +211,7 @@ class CommentsImageModel {
210 ImageAve imageAve; 211 ImageAve imageAve;
211 String url; 212 String url;
212 String avinfo; 213 String avinfo;
  214 +
213 215
214 CommentsImageModel( 216 CommentsImageModel(
215 {this.key, 217 {this.key,
@@ -220,9 +222,10 @@ class CommentsImageModel { @@ -220,9 +222,10 @@ class CommentsImageModel {
220 this.imageInfo, 222 this.imageInfo,
221 this.imageAve, 223 this.imageAve,
222 this.url, 224 this.url,
223 - this.avinfo}); 225 + this.avinfo,
  226 + });
224 227
225 - CommentsImageModel.fromJson(Map<String, dynamic> json) { 228 + CommentsImageModel.fromJson(Map<String, dynamic> json) {
226 key = json['key']; 229 key = json['key'];
227 bucket = json['bucket']; 230 bucket = json['bucket'];
228 mimeType = json['mimeType']; 231 mimeType = json['mimeType'];
@@ -237,6 +240,8 @@ class CommentsImageModel { @@ -237,6 +240,8 @@ class CommentsImageModel {
237 url = json['url']; 240 url = json['url'];
238 avinfo = json['avinfo'] == null ? null : jsonEncode(json['avinfo']); 241 avinfo = json['avinfo'] == null ? null : jsonEncode(json['avinfo']);
239 print(avinfo); 242 print(avinfo);
  243 +
  244 +
240 } 245 }
241 246
242 Map<String, dynamic> toJson() { 247 Map<String, dynamic> toJson() {
@@ -194,6 +194,8 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { @@ -194,6 +194,8 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> {
194 /// 九宫格 194 /// 九宫格
195 Widget _getGridImg(List<CommentsImageModel> imags) { 195 Widget _getGridImg(List<CommentsImageModel> imags) {
196 imags.removeWhere((element) => element.url == null || element.url == ''); 196 imags.removeWhere((element) => element.url == null || element.url == '');
  197 +
  198 +
197 return GridView.builder( 199 return GridView.builder(
198 controller: controller, 200 controller: controller,
199 padding: EdgeInsets.symmetric(vertical: w(7)), 201 padding: EdgeInsets.symmetric(vertical: w(7)),
@@ -210,7 +212,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { @@ -210,7 +212,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> {
210 crossAxisSpacing: w(7), 212 crossAxisSpacing: w(7),
211 //子组件宽高长度比例 213 //子组件宽高长度比例
212 childAspectRatio: 1.0), 214 childAspectRatio: 1.0),
213 - itemBuilder: (BuildContext context, int index) { 215 + itemBuilder: (BuildContext context, int index){
214 if (imags[index].avinfo != null && 216 if (imags[index].avinfo != null &&
215 imags[index].avinfo != 'false' && 217 imags[index].avinfo != 'false' &&
216 imags[index].avinfo != '0') { 218 imags[index].avinfo != '0') {
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 import 'package:one_key/constant/state.dart'; 2 import 'package:one_key/constant/state.dart';
  3 +import 'package:video_compress/video_compress.dart';
3 4
4 import '../constant/constant.dart'; 5 import '../constant/constant.dart';
5 import '../constant/error.dart'; 6 import '../constant/error.dart';
@@ -41,7 +42,6 @@ class CommentManageProvider extends ChangeNotifier { @@ -41,7 +42,6 @@ class CommentManageProvider extends ChangeNotifier {
41 return false; 42 return false;
42 }); 43 });
43 if (baseResp.code == Constant.status_success) { 44 if (baseResp.code == Constant.status_success) {
44 -  
45 notifyListeners(); 45 notifyListeners();
46 return true; 46 return true;
47 // } else { 47 // } else {
@@ -29,6 +29,7 @@ import '../app.dart'; @@ -29,6 +29,7 @@ import '../app.dart';
29 import '../utils/dialog_util.dart'; 29 import '../utils/dialog_util.dart';
30 import 'package:device_utils_my/device_utils_my.dart'; 30 import 'package:device_utils_my/device_utils_my.dart';
31 31
  32 +import '../widgets/fixed_text.dart';
32 33
33 typedef VeisonCallback = void Function(Version value); 34 typedef VeisonCallback = void Function(Version value);
34 35
@@ -175,14 +176,18 @@ class UpdateModelMy { @@ -175,14 +176,18 @@ class UpdateModelMy {
175 crossAxisAlignment: CrossAxisAlignment.start, 176 crossAxisAlignment: CrossAxisAlignment.start,
176 children: <Widget>[ 177 children: <Widget>[
177 Container( 178 Container(
  179 + constraints: BoxConstraints(
  180 + maxHeight: ScreenUtil().screenHeight -
  181 + ScreenUtil().setWidth(350)),
178 padding: EdgeInsets.symmetric( 182 padding: EdgeInsets.symmetric(
179 horizontal: ScreenUtil().setWidth(60)), 183 horizontal: ScreenUtil().setWidth(60)),
180 - child: Column( 184 + child: SingleChildScrollView(
  185 + child: Column(
181 mainAxisSize: MainAxisSize.min, 186 mainAxisSize: MainAxisSize.min,
182 crossAxisAlignment: CrossAxisAlignment.start, 187 crossAxisAlignment: CrossAxisAlignment.start,
183 children: <Widget>[ 188 children: <Widget>[
184 Center( 189 Center(
185 - child: Text( 190 + child: FixedText(
186 "${version.name}版本更新啦", 191 "${version.name}版本更新啦",
187 style: TextStyle( 192 style: TextStyle(
188 fontSize: ScreenUtil().setSp(36), 193 fontSize: ScreenUtil().setSp(36),
@@ -190,14 +195,14 @@ class UpdateModelMy { @@ -190,14 +195,14 @@ class UpdateModelMy {
190 ), 195 ),
191 ), 196 ),
192 VEmptyView(20), 197 VEmptyView(20),
193 - Text( 198 + FixedText(
194 version.content, 199 version.content,
195 style: TextStyle( 200 style: TextStyle(
196 fontSize: ScreenUtil().setSp(28), 201 fontSize: ScreenUtil().setSp(28),
197 color: MyColours.color_353535), 202 color: MyColours.color_353535),
198 ) 203 )
199 ], 204 ],
200 - ), 205 + )),
201 ), 206 ),
202 VEmptyView(40), 207 VEmptyView(40),
203 MyDivider(double.infinity, ScreenUtil().setWidth(1)), 208 MyDivider(double.infinity, ScreenUtil().setWidth(1)),
@@ -210,7 +215,7 @@ class UpdateModelMy { @@ -210,7 +215,7 @@ class UpdateModelMy {
210 onTap: () { 215 onTap: () {
211 Navigator.of(context).pop(); 216 Navigator.of(context).pop();
212 }, 217 },
213 - child: Text( 218 + child: FixedText(
214 "下次一定", 219 "下次一定",
215 style: TextStyle( 220 style: TextStyle(
216 fontSize: ScreenUtil().setSp(34), 221 fontSize: ScreenUtil().setSp(34),
@@ -238,7 +243,7 @@ class UpdateModelMy { @@ -238,7 +243,7 @@ class UpdateModelMy {
238 "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1510697490"); 243 "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1510697490");
239 } 244 }
240 }, 245 },
241 - child: Text( 246 + child: FixedText(
242 "立即更新", 247 "立即更新",
243 style: TextStyle( 248 style: TextStyle(
244 fontSize: ScreenUtil().setSp(34), 249 fontSize: ScreenUtil().setSp(34),
  1 +import 'package:flutter/material.dart';
  2 +
  3 +class FixedText extends Text {
  4 + const FixedText(
  5 + String data, {
  6 + Key key,
  7 + TextStyle style,
  8 + StrutStyle strutStyle,
  9 + TextAlign textAlign,
  10 + TextDirection textDirection,
  11 + Locale locale,
  12 + bool softWrap,
  13 + TextOverflow overflow,
  14 + double textScaleFactor = 1.0,
  15 + int maxLines,
  16 + String semanticsLabel,
  17 + }) : super(data,
  18 + key: key,
  19 + style: style,
  20 + strutStyle: strutStyle,
  21 + textAlign: textAlign,
  22 + textDirection: textDirection,
  23 + locale: locale,
  24 + softWrap: softWrap,
  25 + overflow: overflow,
  26 + textScaleFactor: textScaleFactor,
  27 + maxLines: maxLines,
  28 + semanticsLabel: semanticsLabel);
  29 +}
@@ -1513,40 +1513,40 @@ packages: @@ -1513,40 +1513,40 @@ packages:
1513 source: hosted 1513 source: hosted
1514 version: "3.1.1" 1514 version: "3.1.1"
1515 video_player: 1515 video_player:
1516 - dependency: transitive 1516 + dependency: "direct main"
1517 description: 1517 description:
1518 name: video_player 1518 name: video_player
1519 url: "https://pub.flutter-io.cn" 1519 url: "https://pub.flutter-io.cn"
1520 source: hosted 1520 source: hosted
1521 - version: "2.4.7" 1521 + version: "2.7.0"
1522 video_player_android: 1522 video_player_android:
1523 dependency: transitive 1523 dependency: transitive
1524 description: 1524 description:
1525 name: video_player_android 1525 name: video_player_android
1526 url: "https://pub.flutter-io.cn" 1526 url: "https://pub.flutter-io.cn"
1527 source: hosted 1527 source: hosted
1528 - version: "2.3.5" 1528 + version: "2.4.9"
1529 video_player_avfoundation: 1529 video_player_avfoundation:
1530 dependency: transitive 1530 dependency: transitive
1531 description: 1531 description:
1532 name: video_player_avfoundation 1532 name: video_player_avfoundation
1533 url: "https://pub.flutter-io.cn" 1533 url: "https://pub.flutter-io.cn"
1534 source: hosted 1534 source: hosted
1535 - version: "2.3.4" 1535 + version: "2.4.9"
1536 video_player_platform_interface: 1536 video_player_platform_interface:
1537 dependency: transitive 1537 dependency: transitive
1538 description: 1538 description:
1539 name: video_player_platform_interface 1539 name: video_player_platform_interface
1540 url: "https://pub.flutter-io.cn" 1540 url: "https://pub.flutter-io.cn"
1541 source: hosted 1541 source: hosted
1542 - version: "5.1.2" 1542 + version: "6.2.0"
1543 video_player_web: 1543 video_player_web:
1544 dependency: transitive 1544 dependency: transitive
1545 description: 1545 description:
1546 name: video_player_web 1546 name: video_player_web
1547 url: "https://pub.flutter-io.cn" 1547 url: "https://pub.flutter-io.cn"
1548 source: hosted 1548 source: hosted
1549 - version: "2.0.10" 1549 + version: "2.0.16"
1550 video_thumbnail: 1550 video_thumbnail:
1551 dependency: "direct main" 1551 dependency: "direct main"
1552 description: 1552 description:
@@ -153,7 +153,7 @@ dependencies: @@ -153,7 +153,7 @@ dependencies:
153 sign_in_with_apple: ^4.3.0 153 sign_in_with_apple: ^4.3.0
154 video_thumbnail: ^0.5.3 154 video_thumbnail: ^0.5.3
155 # video_player: ^2.4.7 155 # video_player: ^2.4.7
156 - # video_player: ^2.7.0 156 + video_player: ^2.7.0
157 # video_player: ^2.4.2 157 # video_player: ^2.4.2
158 # video_player: ^2.2.12 158 # video_player: ^2.2.12
159 # ^2.4.7 159 # ^2.4.7