extension methods dart code example
Example: dart extension function
extension NumberParsing on String {
int parseInt() {
return int.parse(this);
}
// ···
}
extension NumberParsing on String {
int parseInt() {
return int.parse(this);
}
// ···
}