fixed some docs and mistake

This commit is contained in:
Thomas Klein Langenhorst 2022-09-02 17:10:36 +02:00
parent fc42f21b1b
commit 3752adcb7e
3 changed files with 24 additions and 40 deletions

View file

@ -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,

View file

@ -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!);
}
}

View file

@ -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!,
);
}
}