mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-05 10:29:23 +00:00
Fix variable name
This commit is contained in:
parent
17aa72e460
commit
c05d70b118
1 changed files with 14 additions and 14 deletions
|
@ -44,7 +44,7 @@ class DashboardPage extends StatelessWidget {
|
||||||
body: ResponsiveLayoutUtil.instance.isMobile(context)
|
body: ResponsiveLayoutUtil.instance.isMobile(context)
|
||||||
? _DashboardPageView(
|
? _DashboardPageView(
|
||||||
balancePage: balancePage,
|
balancePage: balancePage,
|
||||||
walletViewModel: dashboardViewModel,
|
dashboardViewModel: dashboardViewModel,
|
||||||
addressListViewModel: addressListViewModel,
|
addressListViewModel: addressListViewModel,
|
||||||
)
|
)
|
||||||
: DesktopSidebarWrapper(
|
: DesktopSidebarWrapper(
|
||||||
|
@ -63,7 +63,7 @@ class DashboardPage extends StatelessWidget {
|
||||||
class _DashboardPageView extends BasePage {
|
class _DashboardPageView extends BasePage {
|
||||||
_DashboardPageView({
|
_DashboardPageView({
|
||||||
required this.balancePage,
|
required this.balancePage,
|
||||||
required this.walletViewModel,
|
required this.dashboardViewModel,
|
||||||
required this.addressListViewModel,
|
required this.addressListViewModel,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -91,12 +91,12 @@ class _DashboardPageView extends BasePage {
|
||||||
bool get resizeToAvoidBottomInset => false;
|
bool get resizeToAvoidBottomInset => false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget get endDrawer => MenuWidget(walletViewModel);
|
Widget get endDrawer => MenuWidget(dashboardViewModel);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget middle(BuildContext context) {
|
Widget middle(BuildContext context) {
|
||||||
return SyncIndicator(
|
return SyncIndicator(
|
||||||
dashboardViewModel: walletViewModel,
|
dashboardViewModel: dashboardViewModel,
|
||||||
onTap: () => Navigator.of(context, rootNavigator: true).pushNamed(Routes.connectionSync));
|
onTap: () => Navigator.of(context, rootNavigator: true).pushNamed(Routes.connectionSync));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ class _DashboardPageView extends BasePage {
|
||||||
child: menuButton));
|
child: menuButton));
|
||||||
}
|
}
|
||||||
|
|
||||||
final DashboardViewModel walletViewModel;
|
final DashboardViewModel dashboardViewModel;
|
||||||
final WalletAddressListViewModel addressListViewModel;
|
final WalletAddressListViewModel addressListViewModel;
|
||||||
final controller = PageController(initialPage: 1);
|
final controller = PageController(initialPage: 1);
|
||||||
|
|
||||||
|
@ -173,12 +173,12 @@ class _DashboardPageView extends BasePage {
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: MainActions.all
|
children: MainActions.all
|
||||||
.where((element) => element.canShow?.call(walletViewModel) ?? true)
|
.where((element) => element.canShow?.call(dashboardViewModel) ?? true)
|
||||||
.map((action) => ActionButton(
|
.map((action) => ActionButton(
|
||||||
image: Image.asset(action.image,
|
image: Image.asset(action.image,
|
||||||
height: 24,
|
height: 24,
|
||||||
width: 24,
|
width: 24,
|
||||||
color: action.isEnabled?.call(walletViewModel) ?? true
|
color: action.isEnabled?.call(dashboardViewModel) ?? true
|
||||||
? Theme.of(context)
|
? Theme.of(context)
|
||||||
.accentTextTheme
|
.accentTextTheme
|
||||||
.headline2!
|
.headline2!
|
||||||
|
@ -188,8 +188,8 @@ class _DashboardPageView extends BasePage {
|
||||||
.headline3!
|
.headline3!
|
||||||
.backgroundColor!),
|
.backgroundColor!),
|
||||||
title: action.name(context),
|
title: action.name(context),
|
||||||
onClick: () async => await action.onTap(context, walletViewModel),
|
onClick: () async => await action.onTap(context, dashboardViewModel),
|
||||||
textColor: action.isEnabled?.call(walletViewModel) ?? true
|
textColor: action.isEnabled?.call(dashboardViewModel) ?? true
|
||||||
? null
|
? null
|
||||||
: Theme.of(context)
|
: Theme.of(context)
|
||||||
.accentTextTheme
|
.accentTextTheme
|
||||||
|
@ -211,13 +211,13 @@ class _DashboardPageView extends BasePage {
|
||||||
if (_isEffectsInstalled) {
|
if (_isEffectsInstalled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pages.add(MarketPlacePage(dashboardViewModel: walletViewModel));
|
pages.add(MarketPlacePage(dashboardViewModel: dashboardViewModel));
|
||||||
pages.add(balancePage);
|
pages.add(balancePage);
|
||||||
pages.add(TransactionsPage(dashboardViewModel: walletViewModel));
|
pages.add(TransactionsPage(dashboardViewModel: dashboardViewModel));
|
||||||
_isEffectsInstalled = true;
|
_isEffectsInstalled = true;
|
||||||
|
|
||||||
autorun((_) async {
|
autorun((_) async {
|
||||||
if (!walletViewModel.isOutdatedElectrumWallet) {
|
if (!dashboardViewModel.isOutdatedElectrumWallet) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,13 +243,13 @@ class _DashboardPageView extends BasePage {
|
||||||
Future<void>.delayed(Duration(milliseconds: 500)).then((_) {
|
Future<void>.delayed(Duration(milliseconds: 500)).then((_) {
|
||||||
showPopUp<void>(
|
showPopUp<void>(
|
||||||
context: navigatorKey.currentContext!,
|
context: navigatorKey.currentContext!,
|
||||||
builder: (_) => YatEmojiId(walletViewModel.yatStore.emoji));
|
builder: (_) => YatEmojiId(dashboardViewModel.yatStore.emoji));
|
||||||
needToPresentYat = false;
|
needToPresentYat = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
walletViewModel.yatStore.emojiIncommingStream.listen((String emoji) {
|
dashboardViewModel.yatStore.emojiIncommingStream.listen((String emoji) {
|
||||||
if (!_isEffectsInstalled || emoji.isEmpty) {
|
if (!_isEffectsInstalled || emoji.isEmpty) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue