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
- Host: GitHub
- URL: https://github.com/apgapg/flutter_sample_key
- Owner: apgapg
- Created: 2019-07-06T08:05:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-03T05:08:20.000Z (about 6 years ago)
- Last Synced: 2025-07-23T17:50:15.075Z (10 months ago)
- Topics: dart, flutter, key, objectkey, uniquekey, valuekey
- Language: Dart
- Homepage: https://medium.com/@ayushpguptaapg/using-keys-in-flutter-1c5fb586b2a5
- Size: 302 KB
- Stars: 11
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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:

### ITERATION 2: Using ValueKey:

### Experiment: Using UniqueKey:
