mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 04:44:43 +00:00
CAKE-345 | removed isAddReceiverButtonEnabled from send_view_model.dart; fixed height of send card
This commit is contained in:
parent
a1c6b0be3f
commit
d582f89c7d
3 changed files with 4 additions and 8 deletions
|
@ -79,7 +79,7 @@ class SendPage extends BasePage {
|
||||||
content: Column(
|
content: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
height: 470,
|
height: sendViewModel.isElectrumWallet ? 470 : 445,
|
||||||
child: Observer(
|
child: Observer(
|
||||||
builder: (_) {
|
builder: (_) {
|
||||||
return PageView.builder(
|
return PageView.builder(
|
||||||
|
@ -259,7 +259,7 @@ class SendPage extends BasePage {
|
||||||
EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
||||||
bottomSection: Column(
|
bottomSection: Column(
|
||||||
children: [
|
children: [
|
||||||
if (sendViewModel.isAddReceiverButtonEnabled) Padding(
|
if (sendViewModel.isElectrumWallet) Padding(
|
||||||
padding: EdgeInsets.only(bottom: 12),
|
padding: EdgeInsets.only(bottom: 12),
|
||||||
child: PrimaryButton(
|
child: PrimaryButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|
|
@ -80,7 +80,7 @@ class SendCardState extends State<SendCard>
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 470,
|
height: sendViewModel.isElectrumWallet ? 470 : 445,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(24),
|
bottomLeft: Radius.circular(24),
|
||||||
|
|
|
@ -44,8 +44,6 @@ abstract class SendViewModelBase with Store {
|
||||||
|
|
||||||
sendItemList = ObservableList<SendItem>()
|
sendItemList = ObservableList<SendItem>()
|
||||||
..add(SendItem(_wallet, _settingsStore, _fiatConversationStore));
|
..add(SendItem(_wallet, _settingsStore, _fiatConversationStore));
|
||||||
|
|
||||||
isElectrumWallet = _wallet is ElectrumWallet;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@observable
|
@observable
|
||||||
|
@ -53,8 +51,6 @@ abstract class SendViewModelBase with Store {
|
||||||
|
|
||||||
ObservableList<SendItem> sendItemList;
|
ObservableList<SendItem> sendItemList;
|
||||||
|
|
||||||
bool isElectrumWallet;
|
|
||||||
|
|
||||||
@action
|
@action
|
||||||
void addSendItem() {
|
void addSendItem() {
|
||||||
sendItemList.add(SendItem(_wallet, _settingsStore, _fiatConversationStore));
|
sendItemList.add(SendItem(_wallet, _settingsStore, _fiatConversationStore));
|
||||||
|
@ -132,7 +128,7 @@ abstract class SendViewModelBase with Store {
|
||||||
ObservableList<Template> get templates => sendTemplateViewModel.templates;
|
ObservableList<Template> get templates => sendTemplateViewModel.templates;
|
||||||
|
|
||||||
@computed
|
@computed
|
||||||
bool get isAddReceiverButtonEnabled => _wallet is ElectrumWallet;
|
bool get isElectrumWallet => _wallet is ElectrumWallet;
|
||||||
|
|
||||||
WalletType get walletType => _wallet.type;
|
WalletType get walletType => _wallet.type;
|
||||||
final WalletBase _wallet;
|
final WalletBase _wallet;
|
||||||
|
|
Loading…
Reference in a new issue