Skip to content

Instantly share code, notes, and snippets.

@PlugFox
Last active July 1, 2024 09:08
Show Gist options
  • Save PlugFox/320ab762655d88e732c625b6f0690dc4 to your computer and use it in GitHub Desktop.
Save PlugFox/320ab762655d88e732c625b6f0690dc4 to your computer and use it in GitHub Desktop.
dart void type
void main() {
void value = 'Hello world';
print((value as dynamic).runtimeType);
print(Obj<void>().runtimeType);
print(Obj<void>().type);
print(Obj<void>().type is Type);
}
class Obj<T extends Object?> {
Type get type => T;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment