Skip to content

Commit

Permalink
WIP: add tfloading.json to be animated
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaaElattar committed Oct 3, 2024
1 parent a73f8fc commit 0620440
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 13 deletions.
1 change: 1 addition & 0 deletions app/assets/tfloading.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"v":"5.12.2","fr":50,"ip":0,"op":70,"w":255,"h":232,"nm":"Comp 2","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":127,"ix":3},"y":{"a":1,"k":[{"t":0,"s":[103],"h":1},{"t":17.5,"s":[26],"h":1},{"t":35,"s":[-56],"h":1},{"t":52.5,"s":[-139],"h":1},{"t":70,"s":[98],"h":1}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[306,260],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.571102965112,0.710587026559,0.827450980392,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[3,260],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":70,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"logoTF_icon-0١ Outlines 2","tt":3,"tp":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[127,116,0],"ix":2,"l":2},"a":{"a":0,"k":[76.5,77,0],"ix":1,"l":2},"s":{"a":0,"k":[191.883,191.883,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[8.4,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0.1,8.401]],"v":[[50,14.9],[-65.3,14.9],[-65.3,-14.9],[65.2,-14.9],[65.2,-0.4]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tr","p":{"a":0,"k":[76.5,120.4],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[46.15,14.85],[-46.15,14.85],[-46.15,-14.85],[46.15,-14.85]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tr","p":{"a":0,"k":[95.65,76.95],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[8.4,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0.1,-8.4]],"v":[[50,-14.9],[-65.3,-14.9],[-65.3,14.9],[65.2,14.9],[65.2,0.2]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tr","p":{"a":0,"k":[76.5,33.6],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.101960785687,0.631372570992,0.560784339905,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":70,"st":0,"ct":1,"bm":0}],"markers":[],"props":{}}
24 changes: 18 additions & 6 deletions app/lib/widgets/home_logo.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:lottie/lottie.dart';

class HomeLogoWidget extends StatelessWidget {
const HomeLogoWidget({super.key});
Expand All @@ -10,12 +10,24 @@ class HomeLogoWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SvgPicture.asset(
'assets/TF_logo.svg',
alignment: Alignment.center,
colorFilter: ColorFilter.mode(
Theme.of(context).colorScheme.onBackground, BlendMode.srcIn),
Center(

child: Container(color: Colors.transparent,child: Lottie.asset(
'assets/tfloading.json',
repeat: true,
animate: true,
options: LottieOptions(enableMergePaths: true),
),)

),


// SvgPicture.asset(
// 'assets/TF_logo.svg',
// alignment: Alignment.center,
// colorFilter: ColorFilter.mode(
// Theme.of(context).colorScheme.onBackground, BlendMode.srcIn),
// ),
SizedBox(
height: MediaQuery.of(context).size.height * 0.04,
width: MediaQuery.of(context).size.width * 0.6,
Expand Down
34 changes: 27 additions & 7 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.4.1"
archive:
dependency: transitive
description:
name: archive
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
url: "https://pub.dev"
source: hosted
version: "3.6.1"
args:
dependency: transitive
description:
Expand Down Expand Up @@ -476,9 +484,11 @@ packages:
gridproxy_client:
dependency: "direct main"
description:
path: "../../../codescalers/tfgrid-sdk-dart/packages/gridproxy_client"
relative: true
source: path
path: "packages/gridproxy_client"
ref: tfchain_graphql_hotfix
resolved-ref: "314f46728e43cb86f430cda6ba756d4be3fb6e07"
url: "https://github.com/codescalers/tfgrid-sdk-dart"
source: git
version: "1.0.0"
hashlib:
dependency: transitive
Expand Down Expand Up @@ -608,6 +618,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
lottie:
dependency: "direct main"
description:
name: lottie
sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -1330,9 +1348,11 @@ packages:
tfchain_client:
dependency: "direct main"
description:
path: "../../../codescalers/tfgrid-sdk-dart/packages/tfchain_client"
relative: true
source: path
path: "packages/tfchain_client"
ref: tfchain_graphql_hotfix
resolved-ref: "314f46728e43cb86f430cda6ba756d4be3fb6e07"
url: "https://github.com/codescalers/tfgrid-sdk-dart"
source: git
version: "0.1.0"
timing:
dependency: transitive
Expand Down Expand Up @@ -1640,4 +1660,4 @@ packages:
version: "1.1.4+10"
sdks:
dart: ">=3.2.3 <4.0.0"
flutter: ">=3.16.0"
flutter: ">=3.16.6"
1 change: 1 addition & 0 deletions app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ dependencies:
qr_flutter: ^4.1.0
screen_brightness: ^1.0.1
validators: ^3.0.0
lottie: ^3.1.2

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 0620440

Please sign in to comment.