forked from droidconKE/flutterconKEApp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspeaker.dart
More file actions
32 lines (27 loc) · 834 Bytes
/
speaker.dart
File metadata and controls
32 lines (27 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import 'package:freezed_annotation/freezed_annotation.dart';
part 'speaker.freezed.dart';
part 'speaker.g.dart';
@freezed
abstract class Speaker with _$Speaker {
const factory Speaker({
required String name,
required String biography,
required String avatar,
String? tagline,
String? twitter,
String? facebook,
String? linkedin,
String? instagram,
String? blog,
@JsonKey(name: 'company_website') String? companyWebsite,
}) = _Speaker;
factory Speaker.fromJson(Map<String, Object?> json) =>
_$SpeakerFromJson(json);
}
@freezed
abstract class SpeakerResponse with _$SpeakerResponse {
const factory SpeakerResponse({required List<Speaker> data}) =
_SpeakerResponse;
factory SpeakerResponse.fromJson(Map<String, Object?> json) =>
_$SpeakerResponseFromJson(json);
}