mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-22 06:28:39 +02:00
feat: add tor icon to sync bar (#2359)
* feat: add tor icon to sync bar * minor readability [skip ci] --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -58,7 +58,11 @@ class SyncIndicator extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
SyncIndicatorIcon(isSynced: status is SyncedSyncStatus),
|
||||
SyncIndicatorIcon(
|
||||
isSynced: status is SyncedSyncStatus,
|
||||
showTorIcon: dashboardViewModel.builtinTor,
|
||||
size: dashboardViewModel.builtinTor ? 16 : 6,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 6),
|
||||
child: Text(
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
class SyncIndicatorIcon extends StatelessWidget {
|
||||
SyncIndicatorIcon(
|
||||
{this.boolMode = true, this.isSynced = false, this.value = waiting, this.size = 6.0});
|
||||
{this.boolMode = true, this.isSynced = false, this.value = waiting, this.size = 6.0, this.showTorIcon = false});
|
||||
|
||||
final bool boolMode;
|
||||
final bool isSynced;
|
||||
final String value;
|
||||
final double size;
|
||||
final bool showTorIcon;
|
||||
|
||||
static const String waiting = 'waiting';
|
||||
static const String actionRequired = 'action required';
|
||||
@@ -46,10 +48,14 @@ class SyncIndicatorIcon extends StatelessWidget {
|
||||
return Container(
|
||||
height: size,
|
||||
width: size,
|
||||
decoration: BoxDecoration(
|
||||
decoration: showTorIcon ? null : BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: indicatorColor,
|
||||
),
|
||||
child: showTorIcon ? SvgPicture.asset(
|
||||
"assets/images/tor.svg",
|
||||
color: indicatorColor,
|
||||
) : null,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user