mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
added nodes and dark theme icon
This commit is contained in:
parent
fba7fbf1cc
commit
44790dd2df
4 changed files with 91 additions and 53 deletions
24
assets/svg/dark/dark-theme.svg
Normal file
24
assets/svg/dark/dark-theme.svg
Normal file
|
@ -0,0 +1,24 @@
|
|||
<svg width="200" height="162" viewBox="0 0 200 162" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5863_29353)">
|
||||
<rect width="200" height="162" rx="8" fill="#2A2D34"/>
|
||||
<rect x="10" y="10" width="180" height="20" rx="2" fill="#444953"/>
|
||||
<rect x="16" y="16" width="106" height="8" rx="1" fill="#7E8692"/>
|
||||
<rect x="10" y="40" width="180" height="20" rx="2" fill="#333942"/>
|
||||
<rect x="16" y="46" width="106" height="8" rx="1" fill="#575C63"/>
|
||||
<rect x="10" y="62" width="180" height="20" rx="2" fill="#333942"/>
|
||||
<rect x="16" y="68" width="106" height="8" rx="1" fill="#575C63"/>
|
||||
<rect x="10" y="84" width="180" height="20" rx="2" fill="#333942"/>
|
||||
<rect x="16" y="90" width="106" height="8" rx="1" fill="#575C63"/>
|
||||
<rect x="10" y="106" width="180" height="20" rx="2" fill="#333942"/>
|
||||
<rect x="16" y="112" width="106" height="8" rx="1" fill="#575C63"/>
|
||||
<rect x="10" y="128" width="180" height="20" rx="2" fill="#333942"/>
|
||||
<rect x="16" y="134" width="106" height="8" rx="1" fill="#575C63"/>
|
||||
<rect x="10" y="150" width="180" height="20" rx="2" fill="#333942"/>
|
||||
<rect x="16" y="156" width="106" height="8" rx="1" fill="#575C63"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5863_29353">
|
||||
<rect width="200" height="162" rx="8" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -2,15 +2,15 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter/src/widgets/framework.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:stackwallet/providers/global/node_service_provider.dart';
|
||||
import 'package:stackwallet/providers/global/prefs_provider.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||
|
||||
import '../../../providers/global/node_service_provider.dart';
|
||||
import '../../../providers/global/prefs_provider.dart';
|
||||
import '../../../utilities/constants.dart';
|
||||
import '../../../utilities/enums/coin_enum.dart';
|
||||
|
||||
class NodesSettings extends ConsumerStatefulWidget {
|
||||
const NodesSettings({Key? key}) : super(key: key);
|
||||
|
||||
|
@ -37,6 +37,9 @@ class _NodesSettings extends ConsumerState<NodesSettings> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double deviceWidth(BuildContext context) =>
|
||||
MediaQuery.of(context).size.width;
|
||||
|
||||
bool showTestNet = ref.watch(
|
||||
prefsChangeNotifierProvider.select((value) => value.showTestNetCoins),
|
||||
);
|
||||
|
@ -85,6 +88,7 @@ class _NodesSettings extends ConsumerState<NodesSettings> {
|
|||
),
|
||||
],
|
||||
),
|
||||
//TODO: add search bar
|
||||
SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
|
@ -97,55 +101,62 @@ class _NodesSettings extends ConsumerState<NodesSettings> {
|
|||
.length;
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: RoundedWhiteContainer(
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: RawMaterialButton(
|
||||
// splashColor: Theme.of(context).extension<StackColors>()!.highlight,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: RawMaterialButton(
|
||||
// splashColor: Theme.of(context).extension<StackColors>()!.highlight,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
onPressed: () {
|
||||
// Navigator.of(context).pushNamed(
|
||||
// CoinNodesView.routeName,
|
||||
// arguments: coin,
|
||||
// );
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
Assets.svg.iconFor(coin: coin),
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 12,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${coin.prettyName} nodes",
|
||||
style: STextStyles.titleBold12(
|
||||
context),
|
||||
),
|
||||
Text(
|
||||
count > 1
|
||||
? "$count nodes"
|
||||
: "Default",
|
||||
style: STextStyles.label(context),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
side: BorderSide(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.shadow),
|
||||
),
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
onPressed: () {
|
||||
// Navigator.of(context).pushNamed(
|
||||
// CoinNodesView.routeName,
|
||||
// arguments: coin,
|
||||
// );
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(
|
||||
12.0,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
Assets.svg.iconFor(coin: coin),
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 12,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${coin.prettyName} nodes",
|
||||
style:
|
||||
STextStyles.titleBold12(context),
|
||||
),
|
||||
Text(
|
||||
count > 1
|
||||
? "$count nodes"
|
||||
: "Default",
|
||||
style: STextStyles.label(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
// SvgPicture.asset(
|
||||
// Assets.svg.chevronRight,
|
||||
// alignment: Alignment.centerRight,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -59,6 +59,8 @@ class _SVG {
|
|||
String txExchangeFailed(BuildContext context) =>
|
||||
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-exchange-icon-failed.svg";
|
||||
|
||||
// String get themeLight => "assets/svg/light/light-theme.svg";
|
||||
String get themeDark => "assets/svg/dark/dark-theme.svg";
|
||||
String get circleNode => "assets/svg/node-circle.svg";
|
||||
String get circleSun => "assets/svg/sun-circle.svg";
|
||||
String get circleArrowRotate => "assets/svg/rotate-circle.svg";
|
||||
|
|
|
@ -299,6 +299,7 @@ flutter:
|
|||
- assets/svg/rotate-circle.svg
|
||||
- assets/svg/sun-circle.svg
|
||||
- assets/svg/node-circle.svg
|
||||
- assets/svg/dark/dark-theme.svg
|
||||
# coin icons
|
||||
- assets/svg/coin_icons/Bitcoin.svg
|
||||
- assets/svg/coin_icons/Bitcoincash.svg
|
||||
|
|
Loading…
Reference in a new issue