Last active
November 24, 2020 19:38
-
-
Save internetova/cae10450d5a339a1c28b10892c6d5311 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
// Написать класс с методом, | |
// приводящим полученное значение в строку. | |
void main() { | |
final val = someClass(); | |
print(val.somethingToString(1111)); | |
print(val.somethingToString(11.2)); | |
print(val.somethingToString('что-то')); | |
} | |
class someClass { | |
String somethingToString<T>(T value) => '$value'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment