bosskmk / pluto_grid

PlutoGrid is a dataGrid for flutter that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.
https://pluto.weblaze.dev
MIT License
664 stars 305 forks source link

[Help] Maintaining State with a Custom Widget Controller for PlutoGrid? #880

Closed SteveBraich closed 1 year ago

SteveBraich commented 1 year ago

So I am relatively new to flutter. I really don't care for the solutions I see out there for maintaining state. In my opinion, there is an ungodly amount of plumbing required to do this that quite frankly should be obfuscated from the developer, but I digress.

What about using a custom Widget controller for PlutoGrid. I do see a Scroll Controller class being mentioned a lot with reference to grids, including PlutoGrid.

In essence, what I'm looking for is a good example of a simple solution that populates a PlutoGrid using an JSON API via a list of custom class objects. The icing on the cake would be a custom Widget controller for PlutoGrid.

SteveBraich commented 1 year ago

I posted this on stackoverflow and later was able to answer my own question:

https://stackoverflow.com/questions/76617271/how-do-i-dynamically-load-a-plutogrid-from-an-api-call-that-returns-json/

I also posted another version of this question on stackoverflow. I think you will find this helpful:

https://stackoverflow.com/questions/76641590/cant-map-a-json-response-to-a-class-object-in-flutter