diff --git a/lib/new_ui/screens/railway_screen/railway_screen.dart b/lib/new_ui/screens/railway_screen/railway_screen.dart index 4c4b1f82..4ed4115e 100644 --- a/lib/new_ui/screens/railway_screen/railway_screen.dart +++ b/lib/new_ui/screens/railway_screen/railway_screen.dart @@ -69,8 +69,7 @@ class _RailwayConcessionScreenState String futurePassMessage() { DateTime today = DateTime.now(); DateTime lastPass = lastPassIssued ?? DateTime.now(); - DateTime futurePass = lastPass.add( - duration == "Monthly" ? const Duration(days: 27) : Duration(days: 87)); + DateTime futurePass = lastPass.add(duration == "Monthly" ? const Duration(days: 27) : Duration(days: 87)); int diff = futurePass.difference(today).inDays; return "You will be able to apply for a new pass after $diff days"; } diff --git a/lib/new_ui/screens/railway_screen/railwayform.dart b/lib/new_ui/screens/railway_screen/railwayform.dart index 1cc2c689..a6082097 100644 --- a/lib/new_ui/screens/railway_screen/railwayform.dart +++ b/lib/new_ui/screens/railway_screen/railwayform.dart @@ -704,22 +704,25 @@ class _RailwayForm extends ConsumerState { ), SizedBox( width: MediaQuery.of(context).size.width * .45, - child: RailwayDropdownSearch( - editMode: false, - label: "To", - items: mumbaiRailwayStations, - val: toStation, - onChanged: (String? newVal) { - if (newVal != null) { - toStation = newVal; - } - }, - validator: (value) { - if (value == null) { - return 'Please enter your Destination Station'; - } - return null; - }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "To", + style: TextStyle( + fontSize: 16.0, + color: Colors.grey, + ), + ), + SizedBox(height: 8.0), + Text( + toStation, + style: TextStyle( + fontSize: 18.0, + color: Colors.white, + ), + ), + ], ), ), ], diff --git a/lib/new_ui/screens/railway_screen/widgets/railway_dropdown_search.dart b/lib/new_ui/screens/railway_screen/widgets/railway_dropdown_search.dart index dd9997cf..21c46e9a 100644 --- a/lib/new_ui/screens/railway_screen/widgets/railway_dropdown_search.dart +++ b/lib/new_ui/screens/railway_screen/widgets/railway_dropdown_search.dart @@ -21,7 +21,6 @@ class RailwayDropdownSearch extends StatelessWidget { @override Widget build(BuildContext context) { - // debugPrint("RailwayDropdownSearch: $val"); return Padding( padding: const EdgeInsets.all(8.0), child: Container( @@ -38,7 +37,6 @@ class RailwayDropdownSearch extends StatelessWidget { child: Padding( padding: const EdgeInsets.fromLTRB(12, 3, 12, 3), child: DropdownSearch( - //enabled: editMode, validator: validator, selectedItem: val, dropdownDecoratorProps: DropDownDecoratorProps( @@ -49,38 +47,60 @@ class RailwayDropdownSearch extends StatelessWidget { dropdownSearchDecoration: InputDecoration( fillColor: Colors.white, labelText: label, - labelStyle: TextStyle(color: Colors.white), + labelStyle: TextStyle(color: Colors.grey), border: InputBorder.none, ), ), popupProps: PopupProps.dialog( showSearchBox: true, - // itemBuilder: () + searchFieldProps: TextFieldProps( + style: TextStyle(color: Colors.white), + decoration: InputDecoration( + filled: true, + fillColor: Theme.of(context).colorScheme.background, + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: BorderSide( + color: Colors.grey, + ), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: BorderSide( + color: Colors.grey, + ), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: BorderSide( + color: Colors.grey, + width: 2.0, + ), + ), + contentPadding: EdgeInsets.all(10), + hintText: "Search for Station", + hintStyle: TextStyle(color: Colors.grey, fontSize: 16), + ), + ), + + itemBuilder: (context, item, isSelected) { return Padding( padding: const EdgeInsets.all(15.0), child: Container( child: Text( item, - style: Theme.of(context) - .textTheme - .labelSmall! - .copyWith(color: Colors.white), + style: TextStyle(color: Colors.grey), ), ), ); }, containerBuilder: (context, popupWidget) { return Container( - color: Theme.of(context).colorScheme.background, - // color: Colors.purple, - child: popupWidget); + color: Theme.of(context).colorScheme.background, + child: popupWidget, + ); }, - // itemBuilder: (context, item, isSelected) { - // return Container( - // child: Text(item), - // ); - // }), ), dropdownButtonProps: DropdownButtonProps( icon: Icon(