Skip to content

Commit 1e79bd4

Browse files
Asher.Guo@barcoverse.comAsher.Guo@barcoverse.com
Asher.Guo@barcoverse.com
authored and
Asher.Guo@barcoverse.com
committed
增加 lottie 动画
1 parent ba72870 commit 1e79bd4

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/page/trend/trend_page.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import 'package:gsy_github_app_flutter/widget/gsy_card_item.dart';
1717
import 'package:gsy_github_app_flutter/widget/pull/nested/gsy_sliver_header_delegate.dart';
1818
import 'package:gsy_github_app_flutter/widget/pull/nested/nested_refresh.dart';
1919
import 'package:gsy_github_app_flutter/page/repos/widget/repos_item.dart';
20+
import 'package:lottie/lottie.dart';
2021

2122
/// 主页趋势tab页
2223
/// 目前采用纯 bloc 的 rxdart(stream) + streamBuilder
@@ -298,14 +299,10 @@ class TrendPageState extends ConsumerState<TrendPage>
298299
),
299300
closedColor: Theme.of(context).primaryColor,
300301
closedBuilder: (BuildContext context, VoidCallback openContainer) {
301-
return const SizedBox(
302+
return SizedBox(
302303
width: size,
303304
height: size,
304-
child: Icon(
305-
Icons.person,
306-
size: 30,
307-
color: Colors.white,
308-
),
305+
child: Lottie.asset("static/file/user.json", fit: BoxFit.cover),
309306
);
310307
},
311308
);

static/file/user.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"v":"5.5.7","meta":{"g":"LottieFiles AE 0.1.20","a":"","k":"","d":"","tc":""},"fr":60,"ip":0,"op":120,"w":540,"h":540,"nm":"profile in out","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Layer 2 Outlines","parent":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0,"y":1},"o":{"x":0.19,"y":0},"t":0,"s":[234.822,3.142,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0,"y":0},"o":{"x":0.19,"y":0.19},"t":38,"s":[234.822,-41.858,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.81,"y":1},"o":{"x":1,"y":0},"t":84,"s":[234.822,-41.858,0],"to":[0,0,0],"ti":[0,0,0]},{"t":114,"s":[234.822,3.142,0]}],"ix":2},"a":{"a":0,"k":[167.133,167.134,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0,0,0],"y":[1,1,1]},"o":{"x":[0.17,0.17,0.17],"y":[0,0,0]},"t":0,"s":[0,0,100]},{"i":{"x":[0,0,0],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"t":7,"s":[100,100,100]},{"i":{"x":[0.83,0.83,0.83],"y":[1,1,1]},"o":{"x":[1,1,1],"y":[0,0,0]},"t":107,"s":[100,100,100]},{"t":114,"s":[0,0,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0,"y":1},"o":{"x":0.19,"y":0},"t":0,"s":[{"i":[[0,-24.981],[24.981,0],[0,24.981],[-24.981,0]],"o":[[0,24.981],[-24.981,0],[0,-24.981],[24.981,0]],"v":[[45.232,0],[0,45.232],[-45.232,0],[0,-45.232]],"c":true}]},{"i":{"x":0,"y":1},"o":{"x":0.19,"y":0},"t":38,"s":[{"i":[[0,-43.98],[43.981,0],[0,43.98],[-43.98,0]],"o":[[0,43.98],[-43.98,0],[0,-43.98],[43.981,0]],"v":[[79.633,-0.001],[-0.001,79.633],[-79.633,-0.001],[-0.001,-79.633]],"c":true}]},{"i":{"x":0.81,"y":1},"o":{"x":1,"y":0},"t":84,"s":[{"i":[[0,-43.98],[43.981,0],[0,43.98],[-43.98,0]],"o":[[0,43.98],[-43.98,0],[0,-43.98],[43.981,0]],"v":[[79.633,-0.001],[-0.001,79.633],[-79.633,-0.001],[-0.001,-79.633]],"c":true}]},{"t":114,"s":[{"i":[[0,-24.981],[24.981,0],[0,24.981],[-24.981,0]],"o":[[0,24.981],[-24.981,0],[0,-24.981],[24.981,0]],"v":[[45.232,0],[0,45.232],[-45.232,0],[0,-45.232]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":35,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[167.133,167.134],"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}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"1 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0,"y":1},"o":{"x":0.167,"y":0.167},"t":0,"s":[315.5,379.496,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.78,"y":0.78},"o":{"x":0.167,"y":0.167},"t":38,"s":[270.5,379.496,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.78,"y":1},"o":{"x":1,"y":0},"t":84,"s":[270.5,379.496,0],"to":[0,0,0],"ti":[0,0,0]},{"t":114,"s":[220.5,379.496,0]}],"ix":2},"a":{"a":0,"k":[234.822,147.004,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-31.906,0],[0,0],[0,-31.907],[0,0]],"o":[[0,0],[0,-31.907],[0,0],[31.906,0],[0,0],[0,0]],"v":[[-147.322,59.504],[-147.322,-1.732],[-89.551,-59.504],[89.551,-59.504],[147.322,-1.732],[147.322,59.504]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.02],"y":[1]},"o":{"x":[0.42],"y":[0]},"t":0,"s":[0]},{"t":7,"s":[35]}],"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[234.822,147.004],"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":"tm","s":{"a":1,"k":[{"i":{"x":[0.78],"y":[1]},"o":{"x":[1],"y":[0]},"t":84,"s":[0]},{"t":114,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.08],"y":[1]},"o":{"x":[0.2],"y":[0]},"t":0,"s":[0]},{"t":38,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":240,"st":0,"bm":0}],"markers":[]}

0 commit comments

Comments
 (0)