GithubHelp home page GithubHelp logo

Comments (7)

caqlayan avatar caqlayan commented on June 22, 2024 2

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.

altafc22 avatar altafc22 commented on June 22, 2024

Which version are you using ?

from csc_picker.

rishuriya avatar rishuriya commented on June 22, 2024

i m not able to select any country, city or state.. drop down menu is completely irresponsive

from csc_picker.

micky113 avatar micky113 commented on June 22, 2024

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.

phanindravarma412 avatar phanindravarma412 commented on June 22, 2024

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.

vaishnavi-sangal avatar vaishnavi-sangal commented on June 22, 2024

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.

Sajidpv avatar Sajidpv commented on June 22, 2024

anybody got solution

from csc_picker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.