3 ms·
I cannot think of any use of union types in Flutter, if I'm being honest. I'm not much of a TypeScript developer, but if I understand it correctly, it works qui
by vasper 3y ago
I cannot think of any use of union types in Flutter, if I'm being honest.
I'm not much of a TypeScript developer, but if I understand it correctly, it works quite well there because TS is more structural, where a union is more of a representation of the fields shared by two (or more) types.
I feel like Flutter/Dart just works in a bit of a different manner compared to TS/React Native, and it shouldn't be looked at from the same angle.
Swift and Kotlin also do not have union types, and mobile developers somehow manage without them :D