feat:增加日程模块tab页面
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:flisp_app/models/calendar.dart';
|
||||
import 'package:flisp_app/provider/calendar_provider.dart';
|
||||
import 'package:flisp_app/widgets/common.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -16,6 +17,23 @@ class AppointmentDataSource extends CalendarDataSource {
|
||||
}
|
||||
}
|
||||
|
||||
Widget buildTabs({
|
||||
required BuildContext context,
|
||||
required CalendarTab currentTab,
|
||||
required ValueChanged<CalendarTab> onTabChanged,
|
||||
}) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
child: buildToggleSwitch(
|
||||
context: context,
|
||||
currentTab: currentTab,
|
||||
tabValues: CalendarTab.values,
|
||||
labels: CalendarTab.values.map((e) => e.label).toList(),
|
||||
onTabChanged: onTabChanged,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildCalendarMenu({required void Function(CalendarView) onSelected}) {
|
||||
return PopupMenuButton<CalendarView>(
|
||||
onSelected: onSelected,
|
||||
|
||||
Reference in New Issue
Block a user