update output icon + colors

This commit is contained in:
julian 2023-03-08 11:23:28 -06:00
parent fd02935f54
commit c77993a3e5
5 changed files with 119 additions and 42 deletions

View file

@ -1,13 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_7555_133622)">
<circle cx="16" cy="16" r="16" fill="#D9D9D9"/>
<g opacity="0.3">
<path d="M23.8628 20.5871C23.6515 20.9523 23.2648 21.1564 22.8709 21.1564C22.6744 21.1564 22.4756 21.1061 22.2934 20.9998L21.395 20.4755L21.5876 21.2021C21.7091 21.6608 21.4352 22.132 20.976 22.2527C20.9021 22.2728 20.8281 22.2817 20.7553 22.2817C20.3746 22.2817 20.0262 22.0277 19.9242 21.6429L19.289 19.2467L17.1454 17.9946L17.1454 20.519L18.8777 22.2693C19.2121 22.6073 19.2087 23.1509 18.871 23.4846C18.703 23.6522 18.4846 23.7345 18.2661 23.7345C18.0444 23.7345 17.8225 23.6495 17.6545 23.4794L17.1454 22.9649V24.021C17.1454 24.6544 16.6319 25.1668 15.9985 25.1668C15.365 25.1668 14.8515 24.6544 14.8515 24.021L14.8515 22.9647L14.3424 23.4792C14.0086 23.8172 13.464 23.8194 13.126 23.4859C12.7883 23.1525 12.7849 22.6087 13.1193 22.2706L14.8516 20.5204L14.8215 17.9946L12.6777 19.2454L12.0425 21.6416C11.9405 22.0265 11.592 22.2804 11.2114 22.2804C11.1385 22.2804 11.0646 22.2715 10.9907 22.2513C10.5316 22.1305 10.2577 21.6594 10.3791 21.2007L10.5717 20.4742L9.67327 20.9984C9.52235 21.1063 9.32362 21.1564 9.12703 21.1564C8.7328 21.1564 8.34858 20.9527 8.13553 20.5878C7.8157 20.0417 8 19.3403 8.54731 19.0212L9.47687 18.4787L8.74891 18.2815C8.29022 18.1593 8.01987 17.6867 8.14412 17.2284C8.26837 16.77 8.73888 16.5015 9.19936 16.6232L11.5594 17.2642L13.7258 16.0002L11.5594 14.7362L9.19936 15.3771C9.12378 15.3973 9.04808 15.4073 8.9736 15.4073C8.59512 15.4073 8.24779 15.1556 8.1443 14.7728C8.01987 14.3136 8.29022 13.8446 8.74891 13.7192L9.47687 13.522L8.54731 12.978C8.00018 12.6591 7.81577 11.9575 8.13553 11.4115C8.45368 10.8643 9.15604 10.6796 9.70425 10.9997L10.6027 11.5239L10.41 10.7974C10.2886 10.3394 10.564 9.86816 10.9901 9.74749C11.4842 9.62324 11.9211 9.89967 12.075 10.3573L12.7103 12.7535L14.8215 14.0057L14.8215 11.4813L13.1206 9.72959C12.7876 9.39157 12.7876 8.84766 13.1278 8.51429C13.4644 8.17949 14.0086 8.18415 14.3452 8.52109L14.8544 9.03564L14.8215 7.97933C14.8215 7.3459 15.3349 6.8335 15.9684 6.8335C16.6018 6.8335 17.1153 7.3459 17.1153 7.97933L17.1153 9.03564L17.6245 8.52109C17.9577 8.18429 18.5021 8.17981 18.8408 8.51438C19.1786 8.84782 19.1819 9.39166 18.8476 9.72968L17.1152 11.4799L17.1454 14.0057L19.2891 12.7549L19.9244 10.3587C20.0459 9.90111 20.5173 9.62467 20.9764 9.74893C21.4354 9.86978 21.7094 10.3408 21.588 10.7995L21.3954 11.526L22.2938 11.0018C22.8409 10.6829 23.5438 10.8675 23.8625 11.4136C24.1823 11.9597 23.998 12.6611 23.4507 12.9802L22.5211 13.5227L23.2491 13.7199C23.7078 13.8441 23.9785 14.3164 23.8539 14.774C23.7502 15.1568 23.4031 15.4086 23.0246 15.4086C22.9501 15.4086 22.8745 15.3985 22.7988 15.3783L20.4074 14.7362L18.2733 16.0002L20.4382 17.2634L22.7997 16.6236C23.2612 16.5015 23.7303 16.77 23.8556 17.2284C23.98 17.686 23.7095 18.1583 23.2509 18.2825L22.5229 18.4797L23.4525 19.0222C23.9989 19.341 24.1815 20.0428 23.8628 20.5871Z" fill="black"/>
</g>
</g>
<defs>
<clipPath id="clip0_7555_133622">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.8628 14.5871C17.6515 14.9523 17.2648 15.1564 16.8709 15.1564C16.6744 15.1564 16.4756 15.1061 16.2934 14.9998L15.395 14.4755L15.5876 15.2021C15.7091 15.6608 15.4352 16.132 14.976 16.2527C14.9021 16.2728 14.8281 16.2817 14.7553 16.2817C14.3746 16.2817 14.0262 16.0277 13.9242 15.6429L13.289 13.2467L11.1454 11.9946L11.1454 14.519L12.8777 16.2693C13.2121 16.6073 13.2087 17.1509 12.871 17.4846C12.703 17.6522 12.4846 17.7345 12.2661 17.7345C12.0444 17.7345 11.8225 17.6495 11.6545 17.4794L11.1454 16.9649V18.021C11.1454 18.6544 10.6319 19.1668 9.99845 19.1668C9.36502 19.1668 8.85155 18.6544 8.85155 18.021L8.85154 16.9647L8.34236 17.4792C8.00856 17.8172 7.46401 17.8194 7.12599 17.4859C6.78825 17.1525 6.78492 16.6087 7.11927 16.2706L8.85163 14.5204L8.82147 11.9946L6.67768 13.2454L6.04246 15.6416C5.94048 16.0265 5.59201 16.2804 5.21138 16.2804C5.13851 16.2804 5.06457 16.2715 4.99066 16.2513C4.53161 16.1305 4.25768 15.6594 4.37907 15.2007L4.57168 14.4742L3.67327 14.9984C3.52235 15.1063 3.32362 15.1564 3.12703 15.1564C2.7328 15.1564 2.34858 14.9527 2.13553 14.5878C1.8157 14.0417 2 13.3403 2.54731 13.0212L3.47687 12.4787L2.74891 12.2815C2.29022 12.1593 2.01987 11.6867 2.14412 11.2284C2.26837 10.77 2.73888 10.5015 3.19936 10.6232L5.55942 11.2642L7.72576 10.0002L5.55942 8.73616L3.19936 9.37712C3.12378 9.39726 3.04808 9.40733 2.9736 9.40733C2.59512 9.40733 2.24779 9.15557 2.1443 8.77282C2.01987 8.31364 2.29022 7.84456 2.74891 7.71924L3.47687 7.52201L2.54731 6.97803C2.00018 6.65913 1.81577 5.95752 2.13553 5.41146C2.45368 4.86432 3.15604 4.67956 3.70425 4.99967L4.60265 5.52389L4.41001 4.79736C4.28862 4.33939 4.56398 3.86816 4.99009 3.74749C5.48423 3.62324 5.92108 3.89967 6.07505 4.35729L6.71027 6.75352L8.82147 8.0057L8.82146 5.48128L7.12062 3.72959C6.78761 3.39157 6.78761 2.84766 7.12778 2.51429C7.46437 2.17949 8.00864 2.18415 8.34523 2.52109L8.85441 3.03564L8.82147 1.97933C8.82147 1.3459 9.33494 0.833496 9.96838 0.833496C10.6018 0.833496 11.1153 1.3459 11.1153 1.97933L11.1153 3.03564L11.6245 2.52109C11.9577 2.18429 12.5021 2.17981 12.8408 2.51438C13.1786 2.84782 13.1819 3.39166 12.8476 3.72968L11.1152 5.47994L11.1454 8.0057L13.2891 6.75495L13.9244 4.35872C14.0459 3.90111 14.5173 3.62467 14.9764 3.74893C15.4354 3.86978 15.7094 4.34082 15.588 4.79951L15.3954 5.52604L16.2938 5.00182C16.8409 4.68292 17.5438 4.86755 17.8625 5.41361C18.1823 5.95967 17.998 6.66113 17.4507 6.98018L16.5211 7.52266L17.2491 7.71988C17.7078 7.8441 17.9785 8.31643 17.8539 8.77405C17.7502 9.15683 17.4031 9.40855 17.0246 9.40855C16.9501 9.40855 16.8745 9.39848 16.7988 9.37834L14.4074 8.73616L12.2733 10.0002L14.4382 11.2634L16.7997 10.6236C17.2612 10.5015 17.7303 10.77 17.8556 11.2284C17.98 11.686 17.7095 12.1583 17.2509 12.2825L16.5229 12.4797L17.4525 13.0222C17.9989 13.341 18.1815 14.0428 17.8628 14.5871Z" fill="#96B0D6"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -1,11 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_7553_128966)">
<circle cx="16" cy="16" r="16" fill="#0056D2"/>
<path d="M23.7179 11.5972C24.0821 11.9255 24.0821 12.4564 23.7179 12.7533L14.2893 21.9739C13.9857 22.3301 13.4429 22.3301 13.1071 21.9739L8.25104 17.2239C7.91632 16.927 7.91632 16.3961 8.25104 16.0678C8.58571 15.743 9.12857 15.743 9.46321 16.0678L13.7143 20.2275L22.5357 11.5972C22.8714 11.271 23.4143 11.271 23.7179 11.5972Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_7553_128966">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
<svg width="16" height="18" viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.7179 3.5972C16.0821 3.92551 16.0821 4.45639 15.7179 4.75327L6.28929 13.9739C5.98571 14.3301 5.44286 14.3301 5.10714 13.9739L0.251036 9.22385C-0.0836786 8.92698 -0.0836786 8.3961 0.251036 8.06779C0.585714 7.74297 1.12857 7.74297 1.46321 8.06779L5.71429 12.2275L14.5357 3.5972C14.8714 3.27099 15.4143 3.27099 15.7179 3.5972Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 643 B

After

Width:  |  Height:  |  Size: 455 B

View file

@ -1,13 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_7553_128934)">
<circle cx="16" cy="16" r="16" fill="#D9D9D9"/>
<g opacity="0.3">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.2715 14.0119C10.2715 15.2759 12.8353 16.3035 16.0007 16.3035C19.166 16.3035 21.7298 15.2759 21.7298 14.0119C21.7298 12.7479 19.166 11.7202 16.0007 11.7202C12.8353 11.7202 10.2715 12.7479 10.2715 14.0119ZM25.1673 14.2983C25.1673 11.4517 21.0638 9.14209 16.0007 9.14209C10.9375 9.14209 6.83398 11.4517 6.83398 14.2983C6.83398 17.145 10.9375 19.4546 16.0007 19.4546C21.0638 19.4546 25.1673 17.145 25.1673 14.2983ZM9.93454 15.7378C9.50163 15.326 9.09342 14.7459 9.09342 14.0119C9.09342 13.2778 9.50163 12.6978 9.93454 12.286C10.3646 11.8813 10.9268 11.5662 11.4925 11.3263C12.7279 10.8465 14.3105 10.5744 15.9684 10.5744C17.6908 10.5744 19.2734 10.8465 20.4766 11.3263C21.0745 11.5662 21.6367 11.8813 22.0664 12.286C22.4997 12.6978 22.8757 13.2778 22.8757 14.0119C22.8757 14.7459 22.4997 15.326 22.0664 15.7378C21.6367 16.1424 21.0745 16.4575 20.4766 16.6652C19.2734 17.1772 17.6908 17.4494 16.0007 17.4494C14.3105 17.4494 12.7279 17.1772 11.4925 16.6652C10.9268 16.4575 10.3646 16.1424 9.93454 15.7378ZM25.1673 17.2386C24.6947 17.8008 24.1038 18.2878 23.4486 18.6709V20.9805C24.5299 20.2285 25.1673 19.3047 25.1673 18.277V17.2386ZM22.3027 21.6071V19.3226C21.2858 19.7917 20.1221 20.1462 18.8652 20.361V22.6634C20.1615 22.4521 21.3324 22.0977 22.3027 21.6071ZM15.9034 20.5687C15.3533 20.5689 14.8128 20.5691 14.2819 20.515V22.8138C14.8022 22.8608 15.3414 22.8606 15.8906 22.8604C15.9272 22.8604 15.9639 22.8604 16.0007 22.8604C16.0374 22.8604 16.0741 22.8604 16.1107 22.8604C16.6599 22.8606 17.1991 22.8608 17.7194 22.8138V20.515C17.1885 20.5691 16.648 20.5689 16.0979 20.5687C16.0655 20.5687 16.0331 20.5687 16.0007 20.5687C15.9682 20.5687 15.9358 20.5687 15.9034 20.5687ZM13.1361 22.6634V20.361C11.8792 20.1462 10.7155 19.7917 9.69857 19.3226V21.6071C10.6689 22.0977 11.8398 22.4521 13.1361 22.6634ZM6.83398 18.277C6.83398 19.3047 7.471 20.2285 8.55273 20.9805V18.6709C7.89818 18.2878 7.307 17.8008 6.83398 17.2386V18.277Z" fill="black"/>
</g>
</g>
<defs>
<clipPath id="clip0_7553_128934">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.27148 8.01188C4.27148 9.27588 6.83529 10.3035 10.0007 10.3035C13.166 10.3035 15.7298 9.27588 15.7298 8.01188C15.7298 6.74788 13.166 5.72021 10.0007 5.72021C6.83529 5.72021 4.27148 6.74788 4.27148 8.01188ZM19.1673 8.29834C19.1673 5.45166 15.0638 3.14209 10.0007 3.14209C4.9375 3.14209 0.833984 5.45166 0.833984 8.29834C0.833984 11.145 4.9375 13.4546 10.0007 13.4546C15.0638 13.4546 19.1673 11.145 19.1673 8.29834ZM3.93454 9.73779C3.50163 9.32601 3.09342 8.74593 3.09342 8.01188C3.09342 7.27783 3.50163 6.69775 3.93454 6.28597C4.36458 5.88135 4.92676 5.56624 5.49251 5.32633C6.72786 4.84652 8.31055 4.57438 9.96842 4.57438C11.6908 4.57438 13.2734 4.84652 14.4766 5.32633C15.0745 5.56624 15.6367 5.88135 16.0664 6.28597C16.4997 6.69775 16.8757 7.27783 16.8757 8.01188C16.8757 8.74593 16.4997 9.32601 16.0664 9.73779C15.6367 10.1424 15.0745 10.4575 14.4766 10.6652C13.2734 11.1772 11.6908 11.4494 10.0007 11.4494C8.31055 11.4494 6.72786 11.1772 5.49251 10.6652C4.92676 10.4575 4.36458 10.1424 3.93454 9.73779ZM19.1673 11.2386C18.6947 11.8008 18.1038 12.2878 17.4486 12.6709V14.9805C18.5299 14.2285 19.1673 13.3047 19.1673 12.277V11.2386ZM16.3027 15.6071V13.3226C15.2858 13.7917 14.1221 14.1462 12.8652 14.361V16.6634C14.1615 16.4521 15.3324 16.0977 16.3027 15.6071ZM9.90337 14.5687C9.3533 14.5689 8.81281 14.5691 8.2819 14.515V16.8138C8.8022 16.8608 9.34137 16.8606 9.89058 16.8604C9.92723 16.8604 9.96392 16.8604 10.0007 16.8604C10.0374 16.8604 10.0741 16.8604 10.1107 16.8604C10.6599 16.8606 11.1991 16.8608 11.7194 16.8138V14.515C11.1885 14.5691 10.648 14.5689 10.0979 14.5687C10.0655 14.5687 10.0331 14.5687 10.0007 14.5687C9.96819 14.5687 9.93576 14.5687 9.90337 14.5687ZM7.13607 16.6634V14.361C5.87923 14.1462 4.71549 13.7917 3.69857 13.3226V15.6071C4.66895 16.0977 5.83984 16.4521 7.13607 16.6634ZM0.833984 12.277C0.833984 13.3047 1.471 14.2285 2.55273 14.9805V12.6709C1.89818 12.2878 1.307 11.8008 0.833984 11.2386V12.277Z" fill="#F7931A"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -1,17 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:isar/isar.dart';
import 'package:stackwallet/db/main_db.dart';
import 'package:stackwallet/models/isar/models/isar_models.dart';
import 'package:stackwallet/providers/global/wallets_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/format.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/conditional_parent.dart';
import 'package:stackwallet/widgets/icon_widgets/utxo_status_icon.dart';
import 'package:stackwallet/widgets/rounded_container.dart';
class UtxoCard extends ConsumerStatefulWidget {
@ -55,6 +54,9 @@ class _UtxoCardState extends ConsumerState<UtxoCard> {
final coin = ref.watch(walletsChangeNotifierProvider
.select((value) => value.getManager(widget.walletId).coin));
final currentChainHeight = ref.watch(walletsChangeNotifierProvider
.select((value) => value.getManager(widget.walletId).currentHeight));
String? label;
if (utxo.address != null) {
label = MainDB.instance.isar.addressLabels
@ -102,12 +104,16 @@ class _UtxoCardState extends ConsumerState<UtxoCard> {
},
child: child,
),
child: SvgPicture.asset(
_selected
? Assets.svg.coinControl.selected
: utxo.isBlocked
? Assets.svg.coinControl.blocked
: Assets.svg.coinControl.unBlocked,
child: UTXOStatusIcon(
blocked: utxo.isBlocked,
status: utxo.isConfirmed(
currentChainHeight,
coin.requiredConfirmations,
)
? UTXOStatusIconStatus.confirmed
: UTXOStatusIconStatus.unconfirmed,
background: Theme.of(context).extension<StackColors>()!.popupBG,
selected: _selected,
width: 32,
height: 32,
),

View file

@ -0,0 +1,99 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/widgets/conditional_parent.dart';
import 'package:stackwallet/widgets/rounded_container.dart';
import '../../utilities/theme/stack_colors.dart';
enum UTXOStatusIconStatus {
confirmed,
unconfirmed;
}
class UTXOStatusIcon extends StatelessWidget {
const UTXOStatusIcon({
Key? key,
required this.width,
required this.height,
required this.blocked,
required this.selected,
required this.status,
required this.background,
}) : super(key: key);
final double width;
final double height;
final bool blocked;
final bool selected;
final UTXOStatusIconStatus status;
final Color background;
final _availableColor = const Color(0xFFF7931A);
final _blockedColor = const Color(0xFF96B0D6);
@override
Widget build(BuildContext context) {
return ConditionalParent(
condition: status == UTXOStatusIconStatus.unconfirmed,
builder: (child) => Stack(
children: [
child,
Positioned(
right: 0,
bottom: 0,
child: Stack(
children: [
RoundedContainer(
radiusMultiplier: 100,
color: background,
width: width / 2.8,
height: height / 2.8,
),
Positioned(
right: width / 2.8 - width / 3,
left: width / 2.8 - width / 3,
top: height / 2.8 - height / 3,
child: SvgPicture.asset(
Assets.svg.pending,
width: width / 3,
height: height / 3,
),
),
],
),
),
],
),
child: Stack(
alignment: Alignment.center,
children: [
RoundedContainer(
radiusMultiplier: 100,
color: selected
? Theme.of(context).extension<StackColors>()!.infoItemIcons
: blocked
? _blockedColor.withOpacity(0.3)
: _availableColor.withOpacity(0.2),
width: width,
height: height,
),
SvgPicture.asset(
selected
? Assets.svg.coinControl.selected
: blocked
? Assets.svg.coinControl.blocked
: Assets.svg.coinControl.unBlocked,
width: 20,
height: 20,
color: selected
? Colors.white
: blocked
? _blockedColor
: _availableColor,
),
],
),
);
}
}