CountryCityDetails Screen
Props :
CountryDetails? country;
CityDetails? city;Composed by :
- CountryCityDetailsHeader(onCountrySelected, onCountryCompareSelected)
- CountryCityDetailsBody
- CountryCityDetailsFooter(onComparePressed)
- WidgetPicker
- BottomSheetDataSources
onCountrySelected => open WidgetPicker onCountryCompareSelected => open WidgetPicker onComparePressed => open WidgetPicker
CountryCityDetailsHeader
Props :
String countryName
String compareCountryNameEmits onCountrySelected Emits onCountryCompareSelected
CountryCityDetailsBody
Props :
bool isCountry;
List<MapIndex> indexesComposed by :
- CountryCityDetailsIndexesSection(String title, String asset, List
indexes) x5 - CityList(onCitySelected) (if country)
onCitySelected => open CountryCityDetails
CountryCityDetailsIndexesSection
Props :
String title;
String asset;
List<MapIndex> indexes
List<MapIndex>? indexesCompare
Widget? bottomWidget;Composed by :
- x CountryCityDetailsIndex(title, value, value2)
Handle one indexes section
- Expandable sections
- BottomWidget parameter is passed if you want to display something below indexes (eg: text for quality of life)
CountryCityDetailsIndexSolo
Props :
String title;
double value;enum BestIndex { lower, upper }
Handle display of 1 index solo.
## CountryCityDetailsIndexDuo
Props :
double? value2;
BestIndex? bestHandle display of 1 index duo If value2 is provided we are in compared mode otherwise normal mode. On compare mode, green value is decided by the 'best' parameters. If lower is given, the lowest value will be printed in green. If upper is given, the highest value will be printed in green.
CountryCityDetailsFooter
Handle "Comparer avec un autre pays" button if it's country. Emit onComparePressed
BottomSheetDataSources
Handle the bottom sheet. Text is hardcoded
CityList
Props :
List<City> cities;Handle list of city. Emits onCitySelected.