mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
WIP chans theme
This commit is contained in:
parent
2cc352d80d
commit
db1f5f622f
10 changed files with 144 additions and 23 deletions
94
assets/svg/chanstheme.svg
Normal file
94
assets/svg/chanstheme.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 249 KiB |
|
@ -61,7 +61,8 @@ class CreateOrRestoreWalletView extends StatelessWidget {
|
|||
),
|
||||
CoinImage(
|
||||
coin: coin,
|
||||
isDesktop: isDesktop,
|
||||
width:
|
||||
isDesktop ? 324 : MediaQuery.of(context).size.width / 1.6,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 32,
|
||||
|
@ -99,7 +100,9 @@ class CreateOrRestoreWalletView extends StatelessWidget {
|
|||
children: [
|
||||
CoinImage(
|
||||
coin: coin,
|
||||
isDesktop: isDesktop,
|
||||
width: isDesktop
|
||||
? 324
|
||||
: MediaQuery.of(context).size.width / 1.6,
|
||||
),
|
||||
const Spacer(
|
||||
flex: 2,
|
||||
|
|
|
@ -1,24 +1,41 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
|
||||
class CoinImage extends ConsumerWidget {
|
||||
const CoinImage({
|
||||
Key? key,
|
||||
required this.coin,
|
||||
required this.isDesktop,
|
||||
this.width,
|
||||
this.height,
|
||||
}) : super(key: key);
|
||||
|
||||
final Coin coin;
|
||||
final bool isDesktop;
|
||||
final double? width;
|
||||
final double? height;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return SvgPicture.asset(
|
||||
Assets.svg.imageFor(coin: coin, context: context),
|
||||
width: isDesktop ? 324 : MediaQuery.of(context).size.width / 1.6,
|
||||
);
|
||||
if (Theme.of(context).extension<StackColors>()!.themeType ==
|
||||
ThemeType.chan) {
|
||||
return SizedBox(
|
||||
width: width,
|
||||
height: height,
|
||||
child: Lottie.asset(
|
||||
Assets.lottie.plain(coin),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return SvgPicture.asset(
|
||||
Assets.svg.imageFor(coin: coin, context: context),
|
||||
width: width,
|
||||
height: height,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ import 'dart:async';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:stackwallet/notifications/show_flush_bar.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/create_or_restore_wallet_view/sub_widgets/coin_image.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
|
||||
|
@ -166,8 +166,8 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
|
|||
flex: 1,
|
||||
),
|
||||
if (!isDesktop)
|
||||
SvgPicture.asset(
|
||||
Assets.svg.imageFor(coin: coin, context: context),
|
||||
CoinImage(
|
||||
coin: coin,
|
||||
height: 100,
|
||||
),
|
||||
SizedBox(
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|||
import 'package:flutter_rounded_date_picker/flutter_rounded_date_picker.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/create_or_restore_wallet_view/sub_widgets/coin_image.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/mobile_mnemonic_length_selector.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/restore_from_date_picker.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/restore_options_next_button.dart';
|
||||
|
@ -282,8 +283,8 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
|
|||
flex: isDesktop ? 10 : 1,
|
||||
),
|
||||
if (!isDesktop)
|
||||
SvgPicture.asset(
|
||||
Assets.svg.imageFor(coin: coin, context: context),
|
||||
CoinImage(
|
||||
coin: coin,
|
||||
height: 100,
|
||||
),
|
||||
SizedBox(
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:lottie/lottie.dart';
|
|||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||
|
@ -30,8 +31,6 @@ class _RestoringDialogState extends State<BuildingTransactionDialog>
|
|||
|
||||
late final VoidCallback onCancel;
|
||||
|
||||
final bool chan = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
onCancel = widget.onCancel;
|
||||
|
@ -70,11 +69,13 @@ class _RestoringDialogState extends State<BuildingTransactionDialog>
|
|||
const SizedBox(
|
||||
height: 40,
|
||||
),
|
||||
if (chan)
|
||||
if (Theme.of(context).extension<StackColors>()!.themeType ==
|
||||
ThemeType.chan)
|
||||
Lottie.asset(
|
||||
Assets.lottie.kiss(widget.coin),
|
||||
),
|
||||
if (!chan)
|
||||
if (Theme.of(context).extension<StackColors>()!.themeType !=
|
||||
ThemeType.chan)
|
||||
RotationTransition(
|
||||
turns: _spinAnimation,
|
||||
child: SvgPicture.asset(
|
||||
|
@ -102,7 +103,8 @@ class _RestoringDialogState extends State<BuildingTransactionDialog>
|
|||
onWillPop: () async {
|
||||
return false;
|
||||
},
|
||||
child: chan
|
||||
child: Theme.of(context).extension<StackColors>()!.themeType ==
|
||||
ThemeType.chan
|
||||
? StackDialogBase(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:lottie/lottie.dart';
|
|||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
||||
|
@ -26,8 +27,6 @@ class _RestoringDialogState extends State<SendingTransactionDialog>
|
|||
late AnimationController? _spinController;
|
||||
late Animation<double> _spinAnimation;
|
||||
|
||||
final bool chan = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_spinController = AnimationController(
|
||||
|
@ -67,7 +66,8 @@ class _RestoringDialogState extends State<SendingTransactionDialog>
|
|||
const SizedBox(
|
||||
height: 40,
|
||||
),
|
||||
chan
|
||||
Theme.of(context).extension<StackColors>()!.themeType ==
|
||||
ThemeType.chan
|
||||
? Lottie.asset(
|
||||
Assets.lottie.kiss(widget.coin),
|
||||
)
|
||||
|
@ -91,7 +91,8 @@ class _RestoringDialogState extends State<SendingTransactionDialog>
|
|||
onWillPop: () async {
|
||||
return false;
|
||||
},
|
||||
child: chan
|
||||
child: Theme.of(context).extension<StackColors>()!.themeType ==
|
||||
ThemeType.chan
|
||||
? StackDialogBase(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
|
|
|
@ -163,7 +163,6 @@ class _ThemeToggle extends ConsumerState<ThemeToggle> {
|
|||
String assetNameFor(ThemeType type) {
|
||||
switch (type) {
|
||||
case ThemeType.light:
|
||||
case ThemeType.chan:
|
||||
return Assets.svg.themeLight;
|
||||
case ThemeType.dark:
|
||||
return Assets.svg.themeDark;
|
||||
|
@ -175,6 +174,8 @@ class _ThemeToggle extends ConsumerState<ThemeToggle> {
|
|||
return Assets.svg.themeFruit;
|
||||
case ThemeType.forest:
|
||||
return Assets.svg.themeForest;
|
||||
case ThemeType.chan:
|
||||
return Assets.svg.themeChan;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -156,6 +156,7 @@ class _SVG {
|
|||
String get themeOcean => "assets/svg/ocean-breeze-theme.svg";
|
||||
String get themeLight => "assets/svg/light-mode.svg";
|
||||
String get themeDark => "assets/svg/dark-theme.svg";
|
||||
String get themeChan => "assets/svg/chanstheme.svg";
|
||||
|
||||
String get circleSliders => "assets/svg/configuration.svg";
|
||||
String get circlePlus => "assets/svg/plus-circle.svg";
|
||||
|
|
|
@ -335,6 +335,7 @@ flutter:
|
|||
- assets/svg/oled-black-theme.svg
|
||||
- assets/svg/fruit-sorbet-theme.svg
|
||||
- assets/svg/forest-theme.svg
|
||||
- assets/svg/chanstheme.svg
|
||||
|
||||
# light theme specific
|
||||
- assets/svg/themed/light/
|
||||
|
|
Loading…
Reference in a new issue