CAKE-359 | applied animation to yat_alert.dart

wownero
OleksandrSobol 3 years ago
parent 8955a10ca8
commit 9958f6c2e0

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -8,6 +8,7 @@ import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:lottie/lottie.dart';
class YatAlert extends StatelessWidget { class YatAlert extends StatelessWidget {
YatAlert({@required this.wallet, this.isYatDevMode = false}) YatAlert({@required this.wallet, this.isYatDevMode = false})
@ -25,6 +26,7 @@ class YatAlert extends StatelessWidget {
static const _createSuffix = '/create'; static const _createSuffix = '/create';
static const _queryParameter = '?addresses='; static const _queryParameter = '?addresses=';
final image = Image.asset('assets/images/yat_crypto.png'); final image = Image.asset('assets/images/yat_crypto.png');
final anim = Lottie.asset('assets/animation/anim1.json');
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -40,14 +42,15 @@ class YatAlert extends StatelessWidget {
content: Column( content: Column(
children: [ children: [
Container( Container(
height: 90, height: 45, // 90
padding: EdgeInsets.only(left: 24, right: 24), padding: EdgeInsets.only(left: 24, right: 24),
child: YatBar(onClose: () => Navigator.of(context).pop()) child: YatBar(onClose: () => Navigator.of(context).pop())
), ),
AspectRatio( anim,
aspectRatio: aspectRatioImage, // AspectRatio(
child: FittedBox(child: image, fit: BoxFit.fill) // aspectRatio: aspectRatioImage,
), // child: FittedBox(child: image, fit: BoxFit.fill)
// ),
Container( Container(
padding: EdgeInsets.only(left: 30, right: 30), padding: EdgeInsets.only(left: 30, right: 30),
child: Column( child: Column(

@ -573,6 +573,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.11.4" version: "0.11.4"
lottie:
dependency: "direct main"
description:
name: lottie
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.0+1"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:

@ -58,6 +58,7 @@ dependencies:
webview_flutter: ^2.0.2 webview_flutter: ^2.0.2
flutter_spinkit: ^5.0.0 flutter_spinkit: ^5.0.0
uni_links: ^0.4.0 uni_links: ^0.4.0
lottie: ^0.7.0
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
@ -113,6 +114,7 @@ flutter:
- assets/litecoin_electrum_server_list.yml - assets/litecoin_electrum_server_list.yml
- assets/text/ - assets/text/
- assets/faq/ - assets/faq/
- assets/animation/
fonts: fonts:
- family: Lato - family: Lato

Loading…
Cancel
Save