Last active
July 1, 2024 09:08
-
-
Save PlugFox/320ab762655d88e732c625b6f0690dc4 to your computer and use it in GitHub Desktop.
dart void type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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