FlutterCSCPicker constructor

const FlutterCSCPicker({
  1. Key? key,
  2. required ValueChanged<String> onCountryChanged,
  3. required ValueChanged<String> onStateChanged,
  4. required ValueChanged<String> onCityChanged,
  5. InputDecoration decoration = const InputDecoration(contentPadding: EdgeInsets.symmetric(horizontal: 10), border: OutlineInputBorder(borderSide: BorderSide(color: Color(0xFF808080), width: .3), borderRadius: BorderRadius.all(Radius.circular(5)))),
  6. Widget arrowIcon = const Icon(Icons.keyboard_arrow_right_outlined, color: Colors.black),
  7. double spacing = 10.0,
  8. double titleSpacing = 5.0,
  9. TextStyle? style,
  10. Color? dropdownColor,
  11. VoidCallback? onCountryTap,
  12. VoidCallback? onStateTap,
  13. VoidCallback? onCityTap,
  14. bool isCountyTitle = true,
  15. bool isStateTitle = true,
  16. bool isCityTitle = true,
  17. Layout layout = Layout.vertical,
  18. String countyTitle = 'Country*',
  19. String stateTitle = 'State*',
  20. String cityTitle = 'City*',
  21. TextStyle? titleStyle,
})

Implementation

const FlutterCSCPicker({
  Key? key,
  required this.onCountryChanged,
  required this.onStateChanged,
  required this.onCityChanged,
  this.decoration = const InputDecoration(
    contentPadding: EdgeInsets.symmetric(horizontal: 10),
    border: OutlineInputBorder(
      borderSide: BorderSide(color: Color(0xFF808080), width: .3),
      borderRadius: BorderRadius.all(
        Radius.circular(5),
      ),
    ),
  ),
  this.arrowIcon = const Icon(
    Icons.keyboard_arrow_right_outlined,
    color: Colors.black,
  ),
  this.spacing = 10.0,
  this.titleSpacing = 5.0,
  this.style,
  this.dropdownColor,
  this.onCountryTap,
  this.onStateTap,
  this.onCityTap,
  this.isCountyTitle = true,
  this.isStateTitle = true,
  this.isCityTitle = true,
  this.layout = Layout.vertical,
  this.countyTitle = 'Country*',
  this.stateTitle = 'State*',
  this.cityTitle = 'City*',
  this.titleStyle,
}) : super(key: key);