mirror of
https://github.com/asjqkkkk/flutter-todos.git
synced 2025-08-06 14:19:24 +08:00
改一改样式
This commit is contained in:
@ -294,6 +294,7 @@ class DemoLocalizations {
|
|||||||
|
|
||||||
|
|
||||||
String get loadingEmpty => Intl.message('nothing at all', name: 'loadingEmpty', desc: '什么都没有哦',);
|
String get loadingEmpty => Intl.message('nothing at all', name: 'loadingEmpty', desc: '什么都没有哦',);
|
||||||
|
String get loadingIdle => Intl.message('...', name: 'loadingIdle', desc: '......',);
|
||||||
String get loadingError => Intl.message('loading error', name: 'loadingError', desc: '加载出错了',);
|
String get loadingError => Intl.message('loading error', name: 'loadingError', desc: '加载出错了',);
|
||||||
String get loading => Intl.message('loading...', name: 'loading', desc: '加载中...',);
|
String get loading => Intl.message('loading...', name: 'loading', desc: '加载中...',);
|
||||||
String get pullUpToLoadMore => Intl.message('pull up load more', name: 'pullUpToLoadMore', desc: '上拉加载更多',);
|
String get pullUpToLoadMore => Intl.message('pull up load more', name: 'pullUpToLoadMore', desc: '上拉加载更多',);
|
||||||
|
@ -87,6 +87,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"loading" : MessageLookupByLibrary.simpleMessage("loading..."),
|
"loading" : MessageLookupByLibrary.simpleMessage("loading..."),
|
||||||
"loadingEmpty" : MessageLookupByLibrary.simpleMessage("nothing at all"),
|
"loadingEmpty" : MessageLookupByLibrary.simpleMessage("nothing at all"),
|
||||||
"loadingError" : MessageLookupByLibrary.simpleMessage("loading error"),
|
"loadingError" : MessageLookupByLibrary.simpleMessage("loading error"),
|
||||||
|
"loadingIdle" : MessageLookupByLibrary.simpleMessage("......"),
|
||||||
"meteorShower" : MessageLookupByLibrary.simpleMessage("Meteor Shower"),
|
"meteorShower" : MessageLookupByLibrary.simpleMessage("Meteor Shower"),
|
||||||
"music" : MessageLookupByLibrary.simpleMessage("Music"),
|
"music" : MessageLookupByLibrary.simpleMessage("Music"),
|
||||||
"navigatorSetting" : MessageLookupByLibrary.simpleMessage("Navigator Setting"),
|
"navigatorSetting" : MessageLookupByLibrary.simpleMessage("Navigator Setting"),
|
||||||
|
@ -87,6 +87,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"loading" : MessageLookupByLibrary.simpleMessage("加载中..."),
|
"loading" : MessageLookupByLibrary.simpleMessage("加载中..."),
|
||||||
"loadingEmpty" : MessageLookupByLibrary.simpleMessage("什么都没有哦"),
|
"loadingEmpty" : MessageLookupByLibrary.simpleMessage("什么都没有哦"),
|
||||||
"loadingError" : MessageLookupByLibrary.simpleMessage("加载出错了"),
|
"loadingError" : MessageLookupByLibrary.simpleMessage("加载出错了"),
|
||||||
|
"loadingIdle" : MessageLookupByLibrary.simpleMessage("......"),
|
||||||
"meteorShower" : MessageLookupByLibrary.simpleMessage("天体流星"),
|
"meteorShower" : MessageLookupByLibrary.simpleMessage("天体流星"),
|
||||||
"music" : MessageLookupByLibrary.simpleMessage("听歌"),
|
"music" : MessageLookupByLibrary.simpleMessage("听歌"),
|
||||||
"navigatorSetting" : MessageLookupByLibrary.simpleMessage("导航栏设置"),
|
"navigatorSetting" : MessageLookupByLibrary.simpleMessage("导航栏设置"),
|
||||||
|
@ -33,6 +33,7 @@ class EditTaskPage extends StatelessWidget {
|
|||||||
final iconData = IconBean.fromBean(taskIconBean.iconBean);
|
final iconData = IconBean.fromBean(taskIconBean.iconBean);
|
||||||
final bgColor = globalModel.logic.getBgInDark();
|
final bgColor = globalModel.logic.getBgInDark();
|
||||||
final textColor = globalModel.logic.isDarkNow() ? Color.fromRGBO(130, 130, 130, 1) : Colors.black;
|
final textColor = globalModel.logic.isDarkNow() ? Color.fromRGBO(130, 130, 130, 1) : Colors.black;
|
||||||
|
final hintTextColor = globalModel.logic.isDarkNow() ? Color.fromRGBO(130, 130, 130, 1) : Colors.grey;
|
||||||
|
|
||||||
|
|
||||||
// model.logic.scrollToEndWhenEdit();
|
// model.logic.scrollToEndWhenEdit();
|
||||||
@ -69,7 +70,7 @@ class EditTaskPage extends StatelessWidget {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintText: model.logic.getHintTitle(),
|
hintText: model.logic.getHintTitle(),
|
||||||
hintStyle: TextStyle(color: textColor),
|
hintStyle: TextStyle(color: hintTextColor),
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
@ -179,7 +180,7 @@ class EditTaskPage extends StatelessWidget {
|
|||||||
hintText: DemoLocalizations.of(context).addTask,
|
hintText: DemoLocalizations.of(context).addTask,
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: textColor,
|
color: hintTextColor,
|
||||||
),
|
),
|
||||||
prefixIcon: Icon(
|
prefixIcon: Icon(
|
||||||
iconData,
|
iconData,
|
||||||
|
@ -58,6 +58,7 @@ class SearchPage extends StatelessWidget {
|
|||||||
? LoadingWidget(
|
? LoadingWidget(
|
||||||
flag: model.loadingFlag,
|
flag: model.loadingFlag,
|
||||||
progressColor: bgColor,
|
progressColor: bgColor,
|
||||||
|
textColor: globalModel.logic.getWhiteInDark(),
|
||||||
)
|
)
|
||||||
: GridView.count(
|
: GridView.count(
|
||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
|
@ -6,9 +6,7 @@ import 'package:todo_list/items/task_detail_item.dart';
|
|||||||
import 'package:todo_list/json/task_bean.dart';
|
import 'package:todo_list/json/task_bean.dart';
|
||||||
import 'package:todo_list/json/task_icon_bean.dart';
|
import 'package:todo_list/json/task_icon_bean.dart';
|
||||||
import 'package:todo_list/model/global_model.dart';
|
import 'package:todo_list/model/global_model.dart';
|
||||||
import 'package:todo_list/model/main_page_model.dart';
|
|
||||||
import 'package:todo_list/model/task_detail_page_model.dart';
|
import 'package:todo_list/model/task_detail_page_model.dart';
|
||||||
import 'package:todo_list/utils/theme_util.dart';
|
|
||||||
import 'package:todo_list/widgets/popmenu_botton.dart';
|
import 'package:todo_list/widgets/popmenu_botton.dart';
|
||||||
import 'package:todo_list/widgets/task_info_widget.dart';
|
import 'package:todo_list/widgets/task_info_widget.dart';
|
||||||
|
|
||||||
@ -68,19 +66,23 @@ class TaskDetailPage extends StatelessWidget {
|
|||||||
))),
|
))),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: Column(
|
//使用NotificationListener可以去掉android上默认Listview的水波纹效果
|
||||||
children: <Widget>[
|
body: NotificationListener<OverscrollIndicatorNotification>(
|
||||||
Container(
|
onNotification: (overScroll) {
|
||||||
margin: EdgeInsets.only(left: 50, top: 20, right: 50),
|
overScroll.disallowGlow();
|
||||||
child: TaskInfoWidget(
|
},
|
||||||
index,
|
child: ListView(
|
||||||
taskBean: model.taskBean,
|
children: <Widget>[
|
||||||
isCardChangeWithBg: globalModel.isCardChangeWithBg,
|
Container(
|
||||||
isExisting: model.isExiting,
|
margin: EdgeInsets.only(left: 50, top: 20, right: 50),
|
||||||
|
child: TaskInfoWidget(
|
||||||
|
index,
|
||||||
|
taskBean: model.taskBean,
|
||||||
|
isCardChangeWithBg: globalModel.isCardChangeWithBg,
|
||||||
|
isExisting: model.isExiting,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
Container(
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(top: 20),
|
margin: EdgeInsets.only(top: 20),
|
||||||
child: !model.isExiting
|
child: !model.isExiting
|
||||||
? NotificationListener<OverscrollIndicatorNotification>(
|
? NotificationListener<OverscrollIndicatorNotification>(
|
||||||
@ -88,6 +90,8 @@ class TaskDetailPage extends StatelessWidget {
|
|||||||
overScroll.disallowGlow();
|
overScroll.disallowGlow();
|
||||||
},
|
},
|
||||||
child: ListView(
|
child: ListView(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
children: List.generate(
|
children: List.generate(
|
||||||
model?.taskBean?.detailList?.length ?? 0,
|
model?.taskBean?.detailList?.length ?? 0,
|
||||||
(index) {
|
(index) {
|
||||||
@ -129,9 +133,9 @@ class TaskDetailPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
))
|
))
|
||||||
: SizedBox(),
|
: SizedBox(),
|
||||||
),
|
)
|
||||||
)
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -9,6 +9,7 @@ class LoadingWidget extends StatelessWidget {
|
|||||||
final String loadingText;
|
final String loadingText;
|
||||||
final String emptyText;
|
final String emptyText;
|
||||||
final String errorText;
|
final String errorText;
|
||||||
|
final String idleText;
|
||||||
final LoadingFlag flag;
|
final LoadingFlag flag;
|
||||||
final VoidCallback errorCallBack;
|
final VoidCallback errorCallBack;
|
||||||
final Widget successWidget;
|
final Widget successWidget;
|
||||||
@ -22,7 +23,7 @@ class LoadingWidget extends StatelessWidget {
|
|||||||
this.flag = LoadingFlag.loading,
|
this.flag = LoadingFlag.loading,
|
||||||
this.errorCallBack,
|
this.errorCallBack,
|
||||||
this.emptyText,
|
this.emptyText,
|
||||||
this.errorText, this.size = 100, this.successWidget});
|
this.errorText, this.size = 100, this.successWidget, this.idleText});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -108,12 +109,23 @@ class LoadingWidget extends StatelessWidget {
|
|||||||
|
|
||||||
case LoadingFlag.idle:
|
case LoadingFlag.idle:
|
||||||
return Center(
|
return Center(
|
||||||
child: SvgPicture.asset(
|
child: Column(
|
||||||
"svgs/idle.svg",
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
color: progressColor ?? primaryColor,
|
children: <Widget>[
|
||||||
width: size,
|
SvgPicture.asset(
|
||||||
height: size,
|
"svgs/idle.svg",
|
||||||
semanticsLabel: 'idle',
|
color: progressColor ?? primaryColor,
|
||||||
|
width: size,
|
||||||
|
height: size,
|
||||||
|
semanticsLabel: 'idle',
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
idleText ?? DemoLocalizations.of(context).loadingIdle,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: textSize ?? size / 5, color: textColor ?? primaryColor),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
@ -581,6 +581,12 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
|
"loadingIdle": "......",
|
||||||
|
"@loadingIdle": {
|
||||||
|
"description": "......",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
"loadingError": "loading error",
|
"loadingError": "loading error",
|
||||||
"@loadingError": {
|
"@loadingError": {
|
||||||
"description": "加载出错了",
|
"description": "加载出错了",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"@@last_modified": "2019-07-25T17:55:44.478744",
|
"@@last_modified": "2019-07-26T16:49:38.161457",
|
||||||
"appName": "One Day List",
|
"appName": "One Day List",
|
||||||
"@appName": {
|
"@appName": {
|
||||||
"description": "app的名字",
|
"description": "app的名字",
|
||||||
@ -580,6 +580,12 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
|
"loadingIdle": "...",
|
||||||
|
"@loadingIdle": {
|
||||||
|
"description": "......",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
"loadingError": "loading error",
|
"loadingError": "loading error",
|
||||||
"@loadingError": {
|
"@loadingError": {
|
||||||
"description": "加载出错了",
|
"description": "加载出错了",
|
||||||
|
@ -580,6 +580,12 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
|
"loadingIdle": "......",
|
||||||
|
"@loadingIdle": {
|
||||||
|
"description": "......",
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
"loadingError": "加载出错了",
|
"loadingError": "加载出错了",
|
||||||
"@loadingError": {
|
"@loadingError": {
|
||||||
"description": "加载出错了",
|
"description": "加载出错了",
|
||||||
|
Reference in New Issue
Block a user