mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 18:21:08 +00:00
45 lines
1,007 B
Dart
45 lines
1,007 B
Dart
/*
|
|
* This file is part of Stack Wallet.
|
|
*
|
|
* Copyright (c) 2023 Cypher Stack
|
|
* All Rights Reserved.
|
|
* The code is distributed under GPLv3 license, see LICENSE file for details.
|
|
* Generated by Cypher Stack on 2023-05-26
|
|
*
|
|
*/
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:stackwallet/models/exchange/aggregate_currency.dart';
|
|
|
|
class ActivePair extends ChangeNotifier {
|
|
AggregateCurrency? _send;
|
|
AggregateCurrency? _receive;
|
|
|
|
AggregateCurrency? get send => _send;
|
|
AggregateCurrency? get receive => _receive;
|
|
|
|
void setSend(
|
|
AggregateCurrency? newSend, {
|
|
bool notifyListeners = false,
|
|
}) {
|
|
_send = newSend;
|
|
if (notifyListeners) {
|
|
this.notifyListeners();
|
|
}
|
|
}
|
|
|
|
void setReceive(
|
|
AggregateCurrency? newReceive, {
|
|
bool notifyListeners = false,
|
|
}) {
|
|
_receive = newReceive;
|
|
if (notifyListeners) {
|
|
this.notifyListeners();
|
|
}
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return "ActivePair{ send: $send, receive: $receive }";
|
|
}
|
|
}
|