Created
May 2, 2023 04:11
-
-
Save daiki1003/6f45a0051c541cc11c8cf80b09c93c5d to your computer and use it in GitHub Desktop.
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
enum Sample<T> { | |
hoge<int>(value: 0), | |
fuga<String>(value: 'I\'m fuga'), | |
withNull<int?>(value: null), | |
; | |
const Sample({required this.value}); | |
final T value; | |
} | |
void main() { | |
print(Sample.hoge.value); | |
print(Sample.fuga.value); | |
print(Sample.withNull.value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment