Skip to content

Instantly share code, notes, and snippets.

@ipondroid
Created December 12, 2019 06:03
Show Gist options
  • Save ipondroid/b19a73e6ae05349e6778cab9305f09c9 to your computer and use it in GitHub Desktop.
Save ipondroid/b19a73e6ae05349e6778cab9305f09c9 to your computer and use it in GitHub Desktop.
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