You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
588 B
Dart
22 lines
588 B
Dart
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<String, dynamic> json) {
|
|
return ApplicationDemoRoleModel(
|
|
id: json['id'] ?? '',
|
|
name: json['name'] ?? '',
|
|
value: json['fixedName'] != null ? int.tryParse(json['fixedName'].toString()) : null,
|
|
);
|
|
}
|
|
}
|