优化样式

This commit is contained in:
jyuesong
2022-01-20 13:33:52 +08:00
parent 4f8285fcf1
commit 130459d646
13 changed files with 241 additions and 66 deletions

View File

@@ -367,13 +367,23 @@ class _TaskDetailPageState extends ConsumerState<TaskDetailPage> {
content: Text("确认删除定时任务 ${widget.taskBean.name ?? ""}"),
actions: [
CupertinoDialogAction(
child: const Text("取消"),
child: const Text(
"取消",
style: TextStyle(
color: Color(0xff999999),
),
),
onPressed: () {
Navigator.of(context).pop();
},
),
CupertinoDialogAction(
child: const Text("确定"),
child: Text(
"确定",
style: TextStyle(
color: primaryColor,
),
),
onPressed: () async {
Navigator.of(context).pop();
await ref.read(taskProvider).delCron(widget.taskBean.sId!);

View File

@@ -251,6 +251,7 @@ class TaskItemCell extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: MediaQuery.of(context).size.width,
color: bean.isPinned == 1 ? ref.watch(themeProvider).themeColor.pinColor() : Colors.transparent,
padding: const EdgeInsets.symmetric(
horizontal: 15,
@@ -307,6 +308,7 @@ class TaskItemCell extends StatelessWidget {
height: 8,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Material(
color: Colors.transparent,
@@ -332,6 +334,22 @@ class TaskItemCell extends StatelessWidget {
: const SizedBox.shrink(),
],
),
const SizedBox(
height: 8,
),
Material(
color: Colors.transparent,
child: Text(
bean.command ?? "",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
overflow: TextOverflow.ellipsis,
color: ref.watch(themeProvider).themeColor.descColor(),
fontSize: 12,
),
),
),
],
),
),
@@ -401,13 +419,23 @@ class TaskItemCell extends StatelessWidget {
content: Text("确认删除定时任务 ${bean.name ?? ""}"),
actions: [
CupertinoDialogAction(
child: const Text("取消"),
child: const Text(
"取消",
style: TextStyle(
color: Color(0xff999999),
),
),
onPressed: () {
Navigator.of(context).pop();
},
),
CupertinoDialogAction(
child: const Text("确定"),
child: Text(
"确定",
style: TextStyle(
color: primaryColor,
),
),
onPressed: () {
Navigator.of(context).pop();
ref.read(taskProvider).delCron(bean.sId!);