Comments (7)
Which version are you using ?
Latest. I fixed this bug with changing my String variables to String? for state and city.
String countryValue = "";
String? stateValue = "";
String? cityValue = "";
from csc_picker.
Which version are you using ?
from csc_picker.
i m not able to select any country, city or state.. drop down menu is completely irresponsive
from csc_picker.
i m not able to select any country, city or state.. drop down menu is completely irresponsive
@caqlayan above comment is right..try using null safety while declaring Strings
from csc_picker.
Hi. I tried to use that tool but it gave error on picking screen. my code is:
layout: Layout.horizontal, flagState: CountryFlag.ENABLE, showStates: true, showCities: true, dropdownDecoration: kBoxDecorationStyle, disabledDropdownDecoration: kBoxDecorationStyle, onCountryChanged: (value) { setState(() { countryValue = value; }); }, onStateChanged: (value) { setState(() { stateValue = value!; }); }, onCityChanged: (value) { setState(() { cityValue = value!; }); }, selectedItemStyle: TextStyle(fontWeight: FontWeight.bold, color: Colors.black), dropdownDialogRadius: 15.0, searchBarRadius: 15.0, dropdownItemStyle: TextStyle(fontWeight: FontWeight.bold, color: Colors.black), ), The error is: ```I/flutter ( 8694): countryChanged 🇦🇱 Albania null E/flutter ( 8694): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Null check operator used on a null value E/flutter ( 8694): #0 _RegisterScreenState.build.<anonymous closure>.<anonymous closure> (package:datingapp/screens/register.dart:242:47) E/flutter ( 8694): #1 State.setState (package:flutter/src/widgets/framework.dart:1088:30) E/flutter ( 8694): #2 _RegisterScreenState.build.<anonymous closure> (package:datingapp/screens/register.dart:241:27) E/flutter ( 8694): #3 _CSCPickerState._onSelectedCountry.<anonymous closure> (package:csc_picker/csc_picker.dart:695:36) E/flutter ( 8694): #4 State.setState (package:flutter/src/widgets/framework.dart:1088:30) E/flutter ( 8694): #5 _CSCPickerState._onSelectedCountry (package:csc_picker/csc_picker.dart:682:5) E/flutter ( 8694): #6 _CSCPickerState.countryDropdown.<anonymous closure> (package:csc_picker/csc_picker.dart:837:11) E/flutter ( 8694): #7 DropdownWithSearch.build.<anonymous closure>.<anonymous closure> (package:csc_picker/dropdown_with_search.dart:53:22) E/flutter ( 8694): #8 _rootRunUnary (dart:async/zone.dart:1362:47) E/flutter ( 8694): #9 _CustomZone.runUnary (dart:async/zone.dart:1265:19) E/flutter ( 8694): <asynchronous suspension> E/flutter ( 8694):
Did you get any solution ?
from csc_picker.
Hi. I tried to use that tool but it gave error on picking screen. my code is:
layout: Layout.horizontal, flagState: CountryFlag.ENABLE, showStates: true, showCities: true, dropdownDecoration: kBoxDecorationStyle, disabledDropdownDecoration: kBoxDecorationStyle, onCountryChanged: (value) { setState(() { countryValue = value; }); }, onStateChanged: (value) { setState(() { stateValue = value!; }); }, onCityChanged: (value) { setState(() { cityValue = value!; }); }, selectedItemStyle: TextStyle(fontWeight: FontWeight.bold, color: Colors.black), dropdownDialogRadius: 15.0, searchBarRadius: 15.0, dropdownItemStyle: TextStyle(fontWeight: FontWeight.bold, color: Colors.black), ), The error is: ```I/flutter ( 8694): countryChanged 🇦🇱 Albania null E/flutter ( 8694): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Null check operator used on a null value E/flutter ( 8694): #0 _RegisterScreenState.build.<anonymous closure>.<anonymous closure> (package:datingapp/screens/register.dart:242:47) E/flutter ( 8694): #1 State.setState (package:flutter/src/widgets/framework.dart:1088:30) E/flutter ( 8694): #2 _RegisterScreenState.build.<anonymous closure> (package:datingapp/screens/register.dart:241:27) E/flutter ( 8694): #3 _CSCPickerState._onSelectedCountry.<anonymous closure> (package:csc_picker/csc_picker.dart:695:36) E/flutter ( 8694): #4 State.setState (package:flutter/src/widgets/framework.dart:1088:30) E/flutter ( 8694): #5 _CSCPickerState._onSelectedCountry (package:csc_picker/csc_picker.dart:682:5) E/flutter ( 8694): #6 _CSCPickerState.countryDropdown.<anonymous closure> (package:csc_picker/csc_picker.dart:837:11) E/flutter ( 8694): #7 DropdownWithSearch.build.<anonymous closure>.<anonymous closure> (package:csc_picker/dropdown_with_search.dart:53:22) E/flutter ( 8694): #8 _rootRunUnary (dart:async/zone.dart:1362:47) E/flutter ( 8694): #9 _CustomZone.runUnary (dart:async/zone.dart:1265:19) E/flutter ( 8694): <asynchronous suspension> E/flutter ( 8694):
Did you get any solution ?
same error i got
from csc_picker.
anybody got solution
from csc_picker.
Related Issues (20)
- state dropdown is not working when we select american samoa in country HOT 1
- In City Name why it's give Unicode char.
- Need Only country and state in country.json HOT 1
- Italian States completely wrongs. HOT 2
- For Layout.vertical neither showStates=false nor showCities=false are respected HOT 1
- CSCPickerState._onSelectedCountry HOT 3
- There is A problem- Not Showing City of Country BANGLADESH HOT 1
- state missing HOT 2
- Disable state also disable the city HOT 1
- Add config/property to filter countries HOT 1
- STOPPED WORKING AFTER 3.7.3 HOT 4
- Cities Are Called Twice HOT 1
- Cities list does not appear if state list disabled HOT 2
- Error when selecting the country HOT 1
- Can not find city with country subordination
- Missing town Stratford, New Zealand
- Italian states are wrong
- how to search cursive cities and states?
- city keeps showing even after setting showCities to false
- Customise dropdown arrow color
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csc_picker.