mirror of
https://github.com/Iconica-Development/flutter_date_time_picker.git
synced 2025-05-19 02:43:50 +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: [
|
/// markedDates: [
|
||||||
/// DateTime(2022, 3, 14),
|
/// 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(
|
/// header: Container(
|
||||||
/// height: 100,
|
/// height: 100,
|
||||||
/// width: MediaQuery.of(context).size.width,
|
/// width: MediaQuery.of(context).size.width,
|
||||||
|
|
|
@ -88,27 +88,9 @@ class MonthDateTimePicker extends StatelessWidget {
|
||||||
dateTimePickerController.disabledTimes ?? [],
|
dateTimePickerController.disabledTimes ?? [],
|
||||||
)) {
|
)) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => AlertDialog(
|
builder: (context) =>
|
||||||
title: const Text('Verkeerde tijd gekozen'),
|
dateTimePickerController.wrongTimeDialog!);
|
||||||
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);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,25 +62,7 @@ class WeekDateTimePicker extends StatelessWidget {
|
||||||
)) {
|
)) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => AlertDialog(
|
builder: (context) => dateTimePickerController.wrongTimeDialog!,
|
||||||
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);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue