mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
21 lines
No EOL
500 B
Dart
21 lines
No EOL
500 B
Dart
class PaymentRequest {
|
|
PaymentRequest(this.address, this.amount, {this.scheme});
|
|
|
|
factory PaymentRequest.fromUri(Uri uri) {
|
|
var address = "";
|
|
var amount = "";
|
|
var scheme = "";
|
|
|
|
if (uri != null) {
|
|
address = uri.path;
|
|
amount = uri.queryParameters['tx_amount'] ?? uri.queryParameters['amount'] ?? "";
|
|
scheme = uri.scheme;
|
|
}
|
|
|
|
return PaymentRequest(address, amount, scheme: scheme);
|
|
}
|
|
|
|
final String address;
|
|
final String amount;
|
|
final String scheme;
|
|
} |