formatted all files.

This commit is contained in:
Faris Armoush
2025-06-12 15:33:32 +03:00
parent 29959f567e
commit 04250ebc98
474 changed files with 5425 additions and 4338 deletions

View File

@ -1,5 +1,3 @@
import 'package:flutter/material.dart';
class HourPickerDialog extends StatefulWidget {
@ -18,7 +16,7 @@ class _HourPickerDialogState extends State<HourPickerDialog> {
void initState() {
super.initState();
// Initialize the selectedHour with the initial time passed to the dialog
selectedHour = widget.initialTime.hour.toString().padLeft(2, '0') + ':00';
selectedHour = '${widget.initialTime.hour.toString().padLeft(2, '0')}:00';
}
@override
@ -28,7 +26,7 @@ class _HourPickerDialogState extends State<HourPickerDialog> {
content: DropdownButton<String>(
value: selectedHour, // Show the currently selected hour
items: List.generate(24, (index) {
String hour = index.toString().padLeft(2, '0');
final hour = index.toString().padLeft(2, '0');
return DropdownMenuItem<String>(
value: '$hour:00',
child: Text('$hour:00'),
@ -37,14 +35,16 @@ class _HourPickerDialogState extends State<HourPickerDialog> {
onChanged: (String? newValue) {
if (newValue != null) {
setState(() {
selectedHour = newValue; // Update the selected hour without closing the dialog
selectedHour =
newValue; // Update the selected hour without closing the dialog
});
}
},
),
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(null), // Close the dialog without selection
onPressed: () => Navigator.of(context)
.pop(null), // Close the dialog without selection
child: const Text('Cancel'),
),
TextButton(