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