An open API service indexing awesome lists of open source software.

https://github.com/apgapg/flutter_sample_key

Medium Article
https://github.com/apgapg/flutter_sample_key

dart flutter key objectkey uniquekey valuekey

Last synced: 9 months ago
JSON representation

Medium Article

Awesome Lists containing this project

README

          

# flutter_sample_key

A sample on how to use keys in flutter. Full article [here](https://medium.com/@ayushpguptaapg/using-keys-in-flutter-1c5fb586b2a5)

### PROBLEM STATEMENT:

Suppose we have two simple TextFields (wrapped as a stateful widget named MyTextField) in a Column and let’s say you hide the first of two on FAB(Floating Action Button) press. The first one should hide and second one should take its place.

### ITERATION 1: Not using keys:
PieChart

### ITERATION 2: Using ValueKey:
PieChart

### Experiment: Using UniqueKey:
PieChart