mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
// Copyright 2018 The Flutter team. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
class Contact {
|
|
Contact({
|
|
required this.id,
|
|
required this.firstName,
|
|
this.middleName,
|
|
required this.lastName,
|
|
this.suffix,
|
|
});
|
|
|
|
final int id;
|
|
final String firstName;
|
|
final String lastName;
|
|
final String? middleName;
|
|
final String? suffix;
|
|
}
|
|
|
|
final johnAppleseed = Contact(id: 0, firstName: 'John', lastName: 'Appleseed');
|
|
final kateBell = Contact(id: 1, firstName: 'Kate', lastName: 'Bell');
|
|
final annaHaro = Contact(id: 2, firstName: 'Anna', lastName: 'Haro');
|
|
final danielHiggins = Contact(
|
|
id: 3,
|
|
firstName: 'Daniel',
|
|
lastName: 'Higgins',
|
|
suffix: 'Jr.',
|
|
);
|
|
final davidTaylor = Contact(id: 4, firstName: 'David', lastName: 'Taylor');
|
|
final hankZakroff = Contact(
|
|
id: 5,
|
|
firstName: 'Hank',
|
|
middleName: 'M.',
|
|
lastName: 'Zakroff',
|
|
);
|
|
|
|
final Set<Contact> allContacts = <Contact>{
|
|
johnAppleseed,
|
|
kateBell,
|
|
annaHaro,
|
|
danielHiggins,
|
|
davidTaylor,
|
|
hankZakroff,
|
|
};
|