use gifs instead of lottie animations for static animated assets
BIN
assets/gif/coins/bitcoin/kiss.gif
Normal file
After Width: | Height: | Size: 347 KiB |
BIN
assets/gif/coins/bitcoin/plain.gif
Normal file
After Width: | Height: | Size: 562 KiB |
BIN
assets/gif/coins/bitcoincash/kiss.gif
Normal file
After Width: | Height: | Size: 316 KiB |
BIN
assets/gif/coins/bitcoincash/plain.gif
Normal file
After Width: | Height: | Size: 443 KiB |
BIN
assets/gif/coins/dogecoin/kiss.gif
Normal file
After Width: | Height: | Size: 408 KiB |
BIN
assets/gif/coins/dogecoin/plain.gif
Normal file
After Width: | Height: | Size: 510 KiB |
BIN
assets/gif/coins/epicCash/kiss.gif
Normal file
After Width: | Height: | Size: 346 KiB |
BIN
assets/gif/coins/epicCash/plain.gif
Normal file
After Width: | Height: | Size: 587 KiB |
BIN
assets/gif/coins/ethereum/kiss.gif
Normal file
After Width: | Height: | Size: 308 KiB |
BIN
assets/gif/coins/ethereum/plain.gif
Normal file
After Width: | Height: | Size: 402 KiB |
BIN
assets/gif/coins/firo/kiss.gif
Normal file
After Width: | Height: | Size: 358 KiB |
BIN
assets/gif/coins/firo/plain.gif
Normal file
After Width: | Height: | Size: 467 KiB |
BIN
assets/gif/coins/litecoin/kiss.gif
Normal file
After Width: | Height: | Size: 332 KiB |
BIN
assets/gif/coins/litecoin/plain.gif
Normal file
After Width: | Height: | Size: 398 KiB |
BIN
assets/gif/coins/monero/kiss.gif
Normal file
After Width: | Height: | Size: 319 KiB |
BIN
assets/gif/coins/monero/plain.gif
Normal file
After Width: | Height: | Size: 401 KiB |
BIN
assets/gif/coins/namecoin/kiss.gif
Normal file
After Width: | Height: | Size: 340 KiB |
BIN
assets/gif/coins/namecoin/plain.gif
Normal file
After Width: | Height: | Size: 475 KiB |
BIN
assets/gif/coins/particl/kiss.gif
Normal file
After Width: | Height: | Size: 309 KiB |
BIN
assets/gif/coins/particl/plain.gif
Normal file
After Width: | Height: | Size: 440 KiB |
BIN
assets/gif/coins/wownero/kiss.gif
Normal file
After Width: | Height: | Size: 300 KiB |
BIN
assets/gif/coins/wownero/plain.gif
Normal file
After Width: | Height: | Size: 862 KiB |
|
@ -63,6 +63,8 @@ class CreateOrRestoreWalletView extends StatelessWidget {
|
|||
coin: coin,
|
||||
width:
|
||||
isDesktop ? 324 : MediaQuery.of(context).size.width / 1.6,
|
||||
height:
|
||||
isDesktop ? null : MediaQuery.of(context).size.width / 1.6,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 32,
|
||||
|
@ -103,6 +105,9 @@ class CreateOrRestoreWalletView extends StatelessWidget {
|
|||
width: isDesktop
|
||||
? 324
|
||||
: MediaQuery.of(context).size.width / 1.6,
|
||||
height: isDesktop
|
||||
? null
|
||||
: MediaQuery.of(context).size.width / 1.6,
|
||||
),
|
||||
const Spacer(
|
||||
flex: 2,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
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';
|
||||
|
@ -26,8 +25,10 @@ class CoinImage extends ConsumerWidget {
|
|||
return SizedBox(
|
||||
width: width,
|
||||
height: height,
|
||||
child: Lottie.asset(
|
||||
Assets.lottie.plain(coin),
|
||||
child: Image(
|
||||
image: AssetImage(
|
||||
Assets.gif.plain(coin),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -169,6 +169,7 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
|
|||
CoinImage(
|
||||
coin: coin,
|
||||
height: 100,
|
||||
width: 100,
|
||||
),
|
||||
SizedBox(
|
||||
height: isDesktop ? 0 : 16,
|
||||
|
|
|
@ -286,6 +286,7 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
|
|||
CoinImage(
|
||||
coin: coin,
|
||||
height: 100,
|
||||
width: 100,
|
||||
),
|
||||
SizedBox(
|
||||
height: isDesktop ? 0 : 16,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.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/text_styles.dart';
|
||||
|
@ -71,8 +70,10 @@ class _RestoringDialogState extends State<BuildingTransactionDialog>
|
|||
),
|
||||
if (Theme.of(context).extension<StackColors>()!.themeType ==
|
||||
ThemeType.chan)
|
||||
Lottie.asset(
|
||||
Assets.lottie.kiss(widget.coin),
|
||||
Image(
|
||||
image: AssetImage(
|
||||
Assets.gif.kiss(widget.coin),
|
||||
),
|
||||
),
|
||||
if (Theme.of(context).extension<StackColors>()!.themeType !=
|
||||
ThemeType.chan)
|
||||
|
@ -110,8 +111,10 @@ class _RestoringDialogState extends State<BuildingTransactionDialog>
|
|||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Lottie.asset(
|
||||
Assets.lottie.kiss(widget.coin),
|
||||
Image(
|
||||
image: AssetImage(
|
||||
Assets.gif.kiss(widget.coin),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Generating transaction",
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.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/text_styles.dart';
|
||||
|
@ -68,8 +67,10 @@ class _RestoringDialogState extends State<SendingTransactionDialog>
|
|||
),
|
||||
Theme.of(context).extension<StackColors>()!.themeType ==
|
||||
ThemeType.chan
|
||||
? Lottie.asset(
|
||||
Assets.lottie.kiss(widget.coin),
|
||||
? Image(
|
||||
image: AssetImage(
|
||||
Assets.gif.kiss(widget.coin),
|
||||
),
|
||||
)
|
||||
: RotationTransition(
|
||||
turns: _spinAnimation,
|
||||
|
@ -98,8 +99,10 @@ class _RestoringDialogState extends State<SendingTransactionDialog>
|
|||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Lottie.asset(
|
||||
Assets.lottie.kiss(widget.coin),
|
||||
Image(
|
||||
image: AssetImage(
|
||||
Assets.gif.kiss(widget.coin),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Sending transaction",
|
||||
|
|
|
@ -11,6 +11,7 @@ abstract class Assets {
|
|||
static const socials = _SOCIALS();
|
||||
static const exchange = _EXCHANGE();
|
||||
static const buy = _BUY();
|
||||
static const gif = _GIF();
|
||||
|
||||
static Future<void> precache(BuildContext context) async {
|
||||
final assets = [
|
||||
|
@ -383,12 +384,16 @@ class _ANIMATIONS {
|
|||
const _ANIMATIONS();
|
||||
|
||||
String get test2 => "assets/lottie/test2.json";
|
||||
}
|
||||
|
||||
class _GIF {
|
||||
const _GIF();
|
||||
|
||||
String plain(Coin coin) {
|
||||
return "assets/lottie/coins/${coin.mainNetVersion.name}/plain.lottie.json";
|
||||
return "assets/gif/coins/${coin.mainNetVersion.name}/plain.gif";
|
||||
}
|
||||
|
||||
String kiss(Coin coin) {
|
||||
return "assets/lottie/coins/${coin.mainNetVersion.name}/kiss.lottie.json";
|
||||
return "assets/gif/coins/${coin.mainNetVersion.name}/kiss.gif";
|
||||
}
|
||||
}
|
||||
|
|
24
pubspec.yaml
|
@ -363,18 +363,18 @@ flutter:
|
|||
# basic
|
||||
- assets/lottie/test2.json
|
||||
|
||||
# coin animations
|
||||
- assets/lottie/coins/bitcoin/
|
||||
- assets/lottie/coins/bitcoincash/
|
||||
- assets/lottie/coins/dogecoin/
|
||||
- assets/lottie/coins/epicCash/
|
||||
- assets/lottie/coins/ethereum/
|
||||
- assets/lottie/coins/firo/
|
||||
- assets/lottie/coins/litecoin/
|
||||
- assets/lottie/coins/monero/
|
||||
- assets/lottie/coins/namecoin/
|
||||
- assets/lottie/coins/particl/
|
||||
- assets/lottie/coins/wownero/
|
||||
# coin gifs
|
||||
- assets/gif/coins/bitcoin/
|
||||
- assets/gif/coins/bitcoincash/
|
||||
- assets/gif/coins/dogecoin/
|
||||
- assets/gif/coins/epicCash/
|
||||
- assets/gif/coins/ethereum/
|
||||
- assets/gif/coins/firo/
|
||||
- assets/gif/coins/litecoin/
|
||||
- assets/gif/coins/monero/
|
||||
- assets/gif/coins/namecoin/
|
||||
- assets/gif/coins/particl/
|
||||
- assets/gif/coins/wownero/
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||
|
|