feat(update):更新时间组件星期显示

This commit is contained in:
2026-04-16 15:49:57 +08:00
parent be5b5bb951
commit d6f27690c6
6 changed files with 260 additions and 196 deletions

View File

@@ -67,16 +67,12 @@ class ToastUtils {
context: context,
builder: (BuildContext ctx) {
final dialogHeight = height ?? MediaQuery.of(ctx).size.height / 2;
final bottomInset = MediaQuery.of(ctx).padding.bottom;
return Material(
type: MaterialType.transparency,
child: Align(
alignment: Alignment.bottomCenter,
child: Container(
width: double.infinity,
height: dialogHeight,
padding: (padding ?? const EdgeInsets.only(bottom: 40))
.add(EdgeInsets.only(bottom: bottomInset)),
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
@@ -84,79 +80,90 @@ class ToastUtils {
topRight: Radius.circular(12),
),
),
child: Column(
children: [
header ??
Container(
padding: const EdgeInsets.only(bottom: 5),
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color(0xffE1E1E1),
width: 0.5,
),
),
),
child: Row(
children: [
GestureDetector(
onTap: () => Navigator.of(ctx).pop(),
child: Container(
padding:
const EdgeInsets.only(left: 6, right: 10),
color: Colors.transparent,
child: Icon(
Icons.keyboard_arrow_down_rounded,
size: leftIconSize ?? 40,
),
),
),
Expanded(
child: Container(
alignment: Alignment.center,
child: Text(
title ?? '头部',
style: TextStyle(
color: const Color(0xff333333),
fontSize: titleFontSize ?? 18,
fontWeight: FontWeight.bold,
child: SafeArea(
top: false,
child: SizedBox(
height: dialogHeight,
child: Padding(
padding: padding ?? EdgeInsets.zero,
child: Column(
children: [
header ??
Container(
padding: const EdgeInsets.only(bottom: 5),
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color(0xffE1E1E1),
width: 0.5,
),
),
),
),
GestureDetector(
onTap: () {
if (isShowConfirm) {
if (onConfirm != null) {
onConfirm();
Navigator.of(ctx).pop();
}
}
},
child: Container(
padding: const EdgeInsets.only(
left: 10,
top: 8,
bottom: 8,
right: 18,
),
alignment: Alignment.center,
color: Colors.transparent,
child: Text(
'确定',
style: TextStyle(
color: isShowConfirm
? const Color(0xff4D6FD5)
: Colors.transparent,
fontSize: 16),
),
child: Row(
children: [
GestureDetector(
onTap: () => Navigator.of(ctx).pop(),
child: Container(
padding: const EdgeInsets.only(
left: 6,
right: 10,
),
color: Colors.transparent,
child: Icon(
Icons.keyboard_arrow_down_rounded,
size: leftIconSize ?? 40,
),
),
),
Expanded(
child: Container(
alignment: Alignment.center,
child: Text(
title ?? '头部',
style: TextStyle(
color: const Color(0xff333333),
fontSize: titleFontSize ?? 18,
fontWeight: FontWeight.bold,
),
),
),
),
GestureDetector(
onTap: () {
if (isShowConfirm) {
if (onConfirm != null) {
onConfirm();
Navigator.of(ctx).pop();
}
}
},
child: Container(
padding: const EdgeInsets.only(
left: 10,
top: 8,
bottom: 8,
right: 18,
),
alignment: Alignment.center,
color: Colors.transparent,
child: Text(
'确定',
style: TextStyle(
color: isShowConfirm
? const Color(0xff4D6FD5)
: Colors.transparent,
fontSize: 16),
),
),
)
],
),
)
],
),
),
Expanded(child: contentWidget ?? const SizedBox())
],
),
Expanded(child: contentWidget ?? const SizedBox())
],
),
),
),
),
),
),