Giter Site home page Giter Site logo

material_dropdown_formfield's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working on flutter_janus_client,janusjs,januscaler etc.
  • ๐ŸŒฑ Iโ€™m currently learning golang,flutter,webrtc
  • ๐Ÿ’ฌ Ask me about flutter and webrtc or web development in general

material_dropdown_formfield's People

Contributors

shivanshtalwar0 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

material_dropdown_formfield's Issues

Received initial value not getting set-> validator says it's null

Hello, and thank you for this awesome widget.
I think I have found a bug in it's functionality. The moment i received a value from a provider, it is getting set, it shows on the screen, but when i call the validate method it the value is null.

I think I know why this is happening. It is because the widget if it gets an initial value should also call onChange method.
I think that this issue is handled by the developer of dropdown_formfield by adding it as a field that you can add.
If there is anymore help i can provide, please do ask.

If the initial value is received from a provider the value is null

  • The value is set using setState and it shows up on the screen, but when _formKey.currentState.validate() si triggered the value in validator:(value){} is null.

The checking of value should be: if(value==null || value=='') return 'This field is required';
If the widget receives a new value it should call setState on it's new value and handle it internal so that the value that the validator receives is not null.

I will try to research this and help you, but in the mean time this is still an issue.

The problem seems to be here:

value: value == '' ? null : value,
  onChanged: (dynamic newValue) {
                                state.didChange(newValue);
                                validator(newValue);
                                onChanged(newValue);
                              },

At first the value is '' but after I set the value to something it becomes 'something' but the onChangeMethod is not triggered with the newValue.
We have to find a way to force that trigger.

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.