Map<String, dynamic> toMap() { // ignore: unnecessary_cast return { 'code': this.code, 'name': this.name, 'children': this.children, } as Map<String, dynamic>; }