-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
332 additions
and
626 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 29 additions & 13 deletions
42
lib/domain/app_state/contact/get_phonebook_contact_state_v2.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,54 @@ | ||
import 'package:fluffychat/app_state/failure.dart'; | ||
import 'package:fluffychat/app_state/initial.dart'; | ||
import 'package:fluffychat/app_state/success.dart'; | ||
import 'package:fluffychat/domain/model/contact/contact_v2.dart'; | ||
import 'package:fluffychat/domain/model/contact/contact_new.dart'; | ||
|
||
class GetPhonebookContactsInitial extends Initial { | ||
const GetPhonebookContactsInitial() : super(); | ||
class GetPhonebookContactsV2Initial extends Initial { | ||
const GetPhonebookContactsV2Initial() : super(); | ||
|
||
@override | ||
List<Object?> get props => []; | ||
} | ||
|
||
class GetPhonebookContactsLoading extends Success { | ||
class GetPhonebookContactsV2Loading extends Success { | ||
final int progress; | ||
|
||
const GetPhonebookContactsLoading({required this.progress}); | ||
const GetPhonebookContactsV2Loading({required this.progress}); | ||
|
||
@override | ||
List<Object?> get props => [progress]; | ||
} | ||
|
||
class GetPhonebookContactsSuccess extends Success { | ||
class GetPhonebookContactsV2Success extends Success { | ||
final int progress; | ||
final List<Contact> foundContacts; | ||
final List<Contact> notFoundContacts; | ||
final List<Contact> contacts; | ||
|
||
const GetPhonebookContactsSuccess({ | ||
const GetPhonebookContactsV2Success({ | ||
required this.progress, | ||
required this.foundContacts, | ||
required this.notFoundContacts, | ||
required this.contacts, | ||
}); | ||
|
||
@override | ||
List<Object?> get props => [ | ||
progress, | ||
foundContacts, | ||
notFoundContacts, | ||
contacts, | ||
]; | ||
} | ||
|
||
class GetPhonebookContactsV2IsEmpty extends Success { | ||
const GetPhonebookContactsV2IsEmpty(); | ||
|
||
@override | ||
List<Object?> get props => []; | ||
} | ||
|
||
class GetPhonebookContactsV2Failure extends Failure { | ||
final dynamic exception; | ||
|
||
const GetPhonebookContactsV2Failure({ | ||
required this.exception, | ||
}); | ||
|
||
@override | ||
List<Object?> get props => [exception]; | ||
} |
Oops, something went wrong.