Skip to content

Instantly share code, notes, and snippets.

{
"swagger": "2.0",
"info": {
"description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
"version": "1.0.0",
"title": "Swagger Petstore",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"email": "apiteam@swagger.io"
},
void main() {
Foo f = Foo();
List<Type> myTypes = [Foo, Bar];
Type firstType = myTypes.first;
print ("f.runtimeType: ${f.runtimeType}");
print ("firstType.toString: ${firstType.toString()}");
if (f.runtimeType.toString() == firstType.toString()) {