import 'package:test_sa/models/base.dart'; class ApplicationDemoRoleModel extends Base { final int? value; final String identifier; ApplicationDemoRoleModel({ required String id, required String name, this.value, }) : identifier = id.toString(), super(identifier: id, name: name); factory ApplicationDemoRoleModel.fromJson(Map json) { return ApplicationDemoRoleModel( id: json['id'] ?? '', name: json['name'] ?? '', value: json['fixedName'] != null ? int.tryParse(json['fixedName'].toString()) : null, ); } }