Skip to content

Commit

Permalink
chore: replace showModalBottomSheet in date picker
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasn committed Feb 9, 2025
1 parent 0c9a4f3 commit d08f008
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/widgets/date_time/datetime_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:lotti/features/journal/util/entry_tools.dart';
import 'package:lotti/themes/theme.dart';
import 'package:lotti/utils/modals.dart';
import 'package:lotti/widgets/date_time/datetime_bottom_sheet.dart';

class DateTimeField extends StatefulWidget {
Expand Down Expand Up @@ -54,14 +55,16 @@ class _DateTimeFieldState extends State<DateTimeField> {
text: widget.dateTime != null ? df.format(widget.dateTime!) : '',
),
onTap: () async {
final newDateTime = await showModalBottomSheet<DateTime>(
final newDateTime = await ModalUtils.showSinglePageModal<DateTime>(
context: context,
builder: (context) {
builder: (_) {
return DateTimeBottomSheet(
widget.dateTime ?? DateTime.now(),
mode: widget.mode,
);
},
padding: EdgeInsets.zero,
navBarHeight: 0,
);

if (newDateTime != null) {
Expand Down

0 comments on commit d08f008

Please sign in to comment.