支持主题切换

This commit is contained in:
NewTab
2022-01-21 19:54:59 +08:00
parent b8b195b663
commit b9d0071302
12 changed files with 813 additions and 175 deletions

View File

@@ -24,7 +24,8 @@ class LoginPage extends ConsumerStatefulWidget {
}
class _LoginPageState extends ConsumerState<LoginPage> {
final TextEditingController _hostController = TextEditingController(text: getIt<UserInfoViewModel>().host);
final TextEditingController _hostController =
TextEditingController(text: getIt<UserInfoViewModel>().host);
final TextEditingController _userNameController = TextEditingController();
final TextEditingController _passwordController = TextEditingController();
final TextEditingController _cIdController = TextEditingController();
@@ -40,7 +41,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
super.initState();
useSecretLogin = getIt<UserInfoViewModel>().useSecretLogined;
if (getIt<UserInfoViewModel>().userName != null && getIt<UserInfoViewModel>().userName!.isNotEmpty) {
if (getIt<UserInfoViewModel>().userName != null &&
getIt<UserInfoViewModel>().userName!.isNotEmpty) {
if (getIt<UserInfoViewModel>().useSecretLogined) {
_cIdController.text = getIt<UserInfoViewModel>().userName!;
} else {
@@ -50,7 +52,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
} else {
rememberPassword = false;
}
if (getIt<UserInfoViewModel>().passWord != null && getIt<UserInfoViewModel>().passWord!.isNotEmpty) {
if (getIt<UserInfoViewModel>().passWord != null &&
getIt<UserInfoViewModel>().passWord!.isNotEmpty) {
if (getIt<UserInfoViewModel>().useSecretLogined) {
_cSecretController.text = getIt<UserInfoViewModel>().passWord!;
} else {
@@ -115,13 +118,22 @@ class _LoginPageState extends ConsumerState<LoginPage> {
if (debugBtnIsShow()) {
dismissDebugBtn();
} else {
showDebugBtn(context, btnColor: ref.watch(themeProvider).primaryColor);
showDebugBtn(context,
btnColor: ref
.watch(themeProvider)
.primaryColor);
}
WidgetsBinding.instance?.endOfFrame;
},
child: Image.asset(
"assets/images/ql.png",
height: 45,
child: ColorFiltered(
colorFilter: ColorFilter.mode(
ref.watch(themeProvider).primaryColor,
BlendMode.srcIn,
),
child: Image.asset(
"assets/images/ql.png",
height: 45,
),
),
),
],
@@ -178,7 +190,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
},
controller: _userNameController,
decoration: const InputDecoration(
contentPadding: EdgeInsets.fromLTRB(0, 5, 0, 5),
contentPadding:
EdgeInsets.fromLTRB(0, 5, 0, 5),
hintText: "请输入用户名",
),
autofocus: false,
@@ -200,7 +213,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
controller: _passwordController,
obscureText: true,
decoration: const InputDecoration(
contentPadding: EdgeInsets.fromLTRB(0, 5, 0, 5),
contentPadding:
EdgeInsets.fromLTRB(0, 5, 0, 5),
hintText: "请输入密码",
),
autofocus: false,
@@ -234,7 +248,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
},
controller: _cIdController,
decoration: const InputDecoration(
contentPadding: EdgeInsets.fromLTRB(0, 5, 0, 5),
contentPadding:
EdgeInsets.fromLTRB(0, 5, 0, 5),
hintText: "请输入client_id",
),
autofocus: false,
@@ -256,7 +271,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
controller: _cSecretController,
obscureText: true,
decoration: const InputDecoration(
contentPadding: EdgeInsets.fromLTRB(0, 5, 0, 5),
contentPadding:
EdgeInsets.fromLTRB(0, 5, 0, 5),
hintText: "请输入client_secret",
),
autofocus: false,
@@ -294,7 +310,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
GestureDetector(
onTap: () {
cardKey.currentState?.toggleCard();
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
WidgetsBinding.instance
?.addPostFrameCallback((timeStamp) {
setState(() {});
});
},
@@ -327,7 +344,12 @@ class _LoginPageState extends ConsumerState<LoginPage> {
padding: const EdgeInsets.symmetric(
vertical: 5,
),
color: canClickLoginBtn() ? ref.watch(themeProvider).primaryColor : ref.watch(themeProvider).primaryColor.withOpacity(0.4),
color: canClickLoginBtn()
? ref.watch(themeProvider).primaryColor
: ref
.watch(themeProvider)
.primaryColor
.withOpacity(0.4),
child: isLoading
? const CupertinoActivityIndicator()
: const Text(
@@ -339,12 +361,15 @@ class _LoginPageState extends ConsumerState<LoginPage> {
onPressed: () {
Http.pushedLoginPage = false;
Utils.hideKeyBoard(context);
getIt<UserInfoViewModel>().updateHost(_hostController.text);
getIt<UserInfoViewModel>()
.updateHost(_hostController.text);
Http.clear();
if (loginByUserName()) {
login(_userNameController.text, _passwordController.text);
login(_userNameController.text,
_passwordController.text);
} else {
login(_cIdController.text, _cSecretController.text);
login(_cIdController.text,
_cSecretController.text);
}
},
),
@@ -381,7 +406,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
loginSuccess(response, userName, password);
} else if (loginByUserName() && response.code == 401) {
//可能用户使用的是老版本qinglong
HttpResponse<LoginBean> oldResponse = await Api.loginOld(userName, password);
HttpResponse<LoginBean> oldResponse =
await Api.loginOld(userName, password);
if (oldResponse.success) {
loginSuccess(oldResponse, userName, password);
} else {
@@ -412,7 +438,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
setState(() {});
}
void loginSuccess(HttpResponse<LoginBean> response, String userName, String password) {
void loginSuccess(
HttpResponse<LoginBean> response, String userName, String password) {
getIt<UserInfoViewModel>().updateToken(response.bean?.token ?? "");
getIt<UserInfoViewModel>().useSecretLogin(!loginByUserName());
if (rememberPassword) {
@@ -428,9 +455,11 @@ class _LoginPageState extends ConsumerState<LoginPage> {
if (_hostController.text.isEmpty) return false;
if (!loginByUserName()) {
return _cIdController.text.isNotEmpty && _cSecretController.text.isNotEmpty;
return _cIdController.text.isNotEmpty &&
_cSecretController.text.isNotEmpty;
} else {
return _userNameController.text.isNotEmpty && _passwordController.text.isNotEmpty;
return _userNameController.text.isNotEmpty &&
_passwordController.text.isNotEmpty;
}
}
@@ -481,7 +510,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
),
onPressed: () async {
Navigator.of(context).pop(true);
HttpResponse<LoginBean> response = await Api.loginTwo(userName, password, twoFact);
HttpResponse<LoginBean> response =
await Api.loginTwo(userName, password, twoFact);
if (response.success) {
loginSuccess(response, userName, password);
} else {
@@ -501,7 +531,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
void update() async {
String? result = await UpdateUtils().checkUpdate();
if (result != null && result.isNotEmpty) {
UpdateDialog updateDialog = UpdateDialog(context, title: "发现新版本", updateContent: "版本号:v${result}", onUpdate: () {
UpdateDialog updateDialog = UpdateDialog(context,
title: "发现新版本", updateContent: "版本号:v${result}", onUpdate: () {
UpdateUtils.launchURL(result);
});
updateDialog.show();

View File

@@ -59,7 +59,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"脚本管理",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
@@ -92,7 +95,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"依赖管理",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
@@ -127,7 +133,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"任务日志",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
@@ -180,7 +189,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"登录日志",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
@@ -221,7 +233,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"修改密码",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
@@ -265,7 +280,8 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"夜间模式",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color:
ref.watch(themeProvider).themeColor.titleColor(),
fontSize: 16,
),
),
@@ -282,6 +298,44 @@ class _OtherPageState extends ConsumerState<OtherPage> {
const Divider(
indent: 15,
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed(
Routes.routeTheme,
);
},
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 15,
vertical: 5,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"主题设置",
style: TextStyle(
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
const Spacer(),
const Icon(
CupertinoIcons.right_chevron,
size: 16,
),
],
),
),
),
const Divider(
indent: 15,
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
@@ -303,7 +357,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"关于",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
@@ -362,7 +419,8 @@ class _OtherPageState extends ConsumerState<OtherPage> {
),
onPressed: () {
getIt<UserInfoViewModel>().updateToken("");
Navigator.of(context).pushReplacementNamed(Routes.routeLogin);
Navigator.of(context)
.pushReplacementNamed(Routes.routeLogin);
},
),
],

View File

@@ -0,0 +1,475 @@
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_colorpicker/flutter_colorpicker.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:qinglong_app/base/ql_app_bar.dart';
import 'package:qinglong_app/base/theme.dart';
class ThemePage extends ConsumerStatefulWidget {
const ThemePage({Key? key}) : super(key: key);
@override
_ThemePageState createState() => _ThemePageState();
}
class _ThemePageState extends ConsumerState<ThemePage> {
late Color _primaryColor;
List<Color> colors = [];
double colorHeight = 40;
double smallColorHeight = 8;
@override
void initState() {
super.initState();
_primaryColor = ref.read(themeProvider).primaryColor;
colors.add(const Color(0xFF299343));
colors.addAll([
Colors.red,
Colors.pink,
Colors.purple,
Colors.deepPurple,
Colors.indigo,
Colors.blue,
Colors.lightBlue,
Colors.cyan,
Colors.teal,
Colors.green,
Colors.lightGreen,
Colors.lime,
Colors.yellow,
Colors.amber,
Colors.orange,
Colors.deepOrange,
Colors.brown,
Colors.blueGrey,
]);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xff999999),
appBar: QlAppBar(
title: '主题设置',
canBack: true,
actions: [
InkWell(
onTap: () {
submit();
},
child: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 15,
),
child: Center(
child: Text(
"保存",
style: TextStyle(
color: Colors.white,
fontSize: 16,
),
),
),
),
)
],
),
body: Column(
children: [
const SizedBox(
height: 15,
),
Expanded(
child: SizedBox(
height:
MediaQuery.of(context).size.height * 3 / 4 - kToolbarHeight,
child: Row(
children: [
const SizedBox(
width: 20,
),
Expanded(
child: ClipRRect(
borderRadius: BorderRadius.circular(15),
child: Scaffold(
appBar: AppBar(
backgroundColor: _primaryColor,
title: Text("示例页面"),
elevation: 0,
automaticallyImplyLeading: false,
centerTitle: true,
),
body: ListView.builder(
itemBuilder: (context, index) {
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: MediaQuery.of(context).size.width,
color: index == 0
? ref
.watch(themeProvider)
.themeColor
.pinColor()
: Colors.transparent,
padding: const EdgeInsets.symmetric(
horizontal: 15,
vertical: 8,
),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Random().nextBool()
? const SizedBox.shrink()
: SizedBox(
width: 15,
height: 15,
child:
CircularProgressIndicator(
strokeWidth: 2,
color: _primaryColor,
),
),
SizedBox(
width: Random().nextBool()
? 0
: 5,
),
Expanded(
child: Material(
color: Colors.transparent,
child: Text(
"示例名称",
maxLines: 1,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
overflow: TextOverflow
.ellipsis,
color: ref
.watch(
themeProvider)
.themeColor
.titleColor(),
fontSize: 18,
),
),
),
),
],
),
),
Material(
color: Colors.transparent,
child: Text(
"上午1000",
maxLines: 1,
style: TextStyle(
overflow: TextOverflow.ellipsis,
color: ref
.watch(themeProvider)
.themeColor
.descColor(),
fontSize: 12,
),
),
),
],
),
const SizedBox(
height: 8,
),
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Random().nextBool()
? const Icon(
Icons.dnd_forwardslash,
size: 12,
color: Colors.red,
)
: const SizedBox.shrink(),
const SizedBox(
width: 5,
),
Material(
color: Colors.transparent,
child: Text(
"10 1-12/2 * * *",
maxLines: 1,
style: TextStyle(
overflow: TextOverflow.ellipsis,
color: ref
.watch(themeProvider)
.themeColor
.descColor(),
fontSize: 12,
),
),
),
],
),
const SizedBox(
height: 8,
),
Material(
color: Colors.transparent,
child: Text(
"task raw post.js",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
overflow: TextOverflow.ellipsis,
color: ref
.watch(themeProvider)
.themeColor
.descColor(),
fontSize: 12,
),
),
),
],
),
),
const Divider(
height: 1,
indent: 15,
),
],
);
},
itemCount: 100,
),
),
),
),
const SizedBox(
width: 20,
),
],
),
),
),
const SizedBox(
height: 15,
),
Container(
margin: const EdgeInsets.symmetric(
horizontal: 15,
),
height: colorHeight + 20,
padding: const EdgeInsets.symmetric(vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: ListView.separated(
physics: BouncingScrollPhysics(),
padding: const EdgeInsets.symmetric(
horizontal: 15,
),
scrollDirection: Axis.horizontal,
itemBuilder: (context, index) {
if (index == 0) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
pickColor();
},
child: SizedBox(
width: colorHeight,
height: colorHeight,
child: Stack(
children: [
Positioned(
child: Container(
width: smallColorHeight,
height: smallColorHeight,
decoration: BoxDecoration(
color: colors[0],
borderRadius:
BorderRadius.circular(smallColorHeight),
),
),
left: 0,
top: colorHeight / 4 - smallColorHeight / 2,
),
Positioned(
child: Container(
width: smallColorHeight,
height: smallColorHeight,
decoration: BoxDecoration(
color: colors[1],
borderRadius:
BorderRadius.circular(smallColorHeight),
),
),
left: 0,
bottom: colorHeight / 4 - smallColorHeight / 2,
),
Positioned(
child: Container(
width: smallColorHeight,
height: smallColorHeight,
decoration: BoxDecoration(
color: colors[2],
borderRadius:
BorderRadius.circular(smallColorHeight),
),
),
left: colorHeight / 2 - smallColorHeight / 2,
top: 0,
),
Positioned(
child: Container(
width: smallColorHeight,
height: smallColorHeight,
decoration: BoxDecoration(
color: colors[3],
borderRadius:
BorderRadius.circular(smallColorHeight),
),
),
right: 0,
top: colorHeight / 4 - smallColorHeight / 2,
),
Positioned(
child: Container(
width: smallColorHeight,
height: smallColorHeight,
decoration: BoxDecoration(
color: colors[4],
borderRadius:
BorderRadius.circular(smallColorHeight),
),
),
right: 0,
bottom: colorHeight / 4 - smallColorHeight / 2,
),
Positioned(
child: Container(
width: smallColorHeight,
height: smallColorHeight,
decoration: BoxDecoration(
color: colors[5],
borderRadius:
BorderRadius.circular(smallColorHeight),
),
),
left: colorHeight / 2 - smallColorHeight / 2,
bottom: 0,
),
Positioned(
child: Container(
width: smallColorHeight,
height: smallColorHeight,
decoration: BoxDecoration(
color: colors[6],
borderRadius:
BorderRadius.circular(smallColorHeight),
),
),
left: colorHeight / 2 - smallColorHeight / 2,
bottom: 0,
),
Positioned(
child: Container(
width: smallColorHeight,
height: smallColorHeight,
decoration: BoxDecoration(
color: colors[7],
borderRadius:
BorderRadius.circular(smallColorHeight),
),
),
left: colorHeight / 2 - smallColorHeight / 2,
bottom: colorHeight / 2 - smallColorHeight / 2,
),
],
),
),
);
} else {
index = index - 1;
return GestureDetector(
onTap: () {
_primaryColor = colors[index];
setState(() {});
},
child: SizedBox(
width: colorHeight,
height: colorHeight,
child: Container(
decoration: BoxDecoration(
color: colors[index],
borderRadius: BorderRadius.circular(colorHeight),
),
),
),
);
}
},
itemCount: colors.length + 1,
separatorBuilder: (BuildContext context, int index) {
return const SizedBox(
width: 15,
);
},
),
),
],
),
);
}
void pickColor() {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
titlePadding: const EdgeInsets.all(0),
contentPadding: const EdgeInsets.all(0),
content: SingleChildScrollView(
child: ColorPicker(
pickerColor: _primaryColor,
onColorChanged: (color) {
_primaryColor = color;
setState(() {});
},
colorPickerWidth: 300,
pickerAreaHeightPercent: 0.7,
enableAlpha: false,
pickerAreaBorderRadius: const BorderRadius.only(
topLeft: Radius.circular(2),
topRight: Radius.circular(2),
),
hexInputBar: false,
),
),
);
},
);
}
void submit() {
ref.read(themeProvider).changePrimaryColor(_primaryColor);
Navigator.of(context).pop();
}
}

View File

@@ -102,9 +102,17 @@ class _TaskPageState extends State<TaskPage> {
TaskBean item = list[index];
if (_searchController.text.isEmpty ||
(item.name?.toLowerCase().contains(_searchController.text.toLowerCase()) ?? false) ||
(item.command?.toLowerCase().contains(_searchController.text.toLowerCase()) ?? false) ||
(item.schedule?.contains(_searchController.text.toLowerCase()) ?? false)) {
(item.name
?.toLowerCase()
.contains(_searchController.text.toLowerCase()) ??
false) ||
(item.command
?.toLowerCase()
.contains(_searchController.text.toLowerCase()) ??
false) ||
(item.schedule
?.contains(_searchController.text.toLowerCase()) ??
false)) {
return TaskItemCell(item, ref);
} else {
return const SizedBox.shrink();
@@ -175,7 +183,9 @@ class TaskItemCell extends StatelessWidget {
child: Text(
bean.status! == 1 ? "运行" : "停止运行",
),
trailingIcon: bean.status! == 1 ? CupertinoIcons.memories : CupertinoIcons.stop_circle,
trailingIcon: bean.status! == 1
? CupertinoIcons.memories
: CupertinoIcons.stop_circle,
onPressed: () {
Navigator.of(context).pop();
if (bean.status! == 1) {
@@ -197,7 +207,8 @@ class TaskItemCell extends StatelessWidget {
child: const Text("编辑"),
onPressed: () {
Navigator.of(context).pop();
Navigator.of(context).pushNamed(Routes.routeAddTask, arguments: bean);
Navigator.of(context)
.pushNamed(Routes.routeAddTask, arguments: bean);
},
trailingIcon: CupertinoIcons.pencil_outline,
),
@@ -207,7 +218,9 @@ class TaskItemCell extends StatelessWidget {
Navigator.of(context).pop();
pinTask();
},
trailingIcon: bean.isPinned! == 0 ? CupertinoIcons.pin : CupertinoIcons.pin_slash,
trailingIcon: bean.isPinned! == 0
? CupertinoIcons.pin
: CupertinoIcons.pin_slash,
),
QLCupertinoContextMenuAction(
child: Text(bean.isDisabled! == 0 ? "禁用" : "启用"),
@@ -216,7 +229,9 @@ class TaskItemCell extends StatelessWidget {
enableTask();
},
isDestructiveAction: true,
trailingIcon: bean.isDisabled! == 0 ? Icons.dnd_forwardslash : Icons.check_circle_outline_sharp,
trailingIcon: bean.isDisabled! == 0
? Icons.dnd_forwardslash
: Icons.check_circle_outline_sharp,
),
QLCupertinoContextMenuAction(
child: const Text("删除"),
@@ -233,7 +248,9 @@ class TaskItemCell extends StatelessWidget {
return ClipRRect(
borderRadius: BorderRadius.circular(15),
child: Container(
color: isDark ? const Color(0xff333333) : Theme.of(context).scaffoldBackgroundColor,
color: isDark
? const Color(0xff333333)
: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.only(
left: 5,
right: 5,
@@ -256,7 +273,9 @@ class TaskItemCell extends StatelessWidget {
children: [
Container(
width: MediaQuery.of(context).size.width,
color: bean.isPinned == 1 ? ref.watch(themeProvider).themeColor.pinColor() : Colors.transparent,
color: bean.isPinned == 1
? ref.watch(themeProvider).themeColor.pinColor()
: Colors.transparent,
padding: const EdgeInsets.symmetric(
horizontal: 15,
vertical: 8,
@@ -276,11 +295,13 @@ class TaskItemCell extends StatelessWidget {
children: [
bean.status == 1
? const SizedBox.shrink()
: const SizedBox(
: SizedBox(
width: 15,
height: 15,
child: CircularProgressIndicator(
strokeWidth: 2,
color:
ref.watch(themeProvider).primaryColor,
),
),
SizedBox(
@@ -295,7 +316,10 @@ class TaskItemCell extends StatelessWidget {
overflow: TextOverflow.ellipsis,
style: TextStyle(
overflow: TextOverflow.ellipsis,
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 18,
),
),
@@ -307,11 +331,16 @@ class TaskItemCell extends StatelessWidget {
Material(
color: Colors.transparent,
child: Text(
(bean.lastExecutionTime == null || bean.lastExecutionTime == 0) ? "-" : Utils.formatMessageTime(bean.lastExecutionTime!),
(bean.lastExecutionTime == null ||
bean.lastExecutionTime == 0)
? "-"
: Utils.formatMessageTime(
bean.lastExecutionTime!),
maxLines: 1,
style: TextStyle(
overflow: TextOverflow.ellipsis,
color: ref.watch(themeProvider).themeColor.descColor(),
color:
ref.watch(themeProvider).themeColor.descColor(),
fontSize: 12,
),
),
@@ -341,7 +370,8 @@ class TaskItemCell extends StatelessWidget {
maxLines: 1,
style: TextStyle(
overflow: TextOverflow.ellipsis,
color: ref.watch(themeProvider).themeColor.descColor(),
color:
ref.watch(themeProvider).themeColor.descColor(),
fontSize: 12,
),
),