class SelectState extends StatefulWidget {
final ValueChanged onCountryChanged;
final ValueChanged onStateChanged;
final ValueChanged onCityChanged;
final TextStyle? style;
final Color? dropdownColor;
final String? city;
final String? state;
final String? country;
const SelectState(
{Key? key,
required this.onCountryChanged,
required this.onStateChanged,
required this.onCityChanged,
this.style,
this.dropdownColor,
this.city, this.country, this.state})
: super(key: key);
@OverRide
_SelectStateState createState() =>
_SelectStateState(this.city, this.state, this.country);
}
class _SelectStateState extends State {
List _cities = ["Choose City"];
List _country = ["Choose Country"];
String _selectedCity = "Choose City";
String _selectedCountry = "Choose Country";
String _selectedState = "Choose State";
List _states = ["Choose State"];
var responses;
_SelectStateState(String? city, String? state, String? country) {
_selectedCity = widget.city ?? "Choose City";
_selectedCountry = widget.country ?? "Choose Country";
_selectedState = widget.state ?? "Choose State";
}
@OverRide
void initState() {
getCounty();
super.initState();
}