mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-12 09:32:33 +00:00
observer fix
This commit is contained in:
parent
bda4684f50
commit
278ea2fc77
2 changed files with 4 additions and 8 deletions
|
@ -34,17 +34,15 @@ class ManageNodesPage extends BasePage {
|
|||
SizedBox(height: 20),
|
||||
Observer(
|
||||
builder: (BuildContext context) {
|
||||
int nodesLength = nodeListViewModel.nodes.length;
|
||||
return Flexible(
|
||||
child: SectionStandardList(
|
||||
sectionCount: 1,
|
||||
dividerPadding: EdgeInsets.symmetric(horizontal: 24),
|
||||
itemCounter: (int sectionIndex) {
|
||||
return nodeListViewModel.nodes.length;
|
||||
return nodesLength;
|
||||
},
|
||||
itemBuilder: (_, index) {
|
||||
if (index > nodeListViewModel.nodes.length - 1) {
|
||||
return SizedBox();
|
||||
}
|
||||
return Observer(
|
||||
builder: (context) {
|
||||
final node = nodeListViewModel.nodes[index];
|
||||
|
|
|
@ -34,19 +34,17 @@ class ManagePowNodesPage extends BasePage {
|
|||
SizedBox(height: 20),
|
||||
Observer(
|
||||
builder: (BuildContext context) {
|
||||
int nodesLength = nodeListViewModel.nodes.length;
|
||||
return Flexible(
|
||||
child: SectionStandardList(
|
||||
sectionCount: 1,
|
||||
dividerPadding: EdgeInsets.symmetric(horizontal: 24),
|
||||
itemCounter: (int sectionIndex) {
|
||||
return nodeListViewModel.nodes.length;
|
||||
return nodesLength;
|
||||
},
|
||||
itemBuilder: (_, index) {
|
||||
return Observer(
|
||||
builder: (context) {
|
||||
if (index > nodeListViewModel.nodes.length - 1) {
|
||||
return SizedBox();
|
||||
}
|
||||
final node = nodeListViewModel.nodes[index];
|
||||
final isSelected = node.keyIndex == nodeListViewModel.currentNode.keyIndex;
|
||||
final nodeListRow = PowNodeListRow(
|
||||
|
|
Loading…
Reference in a new issue