Skip to content

Instantly share code, notes, and snippets.

@ha-yi
Created April 27, 2020 10:38
Show Gist options
  • Save ha-yi/56ffcd6363bc94cf8791dedd4bbeb1fa to your computer and use it in GitHub Desktop.
Save ha-yi/56ffcd6363bc94cf8791dedd4bbeb1fa to your computer and use it in GitHub Desktop.
class BaseData<T> {
T data;
String message;
int code;
}
void main() {
BaseData<String> bs = new BaseData();
bs.data = "Halo";
BaseData<List<String>> lbs = new BaseData();
lbs.data = ["Halo", "hellos"];
print(bs.data);
print(lbs.data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment