Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from simplezhli:master #15

Open
wants to merge 193 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
dd9ff0b
flutter 2.0.5
simplezhli Apr 20, 2021
99cd5a3
开始迁移到空安全
simplezhli Apr 22, 2021
84659e6
FlutterJsonBeanFactory生成代码更新至空安全版本
simplezhli Apr 22, 2021
03be4e2
widget、util、demo迁移完成
simplezhli Apr 23, 2021
c0679f9
store、statistics、shop、setting、account迁移完成
simplezhli Apr 23, 2021
0ed2bab
goods、order、home、login迁移完成
simplezhli Apr 25, 2021
8227e4c
迁移至空安全完成 #161
simplezhli Apr 26, 2021
1e049f5
目录调整
simplezhli Apr 28, 2021
70e358f
fluro添加类参数用例
simplezhli Apr 29, 2021
16d12aa
覆盖`selectionHandleColor`无效问题记录
simplezhli Apr 30, 2021
9ed83a6
日常优化
simplezhli May 3, 2021
79b103b
commit
simplezhli May 5, 2021
8bc6440
flutter 2.0.6
simplezhli May 8, 2021
2060277
使用RestorableInt保存页面状态
simplezhli May 12, 2021
d8fb984
测试simulator-action
simplezhli May 13, 2021
08cd171
去除multidex
simplezhli May 19, 2021
2e19cfd
flutter 2.2.0
simplezhli May 20, 2021
2882254
fix #167
simplezhli May 20, 2021
7342308
集成测试代码迁移至空安全
simplezhli May 21, 2021
698a5b0
支持新的service worker加载机制
simplezhli May 21, 2021
1455c1a
web问题补充
simplezhli May 21, 2021
28b4004
优化统计页面
simplezhli May 25, 2021
5bb5089
添加desktop_window插件
simplezhli May 27, 2021
65c9a46
替换device_info为device_info_plus
simplezhli May 27, 2021
5d97b98
TextSpan 鼠标光标支持
simplezhli May 28, 2021
29ee2cc
ShortcutItem添加图片
simplezhli May 29, 2021
6a6d0e6
flutter 2.2.1
simplezhli May 31, 2021
a5f802c
Enable avoid_escaping_inner_quotes lint
simplezhli Jun 5, 2021
7b59f72
Enable use_named_constants lint
simplezhli Jun 6, 2021
0774971
flutter 2.2.2
simplezhli Jun 17, 2021
fb30370
enable lint prefer_interpolation_to_compose_strings
simplezhli Jun 26, 2021
4762900
Turn on avoid_dynamic_calls lint
simplezhli Jun 27, 2021
a2ea57a
flutter 2.2.3
simplezhli Jul 3, 2021
06af57e
升级quick_actions
simplezhli Jul 10, 2021
5785c04
image_picker 0.8.2
simplezhli Jul 16, 2021
c067856
依赖更新
simplezhli Jul 17, 2021
8707a25
keyboard_actions 3.4.1
simplezhli Jul 26, 2021
28a8573
enable avoid_function_literals_in_foreach_calls
simplezhli Jul 27, 2021
f1b8a30
依赖升级
simplezhli Aug 7, 2021
0d9b5c7
provider 6.0.0
simplezhli Aug 21, 2021
95f740a
flutter 2.5.0
simplezhli Sep 9, 2021
bcc2e1c
flutter 2.5适配
simplezhli Sep 9, 2021
b697125
flutter 2.5适配
simplezhli Sep 11, 2021
e7ed312
flutter 2.5.1
simplezhli Sep 21, 2021
b966c82
依赖升级
simplezhli Sep 28, 2021
2cb00b8
Enable avoid_setters_without_getters
simplezhli Oct 5, 2021
317cf72
flutter 2.5.2
simplezhli Oct 5, 2021
b82f500
适配至Android 11
simplezhli Oct 6, 2021
53ba1aa
fix: body evaluated outside `runZonedGuarded`
hkhere Oct 27, 2021
2b04f23
Merge pull request #183 from hkhere/fix_handle_error
simplezhli Oct 29, 2021
1848e5e
qr_code_scanner 0.6.0
simplezhli Nov 1, 2021
5392f10
依赖升级
simplezhli Nov 6, 2021
f33378a
queries补充
simplezhli Nov 27, 2021
98ff4e3
flutter_slidable升至1.1.0
simplezhli Nov 28, 2021
05d8372
fix CI
simplezhli Nov 28, 2021
2b7f5ae
fix CI
simplezhli Nov 28, 2021
0894adc
flutter_2d_amap升级
simplezhli Nov 28, 2021
4dd4f69
flutter_2d_amap升级
simplezhli Nov 28, 2021
bbf257b
Enable avoid_redundant_argument_values lint
simplezhli Nov 30, 2021
fa57a61
fix #187
simplezhli Dec 1, 2021
56600db
Enable sort_child_properties_last lint
simplezhli Dec 2, 2021
6da2ba5
Enable eol_at_end_of_file lint
simplezhli Dec 3, 2021
ead40ea
Enable more lints
simplezhli Dec 4, 2021
13faeac
适配flutter 2.8.0
simplezhli Dec 9, 2021
ad52a60
Enable avoid_print lint
simplezhli Dec 12, 2021
ec8fd73
fix CI
simplezhli Dec 12, 2021
73f2ab5
fix #191 适配FlutterJsonBeanFactory插件4.2.8版本
simplezhli Dec 23, 2021
5cb1d85
SingleTickerProviderStateMixin rebuild 问题补充
simplezhli Jan 8, 2022
0c483e7
flutter 2.8.1
simplezhli Jan 9, 2022
328f143
地图插件升级
simplezhli Jan 24, 2022
3f276b2
flutter 2.10.0
simplezhli Feb 4, 2022
6eaf355
适配flutter 2.10.0
simplezhli Feb 5, 2022
efe55ff
fix #198
simplezhli Feb 6, 2022
36262ee
common_utils 2.1.0
simplezhli Feb 17, 2022
a95dc93
update analysis_options.yaml
simplezhli Feb 18, 2022
6cdb277
Enable no_leading_underscores_for_local_identifiers
simplezhli Feb 20, 2022
4ba1d63
.
simplezhli Feb 20, 2022
4447ff9
flutter 2.10.2
simplezhli Feb 22, 2022
fa6246a
flutter 2.10.3
simplezhli Mar 6, 2022
982e206
Enable use_if_null_to_convert_nulls_to_bools lint
simplezhli Mar 15, 2022
f559a98
#205 尝试修复扫码页黑屏问题
simplezhli Mar 20, 2022
da16c45
依赖升级
simplezhli Apr 2, 2022
fb27a45
web问题文档更新
simplezhli Apr 16, 2022
d14a2ee
flutter 2.10.5
simplezhli May 2, 2022
ac3450e
dio、url_launcher废弃方法替换
simplezhli May 2, 2022
bbd2e35
gradle 7.0
simplezhli May 4, 2022
288c21c
Enable strict-casts
simplezhli May 8, 2022
5b1b656
Enable unnecessary_import
simplezhli May 10, 2022
9af9842
适配flutter 3.0.0
simplezhli May 12, 2022
c75ca18
适配flutter 3.0.0
simplezhli May 18, 2022
268a64e
依赖升级
simplezhli May 24, 2022
cb52663
fix #209
simplezhli Jun 1, 2022
e4a2fbb
扫码问题修复
simplezhli Jun 2, 2022
33847f4
Enable curly_braces_in_flow_control_structures
simplezhli Jun 19, 2022
b14f8b7
Enable use_super_parameters lint
simplezhli Jun 20, 2022
8f2f285
Enable use_super_parameters lint
simplezhli Jun 20, 2022
1bed671
Enable use_super_parameters lint
simplezhli Jun 22, 2022
2756c3a
依赖更新
simplezhli Jul 5, 2022
393aed6
Android 12
simplezhli Jul 17, 2022
414d13e
flutter 3.0.4
simplezhli Jul 22, 2022
dfcf845
依赖更新
simplezhli Aug 7, 2022
d0003a0
适配flutter 3.3.0
simplezhli Sep 2, 2022
0d52ec6
flutter 3.3.0
simplezhli Sep 4, 2022
32d2714
flutter 3.3.2
simplezhli Sep 18, 2022
6160932
fix 'Bad CPU type in executable'
simplezhli Sep 18, 2022
c1a0bc6
fix 'Bad CPU type in executable'
simplezhli Sep 18, 2022
3bfd0ac
fix #220
simplezhli Sep 22, 2022
273ef07
迁移废弃的Splash Screen API
simplezhli Sep 30, 2022
91a96d7
依赖升级
simplezhli Oct 1, 2022
a7d5c27
修复可访问性测试
simplezhli Oct 16, 2022
113b278
device_info_plus 7.0.1
simplezhli Oct 23, 2022
538894f
device_info_plus 7.0.1
simplezhli Oct 23, 2022
520d6f2
flutter 3.3.7
simplezhli Nov 3, 2022
74dcf74
log打印优化
simplezhli Nov 5, 2022
699282d
lottie 2.0.0
simplezhli Nov 10, 2022
6860943
clean-up analysis_options.yaml
simplezhli Nov 26, 2022
4cf3203
vibration_web添加
simplezhli Dec 19, 2022
2ec062d
迁移至diox
simplezhli Dec 19, 2022
fa29906
webview_flutter升级至4.0.0
simplezhli Dec 23, 2022
bee192e
Enable depend_on_referenced_packages/sized_box_shrink_expand/use_colo…
simplezhli Jan 4, 2023
f9f00c6
ThemeData部分废弃属性迁移
simplezhli Jan 6, 2023
9b6bfa2
适配flutter 3.7.0
simplezhli Jan 25, 2023
f277a1b
flutter 3.7.0
simplezhli Jan 26, 2023
aa724d2
flutter 3.7.0
simplezhli Jan 26, 2023
d49ba45
集成测试失败修复
simplezhli Jan 26, 2023
e95a335
替换desktop_window插件为window_manager
simplezhli Feb 4, 2023
d3f1bdd
让Windows应用成为单实例
simplezhli Feb 11, 2023
f131a2f
dio 5.0.0
simplezhli Feb 14, 2023
ff118f7
依赖升级
simplezhli Feb 24, 2023
1109471
flutter 3.7.5
simplezhli Feb 26, 2023
35f35e5
依赖升级
simplezhli Mar 11, 2023
6e3fa4f
Enable implicit_call_tearoffs lint
simplezhli Mar 19, 2023
fd793cd
依赖升级
simplezhli Apr 4, 2023
96fcfcc
SearchBar改为MySearchBar,避免冲突
simplezhli Apr 28, 2023
a8bf023
compileSdkVersion升至33
simplezhli Apr 28, 2023
9eda809
适配flutter 3.10.0
simplezhli May 11, 2023
435adc3
适配flutter 3.10.0
simplezhli May 11, 2023
b1122b7
runZonedGuarded与WidgetsFlutterBinding.ensureInitialized异常修复
simplezhli May 13, 2023
acd8685
desktop更新
simplezhli May 13, 2023
5ea6231
适配Android 13
simplezhli May 14, 2023
6a30aca
fix CI
simplezhli May 14, 2023
6157863
fix CI
simplezhli May 14, 2023
abf3a3d
fix CI
simplezhli May 14, 2023
117c136
更新下载地址
simplezhli May 15, 2023
a1769c6
README-EN 更新
simplezhli May 21, 2023
0caae0a
dio升至5.2.0+1
simplezhli Jun 8, 2023
72256de
image_picker支持Windows、macOS
simplezhli Jun 11, 2023
8cc4f93
analysis_options 更新
simplezhli Jun 29, 2023
e0b2a77
依赖升级,替换敏感词
simplezhli Jul 19, 2023
21397f1
适配flutter 3.13.0
simplezhli Aug 17, 2023
33bf67a
Update README.md
simplezhli Aug 22, 2023
6222a3c
Merge branch 'master' of github.com:simplezhli/flutter_deer
simplezhli Aug 23, 2023
3f6325a
适配flutter 3.13.0
simplezhli Aug 23, 2023
b6c9f02
SliverMainAxisGroup替换flutter_sticky_headers |
simplezhli Aug 24, 2023
8439416
Enable literal_only_boolean_expressions
simplezhli Aug 27, 2023
179deee
依赖升级
simplezhli Sep 17, 2023
ed5c8c7
flutter 3.13.6
simplezhli Sep 29, 2023
0965780
失效图片更新
simplezhli Oct 1, 2023
2f1e023
尝试修复集成测试
simplezhli Oct 1, 2023
373c867
尝试修复iOS集成测试失败问题
simplezhli Oct 1, 2023
cbb4e1c
Enable strict-inference
simplezhli Nov 12, 2023
f49ad66
适配flutter 3.16.0
simplezhli Nov 16, 2023
333d690
适配flutter 3.16.0 PopScope部分实现回退
simplezhli Nov 18, 2023
511a193
适配flutter 3.16.0
simplezhli Nov 21, 2023
4d32f36
Release环境时不打印debugPrint内容
simplezhli Dec 4, 2023
9af6716
flutter 3.16.5
simplezhli Dec 24, 2023
374fe1a
IPHONEOS_DEPLOYMENT_TARGET 设为 12.0
simplezhli Jan 9, 2024
b48e8e1
README 更新
simplezhli Jan 22, 2024
9f0e812
地图JS API安全密钥使用
simplezhli Feb 2, 2024
5296982
Android导航栏颜色优化
simplezhli Feb 13, 2024
3ea0964
flutter 3.16.9
simplezhli Feb 15, 2024
bc28a97
flutter 3.19.0
simplezhli Feb 19, 2024
93c340e
Allow deprecated members
simplezhli Feb 19, 2024
575ad4d
依赖升级
simplezhli Mar 16, 2024
07bfe9b
依赖升级
simplezhli Mar 24, 2024
f1e6493
依赖升级
simplezhli Apr 26, 2024
5d0a867
Sync lints and enable annotate_redeclares
simplezhli May 14, 2024
63681d7
flutter 3.22.0
simplezhli May 15, 2024
dce1f5d
fix CI
simplezhli May 15, 2024
aae7c56
Update flutter-drive.yml
simplezhli May 17, 2024
9c01b2e
依赖升级
simplezhli Jun 16, 2024
ab09d91
依赖升级
simplezhli Jul 28, 2024
5991f10
flutter 3.24.0
simplezhli Aug 12, 2024
1c97a82
适配Android 14
simplezhli Aug 12, 2024
ea9f3a0
隐藏TabBar点击效果方法更新
simplezhli Sep 14, 2024
df174df
xcode 16.0
simplezhli Sep 21, 2024
1e09534
Enable invalid_runtime_check_with_js_interop_types
simplezhli Sep 28, 2024
e3ee1a3
适配AGP 8
simplezhli Nov 24, 2024
14fd76d
更新测试设备信息
simplezhli Nov 24, 2024
a04bcba
更新测试设备信息
simplezhli Nov 24, 2024
fecbf0d
更新测试设备信息
simplezhli Nov 24, 2024
cede8b6
更新测试设备信息
simplezhli Nov 24, 2024
5a45005
flutter 3.27.0
simplezhli Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
goods、order、home、login迁移完成
  • Loading branch information
simplezhli committed Apr 25, 2021
commit 0ed2baba72192791fd99486126c3c5ffb25cccec
11 changes: 11 additions & 0 deletions lib/demo/demo_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_deer/demo/focus/focus_demo_page.dart';
import 'package:flutter_deer/demo/lottie/lottie_demo.dart';
import 'package:flutter_deer/demo/navigator/books_main.dart';
Expand All @@ -20,6 +21,16 @@ class DemoPage extends StatefulWidget {
}

class _DemoPageState extends State<DemoPage> {

@override
void initState() {
super.initState();
WidgetsBinding.instance!.addPostFrameCallback((_) {
/// 显示状态栏和导航栏(使用QuickActions进入demo页)
SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top, SystemUiOverlay.bottom]);
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
10 changes: 10 additions & 0 deletions lib/generated/json/base/json_convert_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import 'package:flutter_deer/shop/models/user_entity.dart';
import 'package:flutter_deer/generated/json/user_entity_helper.dart';
import 'package:flutter_deer/account/models/city_entity.dart';
import 'package:flutter_deer/generated/json/city_entity_helper.dart';
import 'package:flutter_deer/goods/models/goods_sort_entity.dart';
import 'package:flutter_deer/generated/json/goods_sort_entity_helper.dart';
import 'package:flutter_deer/order/models/search_entity.dart';
import 'package:flutter_deer/generated/json/search_entity_helper.dart';

Expand All @@ -29,6 +31,8 @@ class JsonConvert<T> {
return userEntityFromJson(data as UserEntity, json) as T;
case CityEntity:
return cityEntityFromJson(data as CityEntity, json) as T;
case GoodsSortEntity:
return goodsSortEntityFromJson(data as GoodsSortEntity, json) as T;
case SearchEntity:
return searchEntityFromJson(data as SearchEntity, json) as T;
case SearchItems:
Expand All @@ -48,6 +52,8 @@ class JsonConvert<T> {
return userEntityToJson(data as UserEntity);
case CityEntity:
return cityEntityToJson(data as CityEntity);
case GoodsSortEntity:
return goodsSortEntityToJson(data as GoodsSortEntity);
case SearchEntity:
return searchEntityToJson(data as SearchEntity);
case SearchItems:
Expand All @@ -68,6 +74,8 @@ class JsonConvert<T> {
return UserEntity().fromJson(json);
} else if(type == (CityEntity).toString()){
return CityEntity().fromJson(json);
} else if(type == (GoodsSortEntity).toString()){
return GoodsSortEntity().fromJson(json);
} else if(type == (SearchEntity).toString()){
return SearchEntity().fromJson(json);
} else if(type == (SearchItems).toString()){
Expand All @@ -88,6 +96,8 @@ class JsonConvert<T> {
return data.map<UserEntity>((e) => UserEntity().fromJson(e)).toList() as M;
} else if(<CityEntity>[] is M){
return data.map<CityEntity>((e) => CityEntity().fromJson(e)).toList() as M;
} else if(<GoodsSortEntity>[] is M){
return data.map<GoodsSortEntity>((e) => GoodsSortEntity().fromJson(e)).toList() as M;
} else if(<SearchEntity>[] is M){
return data.map<SearchEntity>((e) => SearchEntity().fromJson(e)).toList() as M;
} else if(<SearchItems>[] is M){
Expand Down
18 changes: 18 additions & 0 deletions lib/generated/json/goods_sort_entity_helper.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import 'package:flutter_deer/goods/models/goods_sort_entity.dart';

goodsSortEntityFromJson(GoodsSortEntity data, Map<String, dynamic> json) {
if (json['id'] != null) {
data.id = json['id'].toString();
}
if (json['name'] != null) {
data.name = json['name'].toString();
}
return data;
}

Map<String, dynamic> goodsSortEntityToJson(GoodsSortEntity entity) {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = entity.id;
data['name'] = entity.name;
return data;
}
3 changes: 1 addition & 2 deletions lib/goods/goods_router.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @dart=2.9

import 'package:common_utils/common_utils.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter_deer/goods/page/qr_code_scanner_page.dart';
Expand All @@ -10,7 +10,6 @@ import 'page/goods_search_page.dart';
import 'page/goods_size_edit_page.dart';
import 'page/goods_size_page.dart';


class GoodsRouter implements IRouterProvider{

static String goodsPage = '/goods';
Expand Down
6 changes: 6 additions & 0 deletions lib/goods/models/goods_sort_entity.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'package:flutter_deer/generated/json/base/json_convert_content.dart';

class GoodsSortEntity with JsonConvert<GoodsSortEntity> {
late String id;
late String name;
}
13 changes: 6 additions & 7 deletions lib/goods/page/goods_edit_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @dart=2.9
import 'package:flutter/material.dart';
import 'package:flutter_deer/goods/provider/goods_sort_provider.dart';
import 'package:flutter_deer/goods/widgets/goods_sort_bottom_sheet.dart';
Expand All @@ -21,7 +20,7 @@ import '../goods_router.dart';
class GoodsEditPage extends StatefulWidget {

const GoodsEditPage({
Key key,
Key? key,
this.isAdd = true,
this.isScan = false,
this.heroTag,
Expand All @@ -30,22 +29,22 @@ class GoodsEditPage extends StatefulWidget {

final bool isAdd;
final bool isScan;
final String heroTag;
final String goodsImageUrl;
final String? heroTag;
final String? goodsImageUrl;

@override
_GoodsEditPageState createState() => _GoodsEditPageState();
}

class _GoodsEditPageState extends State<GoodsEditPage> {

String _goodsSortName;
String? _goodsSortName;
final TextEditingController _codeController = TextEditingController();

@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
WidgetsBinding.instance!.addPostFrameCallback((_) {
if (widget.isScan) {
_scan();
}
Expand Down Expand Up @@ -92,7 +91,7 @@ class _GoodsEditPageState extends State<GoodsEditPage> {
Center(
child: Text(
'点击添加商品图片',
style: Theme.of(context).textTheme.subtitle2.copyWith(fontSize: Dimens.font_sp14),
style: Theme.of(context).textTheme.subtitle2?.copyWith(fontSize: Dimens.font_sp14),
),
),
Gaps.vGap16,
Expand Down
12 changes: 5 additions & 7 deletions lib/goods/page/goods_list_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// @dart=2.9

import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_deer/goods/models/goods_item_entity.dart';
Expand All @@ -17,8 +15,8 @@ import '../widgets/goods_item.dart';
class GoodsListPage extends StatefulWidget {

const GoodsListPage({
Key key,
@required this.index
Key? key,
required this.index
}): super(key: key);

final int index;
Expand All @@ -30,8 +28,8 @@ class GoodsListPage extends StatefulWidget {
class _GoodsListPageState extends State<GoodsListPage> with AutomaticKeepAliveClientMixin<GoodsListPage>, SingleTickerProviderStateMixin {

int _selectIndex = -1;
Animation<double> _animation;
AnimationController _controller;
late Animation<double> _animation;
late AnimationController _controller;
List<GoodsItemEntity> _list = [];
AnimationStatus _animationStatus = AnimationStatus.dismissed;

Expand Down Expand Up @@ -96,7 +94,7 @@ class _GoodsListPageState extends State<GoodsListPage> with AutomaticKeepAliveCl
}

int _page = 1;
int _maxPage;
late int _maxPage;
StateType _stateType = StateType.loading;

@override
Expand Down
17 changes: 8 additions & 9 deletions lib/goods/page/goods_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @dart=2.9
import 'package:flutter/material.dart';
import 'package:flutter_deer/goods/goods_router.dart';
import 'package:flutter_deer/goods/page/goods_list_page.dart';
Expand All @@ -17,7 +16,7 @@ import 'package:provider/provider.dart';
/// design/4商品/index.html
class GoodsPage extends StatefulWidget {

const GoodsPage({Key key}) : super(key: key);
const GoodsPage({Key? key}) : super(key: key);

@override
_GoodsPageState createState() => _GoodsPageState();
Expand All @@ -26,7 +25,7 @@ class GoodsPage extends StatefulWidget {
class _GoodsPageState extends State<GoodsPage> with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {

final List<String> _sortList = ['全部商品', '个人护理', '饮料', '沐浴洗护', '厨房用具', '休闲食品', '生鲜水果', '酒水', '家庭清洁'];
TabController _tabController;
TabController? _tabController;
final PageController _pageController = PageController(initialPage: 0);

final GlobalKey _addKey = GlobalKey();
Expand All @@ -43,14 +42,14 @@ class _GoodsPageState extends State<GoodsPage> with SingleTickerProviderStateMix

@override
void dispose() {
_tabController.dispose();
_tabController?.dispose();
super.dispose();
}

@override
Widget build(BuildContext context) {
super.build(context);
final Color _iconColor = ThemeUtils.getIconColor(context);
final Color? _iconColor = ThemeUtils.getIconColor(context);
return ChangeNotifierProvider<GoodsPageProvider>(
create: (_) => provider,
child: Scaffold(
Expand Down Expand Up @@ -158,15 +157,15 @@ class _GoodsPageState extends State<GoodsPage> with SingleTickerProviderStateMix
}

void _onPageChange(int index) {
_tabController.animateTo(index);
_tabController?.animateTo(index);
provider.setIndex(index);
}

/// design/4商品/index.html#artboard3
void _showSortMenu() {
// 获取点击控件的坐标
final RenderBox button = _buttonKey.currentContext.findRenderObject() as RenderBox;
final RenderBox body = _bodyKey.currentContext.findRenderObject() as RenderBox;
final RenderBox button = _buttonKey.currentContext!.findRenderObject()! as RenderBox;
final RenderBox body = _bodyKey.currentContext!.findRenderObject()! as RenderBox;

showPopupWindow<void>(
context: context,
Expand All @@ -187,7 +186,7 @@ class _GoodsPageState extends State<GoodsPage> with SingleTickerProviderStateMix

/// design/4商品/index.html#artboard4
void _showAddMenu() {
final RenderBox button = _addKey.currentContext.findRenderObject() as RenderBox;
final RenderBox button = _addKey.currentContext!.findRenderObject()! as RenderBox;

showPopupWindow<void>(
context: context,
Expand Down
3 changes: 1 addition & 2 deletions lib/goods/page/goods_search_page.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// @dart=2.9

import 'package:flutter/material.dart';
import 'package:flutter_deer/util/toast_utils.dart';
import 'package:flutter_deer/widgets/search_bar.dart';

class GoodsSearchPage extends StatefulWidget {

const GoodsSearchPage({Key key}) : super(key: key);
const GoodsSearchPage({Key? key}) : super(key: key);

@override
_GoodsSearchPageState createState() => _GoodsSearchPageState();
Expand Down
5 changes: 2 additions & 3 deletions lib/goods/page/goods_size_edit_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @dart=2.9
import 'package:flutter/material.dart';
import 'package:flutter_deer/routers/fluro_navigator.dart';
import 'package:flutter_deer/widgets/my_button.dart';
Expand All @@ -11,7 +10,7 @@ import 'package:flutter_deer/widgets/my_app_bar.dart';
/// design/4商品/index.html#artboard14
class GoodsSizeEditPage extends StatefulWidget {

const GoodsSizeEditPage({Key key}) : super(key: key);
const GoodsSizeEditPage({Key? key}) : super(key: key);

@override
_GoodsSizeEditPageState createState() => _GoodsSizeEditPageState();
Expand Down Expand Up @@ -43,7 +42,7 @@ class _GoodsSizeEditPageState extends State<GoodsSizeEditPage> {
Center(
child: Text(
'点击添加分类图片',
style: Theme.of(context).textTheme.subtitle2.copyWith(fontSize: Dimens.font_sp14),
style: Theme.of(context).textTheme.subtitle2?.copyWith(fontSize: Dimens.font_sp14),
),
),
Gaps.vGap16,
Expand Down
11 changes: 5 additions & 6 deletions lib/goods/page/goods_size_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @dart=2.9
import 'package:flutter/material.dart';
import 'package:flutter_deer/goods/models/goods_size_model.dart';
import 'package:flutter_deer/goods/widgets/goods_size_dialog.dart';
Expand All @@ -19,7 +18,7 @@ import '../goods_router.dart';
/// design/4商品/index.html#artboard9
class GoodsSizePage extends StatefulWidget {

const GoodsSizePage({Key key}) : super(key: key);
const GoodsSizePage({Key? key}) : super(key: key);

@override
_GoodsSizePageState createState() => _GoodsSizePageState();
Expand Down Expand Up @@ -48,14 +47,14 @@ class _GoodsSizePageState extends State<GoodsSizePage> {
_goodsSizeList.add(GoodsSizeModel('goods/goods_size_1', '黑色3', 10, '50.0', 2, '2', '2.5', ''));

// 获取Build完成状态监听
WidgetsBinding.instance.addPostFrameCallback((_) {
WidgetsBinding.instance!.addPostFrameCallback((_) {
_showHint();
});
}

/// design/4商品/index.html#artboard18
void _showHint() {
final RenderBox hint = _hintKey.currentContext.findRenderObject() as RenderBox;
final RenderBox hint = _hintKey.currentContext!.findRenderObject()! as RenderBox;
showPopupWindow<void>(
context: context,
isShowBg: true,
Expand Down Expand Up @@ -125,7 +124,7 @@ class _GoodsSizePageState extends State<GoodsSizePage> {
key: const Key('name_edit'),
text: TextSpan(
text: '先对名称进行',
style: Theme.of(context).textTheme.subtitle2.copyWith(fontSize: Dimens.font_sp14),
style: Theme.of(context).textTheme.subtitle2?.copyWith(fontSize: Dimens.font_sp14),
children: <TextSpan>[
TextSpan(text: '编辑', style: TextStyle(color: Theme.of(context).primaryColor)),
],
Expand Down Expand Up @@ -226,7 +225,7 @@ class _GoodsSizePageState extends State<GoodsSizePage> {
onTap: () {
/// 如果侧滑菜单打开,关闭侧滑菜单。否则跳转
if (_slidableController.activeState != null) {
_slidableController.activeState.close();
_slidableController.activeState!.close();
} else {
NavigatorUtils.push(context, GoodsRouter.goodsSizeEditPage);
}
Expand Down
Loading