24 lines
626 B
Dart
24 lines
626 B
Dart
|
|
import 'package:hiddingsel_app/appflow/model/images.dart';
|
|
import 'package:hiddingsel_app/appflow/model/interfaces.dart';
|
|
|
|
|
|
class PersonModel with Name, IsSearchable{
|
|
|
|
final String name;
|
|
final ImageModel image;
|
|
final String? position;
|
|
get tags => [name];
|
|
|
|
const PersonModel.withImageModel(this.name, this.image, {this.position});
|
|
PersonModel(this.name, String imageResource, {this.position}) : image = ImageModel(imageResource);
|
|
|
|
factory PersonModel.fromJson(Map<String, dynamic> json) => PersonModel(
|
|
json['name'] as String,
|
|
json['image'] as String,
|
|
position: json['position'] as String?,
|
|
);
|
|
|
|
|
|
}
|