mirror of
https://github.com/Iconica-Development/flutter_date_time_picker.git
synced 2025-05-18 18:33:49 +02:00
fixed some docs and mistake
This commit is contained in:
parent
fc42f21b1b
commit
3752adcb7e
3 changed files with 24 additions and 40 deletions
|
@ -25,6 +25,26 @@ import 'package:intl/date_symbol_data_local.dart';
|
|||
/// markedDates: [
|
||||
/// DateTime(2022, 3, 14),
|
||||
/// ],
|
||||
/// wrongTimeDialog:
|
||||
/// AlertDialog(
|
||||
/// title: const Text('Invalid Time'),
|
||||
/// content: SingleChildScrollView(
|
||||
/// child: ListBody(
|
||||
/// children: const <Widget>[
|
||||
/// Text(
|
||||
/// 'The time you try to choose is diabled, try to pick another time.'),
|
||||
/// ],
|
||||
/// ),
|
||||
/// ),
|
||||
/// actions: <Widget>[
|
||||
/// TextButton(
|
||||
/// child: const Text('OK'),
|
||||
/// onPressed: () {
|
||||
/// Navigator.pop(context);
|
||||
/// },
|
||||
/// ),
|
||||
/// ],
|
||||
/// ),
|
||||
/// header: Container(
|
||||
/// height: 100,
|
||||
/// width: MediaQuery.of(context).size.width,
|
||||
|
|
|
@ -88,27 +88,9 @@ class MonthDateTimePicker extends StatelessWidget {
|
|||
dateTimePickerController.disabledTimes ?? [],
|
||||
)) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text('Verkeerde tijd gekozen'),
|
||||
content: SingleChildScrollView(
|
||||
child: ListBody(
|
||||
children: const <Widget>[
|
||||
Text(
|
||||
'De tijd die u wilt kiezen, is niet mogelijk, maak een andere keuze.'),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
child: const Text('OK'),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
context: context,
|
||||
builder: (context) =>
|
||||
dateTimePickerController.wrongTimeDialog!);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,25 +62,7 @@ class WeekDateTimePicker extends StatelessWidget {
|
|||
)) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text('Verkeerde tijd gekozen'),
|
||||
content: SingleChildScrollView(
|
||||
child: ListBody(
|
||||
children: const <Widget>[
|
||||
Text(
|
||||
'De tijd die u wilt kiezen, is niet mogelijk, maak een andere keuze.'),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
child: const Text('OK'),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
builder: (context) => dateTimePickerController.wrongTimeDialog!,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue