Flutter – Union type for primitive types data in dart
How can I define a variable with only two possible primitive types, such as (String or num) for example, in Dart? Is there a way to do this? like union types in TypeScript. const x:string|number;