-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix txn query param * update deprecated syntaxes * bump version, update changelog and readme * Add pagination (#49) * add pagination * fix * fix * update code * bump version
- Loading branch information
Showing
7 changed files
with
64 additions
and
5 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
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
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
31 changes: 31 additions & 0 deletions
31
lib/src/model/transaction/transaction_with_pagination.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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
part of xpx_chain_sdk.model.transaction; | ||
|
||
class TransactionWithPagination { | ||
final List<Transaction> transactions; | ||
final Pagination? pagination; | ||
|
||
TransactionWithPagination(this.transactions, this.pagination); | ||
|
||
factory TransactionWithPagination.fromDto( | ||
List<Transaction> transactions, Map<String, dynamic>? json) => | ||
TransactionWithPagination( | ||
transactions, | ||
json == null ? null : Pagination.fromJson(json), | ||
); | ||
} | ||
|
||
class Pagination { | ||
final int totalEntries; | ||
final int pageNumber; | ||
final int pageSize; | ||
final int totalPages; | ||
|
||
Pagination( | ||
this.totalEntries, this.pageNumber, this.pageSize, this.totalPages); | ||
|
||
factory Pagination.fromJson(Map<String, dynamic> json) => Pagination( | ||
json['totalEntries'], | ||
json['pageNumber'], | ||
json['pageSize'], | ||
json['totalPages']); | ||
} |
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