flutter / gallery

Flutter Gallery was a resource to help developers evaluate and use Flutter
BSD 3-Clause "New" or "Revised" License
6.4k stars 1.55k forks source link

https://gallery.flutter.dev/#/demo/text-field is very verbose #874

Open kamlesh1808 opened 2 years ago

kamlesh1808 commented 2 years ago

Use case

I have reviewed example code https://gallery.flutter.dev/#/demo/text-field. I think it is very verbose. The concept of having TextFormFieldDemo and TextFormFieldDemoState I believe is a lot of code for such simple demo app.

Proposal

Reduce TextFormFieldDemo and TextFormFieldDemoState to a single class. Weather a widget is Stateful or Stateless should be internal and should not need explicit declaration by extending a State class. State should be POJOs.

darshankawar commented 1 year ago

/cc @guidezpl Wondering if this should remain in this repo or can be transferred to https://github.com/flutter/gallery/issues ?

guidezpl commented 1 year ago

Hey, all gallery issues can be transferred over

darshankawar commented 1 year ago

Thanks for confirming. Transferring this to dedicated repo.