fix:时间组件底部显示异常

This commit is contained in:
2026-01-07 14:35:51 +08:00
parent 0c07b6ba37
commit 740af2a459
2 changed files with 4 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ import 'package:flutter/services.dart';
///日期弹窗显示 ///日期弹窗显示
class CustomDatePicker extends StatefulWidget { class CustomDatePicker extends StatefulWidget {
CustomDatePicker( CustomDatePicker(
{Key? key, {super.key,
required DateTime initialDate, required DateTime initialDate,
required DateTime firstDate, required DateTime firstDate,
required DateTime lastDate, required DateTime lastDate,
@@ -31,8 +31,7 @@ class CustomDatePicker extends StatefulWidget {
lastDate = DateUtils.dateOnly(lastDate), lastDate = DateUtils.dateOnly(lastDate),
currentDate = DateUtils.dateOnly(currentDate ?? DateTime.now()), currentDate = DateUtils.dateOnly(currentDate ?? DateTime.now()),
assert(onDateChanged != null), assert(onDateChanged != null),
assert(initialCalendarMode != null), assert(initialCalendarMode != null) {
super(key: key) {
assert( assert(
!this.lastDate.isBefore(this.firstDate), !this.lastDate.isBefore(this.firstDate),
'lastDate ${this.lastDate} must be on or after firstDate ${this.firstDate}.', 'lastDate ${this.lastDate} must be on or after firstDate ${this.firstDate}.',

View File

@@ -59,9 +59,11 @@ class ToastUtils {
bool isShowConfirm = false, bool isShowConfirm = false,
Color? barrierColor, Color? barrierColor,
EdgeInsetsGeometry? padding, EdgeInsetsGeometry? padding,
bool useSafeArea = true,
}) { }) {
cancelToast(); cancelToast();
return showDialog( return showDialog(
useSafeArea: useSafeArea,
context: context, context: context,
builder: (BuildContext ctx) { builder: (BuildContext ctx) {
return Container( return Container(