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,
|
coin: coin,
|
||||||
width:
|
width:
|
||||||
isDesktop ? 324 : MediaQuery.of(context).size.width / 1.6,
|
isDesktop ? 324 : MediaQuery.of(context).size.width / 1.6,
|
||||||
|
height:
|
||||||
|
isDesktop ? null : MediaQuery.of(context).size.width / 1.6,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 32,
|
height: 32,
|
||||||
|
@ -103,6 +105,9 @@ class CreateOrRestoreWalletView extends StatelessWidget {
|
||||||
width: isDesktop
|
width: isDesktop
|
||||||
? 324
|
? 324
|
||||||
: MediaQuery.of(context).size.width / 1.6,
|
: MediaQuery.of(context).size.width / 1.6,
|
||||||
|
height: isDesktop
|
||||||
|
? null
|
||||||
|
: MediaQuery.of(context).size.width / 1.6,
|
||||||
),
|
),
|
||||||
const Spacer(
|
const Spacer(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:lottie/lottie.dart';
|
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||||
|
@ -26,8 +25,10 @@ class CoinImage extends ConsumerWidget {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
child: Lottie.asset(
|
child: Image(
|
||||||
Assets.lottie.plain(coin),
|
image: AssetImage(
|
||||||
|
Assets.gif.plain(coin),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -169,6 +169,7 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
|
||||||
CoinImage(
|
CoinImage(
|
||||||
coin: coin,
|
coin: coin,
|
||||||
height: 100,
|
height: 100,
|
||||||
|
width: 100,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: isDesktop ? 0 : 16,
|
height: isDesktop ? 0 : 16,
|
||||||
|
|
|
@ -286,6 +286,7 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
|
||||||
CoinImage(
|
CoinImage(
|
||||||
coin: coin,
|
coin: coin,
|
||||||
height: 100,
|
height: 100,
|
||||||
|
width: 100,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: isDesktop ? 0 : 16,
|
height: isDesktop ? 0 : 16,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:lottie/lottie.dart';
|
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
@ -71,8 +70,10 @@ class _RestoringDialogState extends State<BuildingTransactionDialog>
|
||||||
),
|
),
|
||||||
if (Theme.of(context).extension<StackColors>()!.themeType ==
|
if (Theme.of(context).extension<StackColors>()!.themeType ==
|
||||||
ThemeType.chan)
|
ThemeType.chan)
|
||||||
Lottie.asset(
|
Image(
|
||||||
Assets.lottie.kiss(widget.coin),
|
image: AssetImage(
|
||||||
|
Assets.gif.kiss(widget.coin),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
if (Theme.of(context).extension<StackColors>()!.themeType !=
|
if (Theme.of(context).extension<StackColors>()!.themeType !=
|
||||||
ThemeType.chan)
|
ThemeType.chan)
|
||||||
|
@ -110,8 +111,10 @@ class _RestoringDialogState extends State<BuildingTransactionDialog>
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Lottie.asset(
|
Image(
|
||||||
Assets.lottie.kiss(widget.coin),
|
image: AssetImage(
|
||||||
|
Assets.gif.kiss(widget.coin),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Generating transaction",
|
"Generating transaction",
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:lottie/lottie.dart';
|
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
@ -68,8 +67,10 @@ class _RestoringDialogState extends State<SendingTransactionDialog>
|
||||||
),
|
),
|
||||||
Theme.of(context).extension<StackColors>()!.themeType ==
|
Theme.of(context).extension<StackColors>()!.themeType ==
|
||||||
ThemeType.chan
|
ThemeType.chan
|
||||||
? Lottie.asset(
|
? Image(
|
||||||
Assets.lottie.kiss(widget.coin),
|
image: AssetImage(
|
||||||
|
Assets.gif.kiss(widget.coin),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: RotationTransition(
|
: RotationTransition(
|
||||||
turns: _spinAnimation,
|
turns: _spinAnimation,
|
||||||
|
@ -98,8 +99,10 @@ class _RestoringDialogState extends State<SendingTransactionDialog>
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Lottie.asset(
|
Image(
|
||||||
Assets.lottie.kiss(widget.coin),
|
image: AssetImage(
|
||||||
|
Assets.gif.kiss(widget.coin),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Sending transaction",
|
"Sending transaction",
|
||||||
|
|
|
@ -11,6 +11,7 @@ abstract class Assets {
|
||||||
static const socials = _SOCIALS();
|
static const socials = _SOCIALS();
|
||||||
static const exchange = _EXCHANGE();
|
static const exchange = _EXCHANGE();
|
||||||
static const buy = _BUY();
|
static const buy = _BUY();
|
||||||
|
static const gif = _GIF();
|
||||||
|
|
||||||
static Future<void> precache(BuildContext context) async {
|
static Future<void> precache(BuildContext context) async {
|
||||||
final assets = [
|
final assets = [
|
||||||
|
@ -383,12 +384,16 @@ class _ANIMATIONS {
|
||||||
const _ANIMATIONS();
|
const _ANIMATIONS();
|
||||||
|
|
||||||
String get test2 => "assets/lottie/test2.json";
|
String get test2 => "assets/lottie/test2.json";
|
||||||
|
}
|
||||||
|
|
||||||
|
class _GIF {
|
||||||
|
const _GIF();
|
||||||
|
|
||||||
String plain(Coin coin) {
|
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) {
|
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
|
# basic
|
||||||
- assets/lottie/test2.json
|
- assets/lottie/test2.json
|
||||||
|
|
||||||
# coin animations
|
# coin gifs
|
||||||
- assets/lottie/coins/bitcoin/
|
- assets/gif/coins/bitcoin/
|
||||||
- assets/lottie/coins/bitcoincash/
|
- assets/gif/coins/bitcoincash/
|
||||||
- assets/lottie/coins/dogecoin/
|
- assets/gif/coins/dogecoin/
|
||||||
- assets/lottie/coins/epicCash/
|
- assets/gif/coins/epicCash/
|
||||||
- assets/lottie/coins/ethereum/
|
- assets/gif/coins/ethereum/
|
||||||
- assets/lottie/coins/firo/
|
- assets/gif/coins/firo/
|
||||||
- assets/lottie/coins/litecoin/
|
- assets/gif/coins/litecoin/
|
||||||
- assets/lottie/coins/monero/
|
- assets/gif/coins/monero/
|
||||||
- assets/lottie/coins/namecoin/
|
- assets/gif/coins/namecoin/
|
||||||
- assets/lottie/coins/particl/
|
- assets/gif/coins/particl/
|
||||||
- assets/lottie/coins/wownero/
|
- assets/gif/coins/wownero/
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||||
|
|