person_name.dart
1.21 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/// A person's name, divided into individual components.
class PersonName {
/// Create a new [PersonName] instance.
const PersonName({
this.first,
this.middle,
this.last,
this.prefix,
this.suffix,
this.formattedName,
this.pronunciation,
});
/// Create a [PersonName] from a map.
factory PersonName.fromNative(Map<Object?, Object?> data) {
return PersonName(
first: data['first'] as String?,
middle: data['middle'] as String?,
last: data['last'] as String?,
prefix: data['prefix'] as String?,
suffix: data['suffix'] as String?,
formattedName: data['formattedName'] as String?,
pronunciation: data['pronunciation'] as String?,
);
}
/// The person's first name.
final String? first;
/// The person's middle name.
final String? middle;
/// The person's last name.
final String? last;
/// The prefix of the person's name.
final String? prefix;
/// The suffix of the person's name.
final String? suffix;
/// The person's name in a structured format.
final String? formattedName;
/// The pronunciation of the person's name.
///
/// This is used for the "kana" name in Japanese phonebooks.
final String? pronunciation;
}