ItineratRefresh
This commit is contained in:
parent
a8712dcb68
commit
4887c69950
@ -913,7 +913,7 @@ class _ListAllPlansState extends State<ListAllPlans> {
|
|||||||
size: 18,
|
size: 18,
|
||||||
),
|
),
|
||||||
tooltip:
|
tooltip:
|
||||||
'Download The Trip Details',
|
'Download The PDF',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(
|
Navigator.pop(
|
||||||
context,
|
context,
|
||||||
|
|||||||
@ -931,7 +931,7 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
size: 18,
|
size: 18,
|
||||||
),
|
),
|
||||||
tooltip:
|
tooltip:
|
||||||
'Download The Trip Details',
|
'Download The PDF',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(
|
Navigator.pop(
|
||||||
context,
|
context,
|
||||||
@ -1170,7 +1170,7 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
size: 18,
|
size: 18,
|
||||||
),
|
),
|
||||||
tooltip:
|
tooltip:
|
||||||
'Download The Trip Details',
|
'Download The PDF',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
apiService
|
apiService
|
||||||
|
|||||||
@ -559,6 +559,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
|||||||
initialDate: initialDate,
|
initialDate: initialDate,
|
||||||
firstDate: initialDate,
|
firstDate: initialDate,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
// DateTime? pickedDate = await showDatePicker(
|
// DateTime? pickedDate = await showDatePicker(
|
||||||
@ -703,6 +704,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
|||||||
initialDate: initialDate,
|
initialDate: initialDate,
|
||||||
firstDate: firstDate,
|
firstDate: firstDate,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
||||||
|
|||||||
@ -376,6 +376,7 @@ class _BusScreenState extends State<BusScreen> {
|
|||||||
: today,
|
: today,
|
||||||
firstDate: today,
|
firstDate: today,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
||||||
@ -418,8 +419,6 @@ class _BusScreenState extends State<BusScreen> {
|
|||||||
if (isToday && isPastTime) {
|
if (isToday && isPastTime) {
|
||||||
setState(() {
|
setState(() {
|
||||||
errorMessages["time"] = "You can't select a past time.";
|
errorMessages["time"] = "You can't select a past time.";
|
||||||
_selectedCheckOutTime = null; // ✅ Reset time variable
|
|
||||||
_timeController.text = ""; // ✅ Clear text field
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@ -585,7 +584,11 @@ class _BusScreenState extends State<BusScreen> {
|
|||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () => _selectCheckOutTime(context),
|
onTap: () {
|
||||||
|
// _selectedCheckOutTime = null; // ✅ Reset time variable
|
||||||
|
_timeController.text = ""; // ✅ Clear text field
|
||||||
|
_selectCheckOutTime(context);
|
||||||
|
},
|
||||||
child: AbsorbPointer(
|
child: AbsorbPointer(
|
||||||
child: TextField(
|
child: TextField(
|
||||||
focusNode: _timeFocusNode,
|
focusNode: _timeFocusNode,
|
||||||
|
|||||||
@ -1208,6 +1208,7 @@ class FlightScreenState extends State<FlightScreen> {
|
|||||||
initialDate: initialDate,
|
initialDate: initialDate,
|
||||||
firstDate: firstDate,
|
firstDate: firstDate,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
||||||
|
|||||||
@ -819,6 +819,7 @@ class _ForexScreenState extends State<ForexScreen> {
|
|||||||
initialDate: initialDate,
|
initialDate: initialDate,
|
||||||
firstDate: initialDate,
|
firstDate: initialDate,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
// DateTime? pickedDate = await showDatePicker(
|
// DateTime? pickedDate = await showDatePicker(
|
||||||
@ -870,6 +871,7 @@ class _ForexScreenState extends State<ForexScreen> {
|
|||||||
initialDate: initialDate,
|
initialDate: initialDate,
|
||||||
firstDate: initialDate,
|
firstDate: initialDate,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
// DateTime? pickedDate = await showDatePicker(
|
// DateTime? pickedDate = await showDatePicker(
|
||||||
|
|||||||
@ -576,6 +576,7 @@ class _InsuranceScreenState extends State<InsuranceScreen> {
|
|||||||
initialDate: initialDate,
|
initialDate: initialDate,
|
||||||
firstDate: initialDate,
|
firstDate: initialDate,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
// DateTime? pickedDate = await showDatePicker(
|
// DateTime? pickedDate = await showDatePicker(
|
||||||
@ -602,12 +603,12 @@ class _InsuranceScreenState extends State<InsuranceScreen> {
|
|||||||
DateTime now = DateTime.now();
|
DateTime now = DateTime.now();
|
||||||
DateTime today = DateTime(now.year, now.month, now.day);
|
DateTime today = DateTime(now.year, now.month, now.day);
|
||||||
|
|
||||||
DateTime? checkInDate;
|
// DateTime? checkInDate;
|
||||||
try {
|
// try {
|
||||||
checkInDate = DateTime.parse(_startdateController.text);
|
// checkInDate = DateTime.parse(_startdateController.text);
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
checkInDate = today;
|
// checkInDate = today;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// // Ensure at least today is used
|
// // Ensure at least today is used
|
||||||
// DateTime firstDate = checkInDate.isAfter(today) ? checkInDate : today;
|
// DateTime firstDate = checkInDate.isAfter(today) ? checkInDate : today;
|
||||||
@ -616,20 +617,52 @@ class _InsuranceScreenState extends State<InsuranceScreen> {
|
|||||||
// ? _selectedCheckOutDate!
|
// ? _selectedCheckOutDate!
|
||||||
// : firstDate;
|
// : firstDate;
|
||||||
|
|
||||||
DateTime firstDate = checkInDate;
|
// DateTime firstDate = checkInDate;
|
||||||
DateTime initialDate =
|
// DateTime initialDate =
|
||||||
_selectedCheckOutDate != null &&
|
// _selectedCheckOutDate != null &&
|
||||||
_selectedCheckOutDate!.isAfter(firstDate)
|
// _selectedCheckOutDate!.isAfter(firstDate)
|
||||||
? _selectedCheckOutDate!
|
// ? _selectedCheckOutDate!
|
||||||
: firstDate;
|
// : firstDate;
|
||||||
|
|
||||||
|
DateTime? validFromDate;
|
||||||
|
|
||||||
|
try {
|
||||||
|
String fromDateText = _startdateController.text.trim();
|
||||||
|
print("Valid From Text: $fromDateText");
|
||||||
|
if (fromDateText.isNotEmpty) {
|
||||||
|
validFromDate = DateFormat('dd-MM-yyyy').parseStrict(fromDateText);
|
||||||
|
print("Parsed Valid From: $validFromDate");
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print("Error parsing valid from date: $e");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use max(today, validFromDate) as firstDate
|
||||||
|
// DateTime firstDate = today;
|
||||||
|
DateTime firstDate = validFromDate ?? today;
|
||||||
|
if (validFromDate != null && validFromDate.isAfter(today)) {
|
||||||
|
firstDate = validFromDate;
|
||||||
|
}
|
||||||
final pickedDate = await showDatePicker(
|
final pickedDate = await showDatePicker(
|
||||||
context: context,
|
context: context,
|
||||||
initialDate: initialDate,
|
// initialDate: initialDate,
|
||||||
|
// firstDate: initialDate,
|
||||||
|
// firstDate: DateTime(1900),
|
||||||
|
initialDate: firstDate,
|
||||||
firstDate: firstDate,
|
firstDate: firstDate,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// final pickedDate = await showDatePicker(
|
||||||
|
// context: context,
|
||||||
|
// // initialDate: initialDate,
|
||||||
|
// initialDate: initialDate,
|
||||||
|
// firstDate: initialDate,
|
||||||
|
// lastDate: DateTime(2100),
|
||||||
|
// initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
|
// );
|
||||||
|
|
||||||
// DateTime? pickedDate = await showDatePicker(
|
// DateTime? pickedDate = await showDatePicker(
|
||||||
// context: context,
|
// context: context,
|
||||||
// initialDate: _selectedCheckOutDate != null &&
|
// initialDate: _selectedCheckOutDate != null &&
|
||||||
|
|||||||
@ -484,6 +484,7 @@ class _TaxiScreenState extends State<TaxiScreen> {
|
|||||||
: today,
|
: today,
|
||||||
firstDate: today,
|
firstDate: today,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
||||||
|
|||||||
@ -243,6 +243,12 @@ class _TrainScreenState extends State<TrainScreen> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (selectedFrom == selectedTo) {
|
||||||
|
errorMessages["to_station"] = "Change Destination";
|
||||||
|
}
|
||||||
|
|
||||||
|
print("Error: to_place -> Change Destination (selectedFrom == selectedTo)");
|
||||||
|
|
||||||
return errorMessages.isEmpty; // Valid if there are no errors
|
return errorMessages.isEmpty; // Valid if there are no errors
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,6 +470,7 @@ class _TrainScreenState extends State<TrainScreen> {
|
|||||||
: today,
|
: today,
|
||||||
firstDate: today,
|
firstDate: today,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
||||||
@ -801,7 +808,10 @@ class _TrainScreenState extends State<TrainScreen> {
|
|||||||
),
|
),
|
||||||
if (errorMessages["to_station"] != null) ...[
|
if (errorMessages["to_station"] != null) ...[
|
||||||
SizedBox(height: 5), // Space before error message
|
SizedBox(height: 5), // Space before error message
|
||||||
Text("Required", style: TextStyle(color: Colors.red, fontSize: 12)),
|
Text(
|
||||||
|
errorMessages["to_station"]!,
|
||||||
|
style: TextStyle(color: Colors.red, fontSize: 12),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -394,6 +394,7 @@ class _VisaScreenState extends State<VisaScreen> {
|
|||||||
initialDate: initialDate,
|
initialDate: initialDate,
|
||||||
firstDate: initialDate,
|
firstDate: initialDate,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
// DateTime? pickedDate = await showDatePicker(
|
// DateTime? pickedDate = await showDatePicker(
|
||||||
|
|||||||
@ -107,6 +107,7 @@ class DynamicItineraryState extends State<DynamicItinerary> {
|
|||||||
// selectedIndex = null;
|
// selectedIndex = null;
|
||||||
// selectedItem = null;
|
// selectedItem = null;
|
||||||
// });
|
// });
|
||||||
|
|
||||||
updateTripType(widget.tripType);
|
updateTripType(widget.tripType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -166,6 +167,20 @@ class DynamicItineraryState extends State<DynamicItinerary> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<String> getAllowedServiceNames() {
|
List<String> getAllowedServiceNames() {
|
||||||
|
print(
|
||||||
|
"DID Updatee changee - $selectedOption $selectedListOption $isSelected $selectedItem $selectedIndex",
|
||||||
|
);
|
||||||
|
setState(() {
|
||||||
|
selectedOption = "";
|
||||||
|
selectedListOption = "";
|
||||||
|
isSelected = false;
|
||||||
|
selectedIndex = null;
|
||||||
|
selectedItem = null;
|
||||||
|
});
|
||||||
|
print(
|
||||||
|
"DID Updatee changee - $selectedOption $isSelected $selectedItem $selectedIndex",
|
||||||
|
);
|
||||||
|
|
||||||
if (widget.tripType == "1") {
|
if (widget.tripType == "1") {
|
||||||
return ["flight", "accomodation", "train", "bus", "taxi"];
|
return ["flight", "accomodation", "train", "bus", "taxi"];
|
||||||
} else if (widget.tripType == "2") {
|
} else if (widget.tripType == "2") {
|
||||||
|
|||||||
@ -1009,7 +1009,7 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
size: 18,
|
size: 18,
|
||||||
),
|
),
|
||||||
tooltip:
|
tooltip:
|
||||||
'Download The Trip Comments',
|
'Download The PDF',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(
|
Navigator.pop(
|
||||||
context,
|
context,
|
||||||
@ -1256,7 +1256,7 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
size: 18,
|
size: 18,
|
||||||
),
|
),
|
||||||
tooltip:
|
tooltip:
|
||||||
'Download The Trip Comments',
|
'Download The PDF',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
apiService
|
apiService
|
||||||
|
|||||||
@ -1342,6 +1342,7 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
: today,
|
: today,
|
||||||
firstDate: today,
|
firstDate: today,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
||||||
@ -1450,6 +1451,7 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
: minDate,
|
: minDate,
|
||||||
firstDate: minDate,
|
firstDate: minDate,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedEndDate) {
|
if (pickedDate != null && pickedDate != _selectedEndDate) {
|
||||||
|
|||||||
@ -639,7 +639,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
if (!widget.apiselectedUser) ...[
|
if (!widget.apiselectedUser) ...[
|
||||||
buildPassword(),
|
buildPassword(),
|
||||||
SizedBox(width: MediaQuery.of(context).size.width*0.015),
|
SizedBox(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.015,
|
||||||
|
),
|
||||||
buildRole(),
|
buildRole(),
|
||||||
] else ...[
|
] else ...[
|
||||||
// TextButton(
|
// TextButton(
|
||||||
@ -1046,6 +1048,7 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
: today,
|
: today,
|
||||||
firstDate: DateTime(1900),
|
firstDate: DateTime(1900),
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedDateOfBirth) {
|
if (pickedDate != null && pickedDate != _selectedDateOfBirth) {
|
||||||
|
|||||||
@ -163,8 +163,7 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
|
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
setState(() {
|
setState(() {
|
||||||
errorMessages["passport_number"] =
|
errorMessages["passport_number"] = "Enter 8 characters";
|
||||||
"Enter 8 characters";
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
@ -177,8 +176,6 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Future<void> apiCheckDuplicate(
|
Future<void> apiCheckDuplicate(
|
||||||
String label,
|
String label,
|
||||||
String field,
|
String field,
|
||||||
@ -1370,6 +1367,7 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
// firstDate: today,
|
// firstDate: today,
|
||||||
firstDate: DateTime(1900),
|
firstDate: DateTime(1900),
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedDateOfIssue) {
|
if (pickedDate != null && pickedDate != _selectedDateOfIssue) {
|
||||||
@ -1480,16 +1478,17 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
|
|
||||||
DateTime? pickedDate = await showDatePicker(
|
DateTime? pickedDate = await showDatePicker(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
||||||
// initialDate:
|
// initialDate:
|
||||||
// _selectedDateOfExpiry != null &&
|
// _selectedDateOfExpiry != null &&
|
||||||
// _selectedDateOfExpiry!.isAfter(firstDate)
|
// _selectedDateOfExpiry!.isAfter(firstDate)
|
||||||
// ? _selectedDateOfExpiry!
|
// ? _selectedDateOfExpiry!
|
||||||
// : today,
|
// : today,
|
||||||
|
initialDate: firstDate,
|
||||||
initialDate:firstDate,
|
|
||||||
firstDate: firstDate,
|
firstDate: firstDate,
|
||||||
// firstDate: DateTime(1900),
|
// firstDate: DateTime(1900),
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null) {
|
if (pickedDate != null) {
|
||||||
@ -2602,6 +2601,7 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
: today,
|
: today,
|
||||||
firstDate: DateTime(1900),
|
firstDate: DateTime(1900),
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedExpiryDate) {
|
if (pickedDate != null && pickedDate != _selectedExpiryDate) {
|
||||||
@ -3790,6 +3790,7 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
// firstDate: initialDate,
|
// firstDate: initialDate,
|
||||||
firstDate: DateTime(1900),
|
firstDate: DateTime(1900),
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
||||||
@ -3866,7 +3867,6 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
print("buildVisaValidUpTo ");
|
print("buildVisaValidUpTo ");
|
||||||
print("buildVisaValidUpTo - ${entry["controller_valid_from"].text}");
|
print("buildVisaValidUpTo - ${entry["controller_valid_from"].text}");
|
||||||
|
|
||||||
|
|
||||||
// Parse date from notifier if available, else use today
|
// Parse date from notifier if available, else use today
|
||||||
DateTime initialDate = today;
|
DateTime initialDate = today;
|
||||||
|
|
||||||
@ -3903,6 +3903,7 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
initialDate: firstDate,
|
initialDate: firstDate,
|
||||||
firstDate: firstDate,
|
firstDate: firstDate,
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
if (pickedDate != null && pickedDate != _selectedCheckOutDate) {
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
// import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'dart:html' as html;
|
import 'dart:html' as html;
|
||||||
import 'package:frontend/config/apiUrl.dart'; // 1 newly added
|
import 'package:frontend/config/apiUrl.dart'; // 1 newly added
|
||||||
import 'package:frontend/services/apiService.dart';
|
import 'package:frontend/services/apiService.dart';
|
||||||
@ -31,7 +31,7 @@ class _MyAppState extends State<MyApp> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
// SemanticsBinding.instance.ensureSemantics(); // ✅ Safe here
|
SemanticsBinding.instance.ensureSemantics(); // ✅ Safe here
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
final uri = Uri.parse(html.window.location.href);
|
final uri = Uri.parse(html.window.location.href);
|
||||||
if (uri.path == '/authredirection' &&
|
if (uri.path == '/authredirection' &&
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user