stack_wallet/lib/utilities/assets.dart

305 lines
13 KiB
Dart
Raw Normal View History

2022-09-23 14:33:44 +00:00
import 'package:flutter/material.dart';
2022-08-26 08:11:35 +00:00
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/color_theme.dart';
2022-09-23 14:33:44 +00:00
import 'package:stackwallet/utilities/theme/stack_colors.dart';
2022-08-26 08:11:35 +00:00
abstract class Assets {
static const svg = _SVG();
static const png = _PNG();
static const lottie = _ANIMATIONS();
static const socials = _SOCIALS();
2022-10-03 18:24:37 +00:00
static const exchange = _EXCHANGE();
2023-01-04 16:49:13 +00:00
static const buy = _BUY();
2022-08-26 08:11:35 +00:00
}
class _SOCIALS {
const _SOCIALS();
String get discord => "assets/svg/socials/discord.svg";
String get reddit => "assets/svg/socials/reddit-alien-brands.svg";
String get twitter => "assets/svg/socials/twitter-brands.svg";
String get telegram => "assets/svg/socials/telegram-brands.svg";
}
2022-10-03 18:24:37 +00:00
class _EXCHANGE {
const _EXCHANGE();
String get changeNow => "assets/svg/exchange_icons/change_now_logo_1.svg";
String get simpleSwap => "assets/svg/exchange_icons/simpleswap-icon.svg";
}
2023-01-04 16:49:13 +00:00
class _BUY {
const _BUY();
// TODO: switch this to something like
// String buy(BuildContext context) =>
// "assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/buy.svg";
2023-01-04 16:49:13 +00:00
String get buy => "assets/svg/light/buy-coins-icon.svg";
String get simplexLogo => "assets/svg/buy/Simplex-Nuvei-Logo.svg";
2023-01-04 16:49:13 +00:00
}
2022-08-26 08:11:35 +00:00
class _SVG {
const _SVG();
String? background(BuildContext context) {
switch (Theme.of(context).extension<StackColors>()!.themeType) {
case ThemeType.light:
case ThemeType.dark:
return null;
case ThemeType.oceanBreeze:
return "assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/bg.svg";
}
}
2022-08-26 08:11:35 +00:00
2022-09-23 14:33:44 +00:00
String bellNew(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/bell-new.svg";
String stackIcon(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/stack-icon1.svg";
String exchange(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/exchange-2.svg";
String buy(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/buy-coins-icon.svg";
String receive(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-icon-receive.svg";
String receivePending(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-icon-receive-pending.svg";
String receiveCancelled(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-icon-receive-failed.svg";
String send(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-icon-send.svg";
String sendPending(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-icon-send-pending.svg";
String sendCancelled(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-icon-send-failed.svg";
String txExchange(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-exchange-icon.svg";
String txExchangePending(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-exchange-icon-pending.svg";
String txExchangeFailed(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-exchange-icon-failed.svg";
String get themeOcean => "assets/svg/ocean-breeze-theme.svg";
2022-11-18 18:26:27 +00:00
String get themeLight => "assets/svg/light-mode.svg";
String get themeDark => "assets/svg/dark-theme.svg";
2022-11-15 21:12:55 +00:00
String get circleSliders => "assets/svg/configuration.svg";
2022-11-11 22:58:47 +00:00
String get circlePlus => "assets/svg/plus-circle.svg";
String get framedGear => "assets/svg/framed-gear.svg";
String get framedAddressBook => "assets/svg/framed-address-book.svg";
2022-10-20 17:54:24 +00:00
String get circleNode => "assets/svg/node-circle.svg";
2022-10-19 22:10:34 +00:00
String get circleSun => "assets/svg/sun-circle.svg";
String get circleArrowRotate => "assets/svg/rotate-circle.svg";
String get circleLanguage => "assets/svg/language-circle.svg";
String get circleDollarSign => "assets/svg/dollar-sign-circle.svg";
String get circleLock => "assets/svg/lock-circle.svg";
String get enableButton => "assets/svg/enabled-button.svg";
2022-10-19 22:10:34 +00:00
String get disableButton => "assets/svg/Button.svg";
2022-10-03 17:58:19 +00:00
String get polygon => "assets/svg/Polygon.svg";
String get personaIncognito => "assets/svg/persona-incognito-1.svg";
String get personaEasy => "assets/svg/persona-easy-1.svg";
String get drd => "assets/svg/drd-icon.svg";
String get boxAuto => "assets/svg/box-auto.svg";
2022-08-26 08:11:35 +00:00
String get plus => "assets/svg/plus.svg";
String get gear => "assets/svg/gear.svg";
String get bell => "assets/svg/bell.svg";
String get arrowLeft => "assets/svg/arrow-left-fa.svg";
String get star => "assets/svg/star.svg";
String get copy => "assets/svg/copy-fa.svg";
String get circleX => "assets/svg/x-circle.svg";
String get check => "assets/svg/check.svg";
String get circleAlert => "assets/svg/alert-circle2.svg";
String get arrowDownLeft => "assets/svg/arrow-down-left.svg";
String get arrowUpRight => "assets/svg/arrow-up-right.svg";
String get bars => "assets/svg/bars.svg";
String get filter => "assets/svg/filter.svg";
String get pending => "assets/svg/pending.svg";
String get radio => "assets/svg/signal-stream.svg";
String get arrowRotate => "assets/svg/arrow-rotate.svg";
String get arrowRotate2 => "assets/svg/arrow-rotate2.svg";
String get alertCircle => "assets/svg/alert-circle.svg";
String get checkCircle => "assets/svg/circle-check.svg";
String get clipboard => "assets/svg/clipboard.svg";
String get qrcode => "assets/svg/qrcode1.svg";
String get ellipsis => "assets/svg/gear-3.svg";
String get chevronDown => "assets/svg/chevron-down.svg";
String get chevronUp => "assets/svg/chevron-up.svg";
2022-08-26 08:11:35 +00:00
String get swap => "assets/svg/swap.svg";
String get downloadFolder => "assets/svg/folder-down.svg";
String get lock => "assets/svg/lock-keyhole.svg";
2022-11-18 22:06:03 +00:00
String get lockOpen => "assets/svg/lock-open.svg";
2022-08-26 08:11:35 +00:00
String get network => "assets/svg/network-wired.svg";
String get networkWired => "assets/svg/network-wired-2.svg";
2022-08-26 08:11:35 +00:00
String get addressBook => "assets/svg/address-book.svg";
2022-09-19 19:34:27 +00:00
String get addressBook2 => "assets/svg/address-book2.svg";
2022-08-26 08:11:35 +00:00
String get arrowRotate3 => "assets/svg/rotate-exclamation.svg";
String get delete => "assets/svg/delete.svg";
String get arrowRight => "assets/svg/arrow-right.svg";
String get dollarSign => "assets/svg/dollar-sign.svg";
String get language => "assets/svg/language2.svg";
String get sun => "assets/svg/sun-bright2.svg";
String get pencil => "assets/svg/pen-solid-fa.svg";
String get search => "assets/svg/magnifying-glass.svg";
String get thickX => "assets/svg/x-fat.svg";
String get x => "assets/svg/x.svg";
String get user => "assets/svg/user.svg";
String get trash => "assets/svg/trash.svg";
String get eye => "assets/svg/eye.svg";
String get eyeSlash => "assets/svg/eye-slash.svg";
String get folder => "assets/svg/folder.svg";
String get calendar => "assets/svg/calendar-days.svg";
String get circleQuestion => "assets/svg/circle-question.svg";
String get circleInfo => "assets/svg/info-circle.svg";
String get key => "assets/svg/key.svg";
String get node => "assets/svg/node-alt.svg";
String get radioProblem => "assets/svg/signal-problem-alt.svg";
String get radioSyncing => "assets/svg/signal-sync-alt.svg";
String get walletSettings => "assets/svg/wallet-settings.svg";
String get verticalEllipsis => "assets/svg/ellipsis-vertical1.svg";
String get dice => "assets/svg/dice-alt.svg";
String get circleArrowUpRight => "assets/svg/circle-arrow-up-right2.svg";
String get loader => "assets/svg/loader.svg";
String get backupAdd => "assets/svg/add-backup.svg";
String get backupAuto => "assets/svg/auto-backup.svg";
String get backupRestore => "assets/svg/restore-backup.svg";
String get solidSliders => "assets/svg/sliders-solid.svg";
String get questionMessage => "assets/svg/message-question.svg";
String get envelope => "assets/svg/envelope.svg";
String get share => "assets/svg/share-2.svg";
String get anonymize => "assets/svg/tx-icon-anonymize.svg";
String get anonymizePending => "assets/svg/tx-icon-anonymize-pending.svg";
String get anonymizeFailed => "assets/svg/tx-icon-anonymize-failed.svg";
String get addressBookDesktop => "assets/svg/address-book-desktop.svg";
String get exchangeDesktop => "assets/svg/exchange-desktop.svg";
2023-01-04 16:49:13 +00:00
String get buyDesktop => "assets/svg/light/buy-coins-icon.svg";
String get aboutDesktop => "assets/svg/about-desktop.svg";
String get walletDesktop => "assets/svg/wallet-desktop.svg";
String get exitDesktop => "assets/svg/exit-desktop.svg";
2022-10-28 19:51:25 +00:00
String get keys => "assets/svg/keys.svg";
2022-10-31 18:03:21 +00:00
String get arrowDown => "assets/svg/arrow-down.svg";
2022-08-26 08:11:35 +00:00
String get ellipse1 => "assets/svg/Ellipse-43.svg";
String get ellipse2 => "assets/svg/Ellipse-42.svg";
String get bitcoin => "assets/svg/coin_icons/Bitcoin.svg";
2022-10-28 18:03:52 +00:00
String get litecoin => "assets/svg/coin_icons/Litecoin.svg";
2022-09-09 10:59:40 +00:00
String get bitcoincash => "assets/svg/coin_icons/Bitcoincash.svg";
2022-08-26 08:11:35 +00:00
String get dogecoin => "assets/svg/coin_icons/Dogecoin.svg";
String get epicCash => "assets/svg/coin_icons/EpicCash.svg";
String get firo => "assets/svg/coin_icons/Firo.svg";
String get monero => "assets/svg/coin_icons/Monero.svg";
2022-09-27 08:09:31 +00:00
String get wownero => "assets/svg/coin_icons/Wownero.svg";
2022-09-12 12:01:42 +00:00
String get namecoin => "assets/svg/coin_icons/Namecoin.svg";
2022-12-07 17:32:20 +00:00
String get particl => "assets/svg/coin_icons/Particl.svg";
2022-08-26 08:11:35 +00:00
2022-09-19 19:34:27 +00:00
String get chevronRight => "assets/svg/chevron-right.svg";
2022-09-16 17:26:12 +00:00
String get minimize => "assets/svg/minimize.svg";
2022-09-19 19:34:27 +00:00
String get walletFa => "assets/svg/wallet-fa.svg";
String get exchange3 => "assets/svg/exchange-3.svg";
String get messageQuestion => "assets/svg/message-question-1.svg";
2022-08-26 08:11:35 +00:00
// TODO provide proper assets
String get bitcoinTestnet => "assets/svg/coin_icons/Bitcoin.svg";
String get bitcoincashTestnet => "assets/svg/coin_icons/Bitcoincash.svg";
2022-08-26 08:11:35 +00:00
String get firoTestnet => "assets/svg/coin_icons/Firo.svg";
String get dogecoinTestnet => "assets/svg/coin_icons/Dogecoin.svg";
2022-10-25 15:06:37 +00:00
String get particlTestnet =>
"assets/svg/coin_icons/Dogecoin.svg"; //TODO - Update icon to particl
2022-08-26 08:11:35 +00:00
String iconFor({required Coin coin}) {
switch (coin) {
case Coin.bitcoin:
return bitcoin;
2022-10-28 18:03:52 +00:00
case Coin.litecoin:
case Coin.litecoinTestNet:
return litecoin;
2022-09-09 10:59:40 +00:00
case Coin.bitcoincash:
return bitcoincash;
2022-08-26 08:11:35 +00:00
case Coin.dogecoin:
return dogecoin;
case Coin.epicCash:
return epicCash;
case Coin.firo:
return firo;
case Coin.monero:
return monero;
2022-09-27 08:09:31 +00:00
case Coin.wownero:
return wownero;
2022-09-12 12:01:42 +00:00
case Coin.namecoin:
return namecoin;
2022-10-25 15:06:37 +00:00
case Coin.particl:
return particl;
2022-08-26 08:11:35 +00:00
case Coin.bitcoinTestNet:
return bitcoinTestnet;
case Coin.bitcoincashTestnet:
return bitcoincashTestnet;
2022-08-26 08:11:35 +00:00
case Coin.firoTestNet:
return firoTestnet;
case Coin.dogecoinTestNet:
return dogecoinTestnet;
}
}
}
class _PNG {
const _PNG();
String get stack => "assets/images/stack.png";
String get splash => "assets/images/splash.png";
String get monero => "assets/images/monero.png";
2022-09-27 08:09:31 +00:00
String get wownero => "assets/images/wownero.png";
2022-08-26 08:11:35 +00:00
String get firo => "assets/images/firo.png";
String get dogecoin => "assets/images/doge.png";
String get bitcoin => "assets/images/bitcoin.png";
2022-10-28 18:03:52 +00:00
String get litecoin => "assets/images/litecoin.png";
2022-08-26 08:11:35 +00:00
String get epicCash => "assets/images/epic-cash.png";
2022-09-09 10:59:40 +00:00
String get bitcoincash => "assets/images/bitcoincash.png";
2022-09-13 18:00:43 +00:00
String get namecoin => "assets/images/namecoin.png";
2022-12-07 17:40:19 +00:00
String get particl => "assets/images/particl.png";
2022-08-26 08:11:35 +00:00
String get glasses => "assets/images/glasses.png";
String get glassesHidden => "assets/images/glasses-hidden.png";
2022-08-26 08:11:35 +00:00
String imageFor({required Coin coin}) {
switch (coin) {
case Coin.bitcoin:
case Coin.bitcoinTestNet:
return bitcoin;
2022-10-28 18:03:52 +00:00
case Coin.litecoin:
case Coin.litecoinTestNet:
return litecoin;
2022-09-09 10:59:40 +00:00
case Coin.bitcoincash:
case Coin.bitcoincashTestnet:
2022-09-09 10:59:40 +00:00
return bitcoincash;
2022-08-26 08:11:35 +00:00
case Coin.dogecoin:
case Coin.dogecoinTestNet:
return dogecoin;
case Coin.epicCash:
return epicCash;
case Coin.firo:
2022-09-09 10:59:40 +00:00
return firo;
2022-08-26 08:11:35 +00:00
case Coin.firoTestNet:
return firo;
case Coin.monero:
return monero;
2022-09-27 08:09:31 +00:00
case Coin.wownero:
return wownero;
2022-09-12 12:01:42 +00:00
case Coin.namecoin:
return namecoin;
2022-10-25 15:06:37 +00:00
case Coin.particl:
return particl;
2022-08-26 08:11:35 +00:00
}
}
}
class _ANIMATIONS {
const _ANIMATIONS();
String get test => "assets/lottie/test.json";
String get test2 => "assets/lottie/test2.json";
}