Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
F
flutter_clx_base
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
flutter_clx_base
Commits
0866e6be
提交
0866e6be
authored
12月 26, 2022
作者:
张国庆
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/v1.0.0' into v1.0.0
上级
1ca58a75
41ce9d68
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
45 行增加
和
8 行删除
+45
-8
gaps.dart
lib/common/gaps.dart
+32
-0
common_utils.dart
lib/utils/common_utils.dart
+3
-3
my_refresh_list_public.dart
lib/widget/my_refresh_list_public.dart
+7
-5
my_scaffold.dart
lib/widget/my_scaffold.dart
+3
-0
没有找到文件。
lib/common/gaps.dart
浏览文件 @
0866e6be
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
/// 水平间隔
/// 水平间隔
const
Widget
hGap1
=
SizedBox
(
width:
1.0
);
const
Widget
hGap2
=
SizedBox
(
width:
2.0
);
const
Widget
hGap2
=
SizedBox
(
width:
2.0
);
const
Widget
hGap3
=
SizedBox
(
width:
3.0
);
const
Widget
hGap4
=
SizedBox
(
width:
4.0
);
const
Widget
hGap4
=
SizedBox
(
width:
4.0
);
const
Widget
hGap5
=
SizedBox
(
width:
5.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
hGap8
=
SizedBox
(
width:
8.0
);
const
Widget
hGap9
=
SizedBox
(
width:
9.0
);
const
Widget
hGap10
=
SizedBox
(
width:
10.0
);
const
Widget
hGap10
=
SizedBox
(
width:
10.0
);
const
Widget
hGap11
=
SizedBox
(
width:
11.0
);
const
Widget
hGap12
=
SizedBox
(
width:
12.0
);
const
Widget
hGap12
=
SizedBox
(
width:
12.0
);
const
Widget
hGap13
=
SizedBox
(
width:
13.0
);
const
Widget
hGap14
=
SizedBox
(
width:
14.0
);
const
Widget
hGap14
=
SizedBox
(
width:
14.0
);
const
Widget
hGap15
=
SizedBox
(
width:
15.0
);
const
Widget
hGap15
=
SizedBox
(
width:
15.0
);
const
Widget
hGap16
=
SizedBox
(
width:
16.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
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
hGap32
=
SizedBox
(
width:
32.0
);
const
Widget
hGap35
=
SizedBox
(
width:
35.0
);
const
Widget
hGap40
=
SizedBox
(
width:
40.0
);
const
Widget
hGap40
=
SizedBox
(
width:
40.0
);
const
Widget
hGap45
=
SizedBox
(
width:
45.0
);
const
Widget
hGap50
=
SizedBox
(
width:
50.0
);
const
Widget
hGap50
=
SizedBox
(
width:
50.0
);
const
Widget
hGap55
=
SizedBox
(
width:
55.0
);
const
Widget
hGap60
=
SizedBox
(
width:
60.0
);
const
Widget
hGap60
=
SizedBox
(
width:
60.0
);
const
Widget
hGap65
=
SizedBox
(
width:
65.0
);
const
Widget
hGap65
=
SizedBox
(
width:
65.0
);
const
Widget
hGap110
=
SizedBox
(
width:
110.0
);
const
Widget
hGap110
=
SizedBox
(
width:
110.0
);
...
@@ -34,10 +53,23 @@ const Widget vGap24 = SizedBox(height: 24.0);
...
@@ -34,10 +53,23 @@ const Widget vGap24 = SizedBox(height: 24.0);
const
Widget
vGap25
=
SizedBox
(
height:
25.0
);
const
Widget
vGap25
=
SizedBox
(
height:
25.0
);
const
Widget
vGap30
=
SizedBox
(
height:
30.0
);
const
Widget
vGap30
=
SizedBox
(
height:
30.0
);
const
Widget
vGap32
=
SizedBox
(
height:
32.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
vGap50
=
SizedBox
(
height:
50.0
);
const
Widget
vGap55
=
SizedBox
(
height:
55.0
);
const
Widget
vGap60
=
SizedBox
(
height:
60.0
);
const
Widget
vGap60
=
SizedBox
(
height:
60.0
);
const
Widget
vGap65
=
SizedBox
(
height:
65.0
);
const
Widget
vGap70
=
SizedBox
(
height:
70.0
);
const
Widget
vGap70
=
SizedBox
(
height:
70.0
);
const
Widget
vGap75
=
SizedBox
(
height:
75.0
);
const
Widget
vGap80
=
SizedBox
(
height:
80.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
);
const
Widget
vGap150
=
SizedBox
(
height:
150.0
);
Widget
line
(
{
height
=
1.0
,
Color
?
color
})
=>
Widget
line
(
{
height
=
1.0
,
Color
?
color
})
=>
...
...
lib/utils/common_utils.dart
浏览文件 @
0866e6be
...
@@ -2,9 +2,9 @@ import 'package:flutter_clx_base/utils/log_utils.dart';
...
@@ -2,9 +2,9 @@ import 'package:flutter_clx_base/utils/log_utils.dart';
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
S
?
findOtherLogic
<
S
>()
{
S
?
findOtherLogic
<
S
>(
{
String
?
tag
}
)
{
if
(
Get
.
isRegistered
<
S
>())
{
if
(
Get
.
isRegistered
<
S
>(
tag:
tag
))
{
return
Get
.
find
<
S
>();
return
Get
.
find
<
S
>(
tag:
tag
);
}
}
return
null
;
return
null
;
}
}
...
...
lib/widget/my_refresh_list_public.dart
浏览文件 @
0866e6be
...
@@ -181,7 +181,9 @@ class _MyListViewPublicState extends State<MyListViewPublic> {
...
@@ -181,7 +181,9 @@ class _MyListViewPublicState extends State<MyListViewPublic> {
stateType
=
StateType
.
success
;
//显示成功布局
stateType
=
StateType
.
success
;
//显示成功布局
}
}
_isLoading
=
false
;
_isLoading
=
false
;
setState
(()
{});
if
(
mounted
)
{
setState
(()
{});
}
}
}
void
_requestError
(
r
,
s
)
{
void
_requestError
(
r
,
s
)
{
...
@@ -204,7 +206,7 @@ class _MyListViewPublicState extends State<MyListViewPublic> {
...
@@ -204,7 +206,7 @@ class _MyListViewPublicState extends State<MyListViewPublic> {
}
}
class
MyListController
{
class
MyListController
{
late
_MyListViewPublicState
_deerListViewState
;
_MyListViewPublicState
?
_deerListViewState
;
// 绑定状态
// 绑定状态
void
_bindEasyRefreshState
(
_MyListViewPublicState
state
)
{
void
_bindEasyRefreshState
(
_MyListViewPublicState
state
)
{
...
@@ -213,17 +215,17 @@ class MyListController {
...
@@ -213,17 +215,17 @@ class MyListController {
//刷新
//刷新
void
callRefresh
()
{
void
callRefresh
()
{
_deerListViewState
.
callRefresh
();
_deerListViewState
?
.
callRefresh
();
}
}
// 移除数据
// 移除数据
void
removeItem
(
index
)
{
void
removeItem
(
index
)
{
return
_deerListViewState
.
removeItem
(
index
);
return
_deerListViewState
?
.
removeItem
(
index
);
}
}
// 刷新单个数据
// 刷新单个数据
void
notifySingleItem
(
index
,
beanJson
)
{
void
notifySingleItem
(
index
,
beanJson
)
{
return
_deerListViewState
.
notifySingleItem
(
index
,
beanJson
);
return
_deerListViewState
?
.
notifySingleItem
(
index
,
beanJson
);
}
}
}
}
...
...
lib/widget/my_scaffold.dart
浏览文件 @
0866e6be
...
@@ -14,6 +14,7 @@ class MyScaffold extends StatelessWidget {
...
@@ -14,6 +14,7 @@ class MyScaffold extends StatelessWidget {
final
Widget
?
bottomButton
;
final
Widget
?
bottomButton
;
final
CrossAxisAlignment
crossAxisAlignment
;
final
CrossAxisAlignment
crossAxisAlignment
;
final
KeyboardActionsConfig
?
keyboardConfig
;
final
KeyboardActionsConfig
?
keyboardConfig
;
final
Widget
?
floatingActionButton
;
const
MyScaffold
({
const
MyScaffold
({
Key
?
key
,
Key
?
key
,
...
@@ -26,6 +27,7 @@ class MyScaffold extends StatelessWidget {
...
@@ -26,6 +27,7 @@ class MyScaffold extends StatelessWidget {
this
.
bottomButton
,
this
.
bottomButton
,
this
.
crossAxisAlignment
=
CrossAxisAlignment
.
start
,
this
.
crossAxisAlignment
=
CrossAxisAlignment
.
start
,
this
.
keyboardConfig
,
this
.
keyboardConfig
,
this
.
floatingActionButton
,
})
:
super
(
key:
key
);
})
:
super
(
key:
key
);
@override
@override
...
@@ -41,6 +43,7 @@ class MyScaffold extends StatelessWidget {
...
@@ -41,6 +43,7 @@ class MyScaffold extends StatelessWidget {
keyboardConfig:
keyboardConfig
,
keyboardConfig:
keyboardConfig
,
children:
children
??
[],
children:
children
??
[],
),
),
floatingActionButton:
floatingActionButton
,
);
);
}
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论