factor:布局颜色重构
This commit is contained in:
@@ -12,7 +12,7 @@ void showAwesomeDialog({
|
||||
dialogType: DialogType.noHeader,
|
||||
animType: AnimType.scale,
|
||||
body: body,
|
||||
dialogBackgroundColor: Theme.of(context).colorScheme.surface,
|
||||
dialogBackgroundColor: Theme.of(context).colorScheme.surfaceContainer,
|
||||
btnOkText: "确认",
|
||||
btnCancelText: "取消",
|
||||
btnOkColor: Colors.orange,
|
||||
@@ -31,7 +31,7 @@ void showAwesomeDialog({
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 6),
|
||||
textStyle: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
|
||||
textStyle: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, fontFamily: 'CustomFont'),
|
||||
),
|
||||
child: Text("确认"),
|
||||
),
|
||||
|
||||
@@ -37,6 +37,7 @@ class _CalendarFormState extends State<CalendarForm> {
|
||||
|
||||
Widget buildTitle() {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
widget.isEditing ? Icons.edit_note : Icons.add_task,
|
||||
@@ -281,7 +282,7 @@ class _CalendarFormState extends State<CalendarForm> {
|
||||
}
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 10),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [buildTitle(), SizedBox(height: 20), buildForm()],
|
||||
|
||||
@@ -61,6 +61,10 @@ Widget buildCalendar({
|
||||
return SfCalendar(
|
||||
view: CalendarView.week,
|
||||
controller: controller,
|
||||
backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
|
||||
headerStyle: CalendarHeaderStyle(
|
||||
backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
|
||||
),
|
||||
dataSource: dataSource,
|
||||
firstDayOfWeek: 1,
|
||||
showDatePickerButton: true,
|
||||
@@ -75,8 +79,8 @@ Widget buildCalendar({
|
||||
scheduleViewSettings: ScheduleViewSettings(
|
||||
monthHeaderSettings: MonthHeaderSettings(
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
height: 85
|
||||
)
|
||||
height: 85,
|
||||
),
|
||||
),
|
||||
// 时间区域设置
|
||||
timeSlotViewSettings: TimeSlotViewSettings(
|
||||
|
||||
@@ -34,9 +34,9 @@ class BuildCard extends StatelessWidget {
|
||||
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: colors.surface,
|
||||
color: colors.surfaceContainer,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: colors.outline.withAlpha(50), width: 1),
|
||||
// border: Border.all(color: colors.outline.withAlpha(50), width: 1),
|
||||
),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: child,
|
||||
@@ -70,7 +70,7 @@ void buildModalBottom({
|
||||
builder: (_, controller) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: colors.surface,
|
||||
color: colors.surfaceContainer,
|
||||
border: Border.all(
|
||||
color: colors.outline.withAlpha(50),
|
||||
width: 1,
|
||||
@@ -159,7 +159,7 @@ Future<bool?> showDeleteConfirmationDialog(BuildContext context) async {
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: const Text('确认删除'),
|
||||
backgroundColor: Colors.white,
|
||||
backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
|
||||
content: const Text('确定要删除这个项目吗?'),
|
||||
actions: [
|
||||
TextButton(
|
||||
|
||||
@@ -68,10 +68,9 @@ Widget buildFlispList({
|
||||
itemCount: flisps.length,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 8),
|
||||
itemBuilder: (context, index) {
|
||||
final flisp = flisps[index];
|
||||
return _buildFlispItem(
|
||||
context: context,
|
||||
flisp: flisp,
|
||||
flisp: flisps[index],
|
||||
onEdit: onEdit,
|
||||
onDelete: onDelete,
|
||||
);
|
||||
|
||||
@@ -36,6 +36,7 @@ class _TodoFormState extends State<TodoForm> {
|
||||
|
||||
Widget buildTitle() {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
widget.isEditing ? Icons.edit_note : Icons.add_task,
|
||||
@@ -322,7 +323,6 @@ class _TodoFormState extends State<TodoForm> {
|
||||
decoration: BoxDecoration(
|
||||
color: colors.surface,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: Colors.grey.shade300, width: 1),
|
||||
),
|
||||
padding: EdgeInsets.all(12),
|
||||
child: Column(
|
||||
@@ -362,7 +362,7 @@ class _TodoFormState extends State<TodoForm> {
|
||||
}
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 10),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [buildTitle(), SizedBox(height: 20), buildForm()],
|
||||
|
||||
Reference in New Issue
Block a user