Created
December 12, 2019 06:03
-
-
Save ipondroid/b19a73e6ae05349e6778cab9305f09c9 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
extension NumberParsing on String { | |
int parseInt() { | |
return int.parse(this); | |
} | |
double parseDouble() { | |
return double.parse(this); | |
} | |
} | |
void main() { | |
print('42.2'.parseDouble()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment