mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
fix(desktop-icon): Desktop Icons Fix (#2303)
This change: - Adds svg icons for history and notification - Updates the sidebar and services widget to use new images - Fixes services widget icon looking very tiny on desktop
This commit is contained in:
parent
1d6e594e04
commit
b0edf1fe75
5 changed files with 28 additions and 18 deletions
|
@ -1,3 +1,4 @@
|
|||
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SideMenuItem extends StatelessWidget {
|
||||
|
@ -46,8 +47,8 @@ class SideMenuItem extends StatelessWidget {
|
|||
color: _setColor(context),
|
||||
size: 30,
|
||||
)
|
||||
: Image.asset(
|
||||
imagePath ?? '',
|
||||
: CakeImageWidget(
|
||||
imageUrl: imagePath ?? '',
|
||||
fit: BoxFit.cover,
|
||||
height: 30,
|
||||
width: 30,
|
||||
|
|
|
@ -63,9 +63,6 @@ class DesktopSidebarWrapper extends BasePage {
|
|||
|
||||
final pageController = PageController();
|
||||
|
||||
final selectedIconPath = 'assets/images/desktop_transactions_solid_icon.png';
|
||||
final unselectedIconPath = 'assets/images/desktop_transactions_outline_icon.png';
|
||||
|
||||
double get sideMenuWidth => 76.0;
|
||||
|
||||
@override
|
||||
|
@ -103,9 +100,7 @@ class DesktopSidebarWrapper extends BasePage {
|
|||
}
|
||||
},
|
||||
isSelected: desktopSidebarViewModel.currentPage == SidebarItem.transactions,
|
||||
imagePath: desktopSidebarViewModel.currentPage == SidebarItem.transactions
|
||||
? selectedIconPath
|
||||
: unselectedIconPath,
|
||||
imagePath: 'assets/images/history.svg',
|
||||
),
|
||||
SideMenuItem(
|
||||
widget: ServicesUpdatesWidget(
|
||||
|
|
|
@ -3,11 +3,12 @@ import 'package:cake_wallet/entities/preferences_key.dart';
|
|||
import 'package:cake_wallet/entities/service_status.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
||||
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
|
||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||
import 'package:cake_wallet/src/widgets/service_status_tile.dart';
|
||||
import 'package:cake_wallet/utils/device_info.dart';
|
||||
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
|
@ -40,16 +41,17 @@ class _ServicesUpdatesWidgetState extends State<ServicesUpdatesWidget> {
|
|||
);
|
||||
});
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/images/notification_icon.svg",
|
||||
child: CakeImageWidget(
|
||||
imageUrl: "assets/images/notif.svg",
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
width: 20,
|
||||
placeholderBuilder: (_) => Icon(Icons.error),
|
||||
width: DeviceInfo.instance.isDesktop ? 30 : 20,
|
||||
),
|
||||
);
|
||||
}
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 16, top: 12, right: 8, bottom: 8),
|
||||
padding: DeviceInfo.instance.isDesktop
|
||||
? EdgeInsets.zero
|
||||
: EdgeInsets.only(left: 16, top: 12, right: 8, bottom: 8),
|
||||
child: FutureBuilder<ServicesResponse>(
|
||||
future: widget.servicesResponse,
|
||||
builder: (context, state) {
|
||||
|
@ -135,11 +137,10 @@ class _ServicesUpdatesWidgetState extends State<ServicesUpdatesWidget> {
|
|||
: null,
|
||||
child: Stack(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
"assets/images/notification_icon.svg",
|
||||
CakeImageWidget(
|
||||
imageUrl: "assets/images/notif.svg",
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
width: 20,
|
||||
placeholderBuilder: (_) => Icon(Icons.error),
|
||||
width: DeviceInfo.instance.isDesktop ? 30 : 20,
|
||||
),
|
||||
if (state.hasData && state.data!.hasUpdates && !wasOpened)
|
||||
Container(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue