提交 0866e6be authored 作者: 张国庆's avatar 张国庆

Merge remote-tracking branch 'origin/v1.0.0' into v1.0.0

import 'package:flutter/material.dart';
/// 水平间隔
const Widget hGap1 = SizedBox(width: 1.0);
const Widget hGap2 = SizedBox(width: 2.0);
const Widget hGap3 = SizedBox(width: 3.0);
const Widget hGap4 = SizedBox(width: 4.0);
const Widget hGap5 = SizedBox(width: 5.0);
const Widget hGap6 = SizedBox(width: 6.0);
const Widget hGap7 = SizedBox(width: 7.0);
const Widget hGap8 = SizedBox(width: 8.0);
const Widget hGap9 = SizedBox(width: 9.0);
const Widget hGap10 = SizedBox(width: 10.0);
const Widget hGap11 = SizedBox(width: 11.0);
const Widget hGap12 = SizedBox(width: 12.0);
const Widget hGap13 = SizedBox(width: 13.0);
const Widget hGap14 = SizedBox(width: 14.0);
const Widget hGap15 = SizedBox(width: 15.0);
const Widget hGap16 = SizedBox(width: 16.0);
const Widget hGap17 = SizedBox(width: 17.0);
const Widget hGap18 = SizedBox(width: 18.0);
const Widget hGap19 = SizedBox(width: 19.0);
const Widget hGap20 = SizedBox(width: 20.0);
const Widget hGap21 = SizedBox(width: 21.0);
const Widget hGap22 = SizedBox(width: 22.0);
const Widget hGap23 = SizedBox(width: 23.0);
const Widget hGap24 = SizedBox(width: 24.0);
const Widget hGap25 = SizedBox(width: 25.0);
const Widget hGap30 = SizedBox(width: 30.0);
const Widget hGap32 = SizedBox(width: 32.0);
const Widget hGap35 = SizedBox(width: 35.0);
const Widget hGap40 = SizedBox(width: 40.0);
const Widget hGap45 = SizedBox(width: 45.0);
const Widget hGap50 = SizedBox(width: 50.0);
const Widget hGap55 = SizedBox(width: 55.0);
const Widget hGap60 = SizedBox(width: 60.0);
const Widget hGap65 = SizedBox(width: 65.0);
const Widget hGap110 = SizedBox(width: 110.0);
......@@ -34,10 +53,23 @@ const Widget vGap24 = SizedBox(height: 24.0);
const Widget vGap25 = SizedBox(height: 25.0);
const Widget vGap30 = SizedBox(height: 30.0);
const Widget vGap32 = SizedBox(height: 32.0);
const Widget vGap35 = SizedBox(height: 35.0);
const Widget vGap40 = SizedBox(height: 40.0);
const Widget vGap50 = SizedBox(height: 50.0);
const Widget vGap55 = SizedBox(height: 55.0);
const Widget vGap60 = SizedBox(height: 60.0);
const Widget vGap65 = SizedBox(height: 65.0);
const Widget vGap70 = SizedBox(height: 70.0);
const Widget vGap75 = SizedBox(height: 75.0);
const Widget vGap80 = SizedBox(height: 80.0);
const Widget vGap85 = SizedBox(height: 85.0);
const Widget vGap90 = SizedBox(height: 90.0);
const Widget vGap95 = SizedBox(height: 95.0);
const Widget vGap100 = SizedBox(height: 100.0);
const Widget vGap110 = SizedBox(height: 110.0);
const Widget vGap120 = SizedBox(height: 120.0);
const Widget vGap130 = SizedBox(height: 130.0);
const Widget vGap140 = SizedBox(height: 140.0);
const Widget vGap150 = SizedBox(height: 150.0);
Widget line({height = 1.0, Color? color}) =>
......
......@@ -2,9 +2,9 @@ import 'package:flutter_clx_base/utils/log_utils.dart';
import 'package:get/get.dart';
S? findOtherLogic<S>() {
if (Get.isRegistered<S>()) {
return Get.find<S>();
S? findOtherLogic<S>({String? tag}) {
if (Get.isRegistered<S>(tag: tag)) {
return Get.find<S>(tag: tag);
}
return null;
}
......
......@@ -181,7 +181,9 @@ class _MyListViewPublicState extends State<MyListViewPublic> {
stateType = StateType.success; //显示成功布局
}
_isLoading = false;
setState(() {});
if (mounted) {
setState(() {});
}
}
void _requestError(r,s) {
......@@ -204,7 +206,7 @@ class _MyListViewPublicState extends State<MyListViewPublic> {
}
class MyListController {
late _MyListViewPublicState _deerListViewState;
_MyListViewPublicState? _deerListViewState;
// 绑定状态
void _bindEasyRefreshState(_MyListViewPublicState state) {
......@@ -213,17 +215,17 @@ class MyListController {
//刷新
void callRefresh() {
_deerListViewState.callRefresh();
_deerListViewState?.callRefresh();
}
// 移除数据
void removeItem(index) {
return _deerListViewState.removeItem(index);
return _deerListViewState?.removeItem(index);
}
// 刷新单个数据
void notifySingleItem(index, beanJson) {
return _deerListViewState.notifySingleItem(index, beanJson);
return _deerListViewState?.notifySingleItem(index, beanJson);
}
}
......
......@@ -14,6 +14,7 @@ class MyScaffold extends StatelessWidget {
final Widget? bottomButton;
final CrossAxisAlignment crossAxisAlignment;
final KeyboardActionsConfig? keyboardConfig;
final Widget? floatingActionButton;
const MyScaffold({
Key? key,
......@@ -26,6 +27,7 @@ class MyScaffold extends StatelessWidget {
this.bottomButton,
this.crossAxisAlignment = CrossAxisAlignment.start,
this.keyboardConfig,
this.floatingActionButton,
}) : super(key: key);
@override
......@@ -41,6 +43,7 @@ class MyScaffold extends StatelessWidget {
keyboardConfig: keyboardConfig,
children: children ?? [],
),
floatingActionButton: floatingActionButton,
);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论