show static method

Future<PeriodDateRange?> show({
  1. required BuildContext context,
  2. PeriodDateType initialType = PeriodDateType.day,
  3. DateTime? initialStartDate,
  4. DateTime? initialEndDate,
  5. DateTime? firstDate,
  6. DateTime? lastDate,
  7. bool canChangeType = false,
})

Show the period date picker as a dialog

Implementation

static Future<PeriodDateRange?> show({
  required BuildContext context,
  PeriodDateType initialType = PeriodDateType.day,
  DateTime? initialStartDate,
  DateTime? initialEndDate,
  DateTime? firstDate,
  DateTime? lastDate,
  bool canChangeType = false,
}) {
  return showDialog<PeriodDateRange>(
    context: context,
    builder: (BuildContext context) {
      return Dialog(
        backgroundColor: Colors.transparent,
        child: PeriodDatePicker(
          initialType: initialType,
          initialStartDate: initialStartDate,
          initialEndDate: initialEndDate,
          firstDate: firstDate,
          lastDate: lastDate,
          canChangeType: canChangeType,
        ),
      );
    },
  );
}