{
"android_version": "1.0.0",
"ios_version": "1.0.0"
}
I have this json data which i want to parse. Parsing json is easy. But i cannot implement this method:
class AppVersion {
int level1;
int level2;
int level3;
AppVersion(this.level1, this.level2, this.level3);
factory AppVersion.fromString(String text){
// TODO: implement parsing String "X.X.X" into 3 integers
return AppVersion(1, 0, 0);
}
}