From ba5424e2cc9f460810d6fd97690f3c8fcbc82745 Mon Sep 17 00:00:00 2001 From: fmk Date: Sat, 21 Aug 2021 18:50:09 +0800 Subject: [PATCH] safety --- assets/riv/runner_boy.riv | Bin 0 -> 13175 bytes lib/view_widget/classic_header.dart | 16 ++++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 assets/riv/runner_boy.riv diff --git a/assets/riv/runner_boy.riv b/assets/riv/runner_boy.riv new file mode 100644 index 0000000000000000000000000000000000000000..9b3350a2e186bfce897467aa4b3652dbe7c6f7fe GIT binary patch literal 13175 zcmd5?d3Y05*Pod#wqVj0ie#!3N=bpLET*NXZ6=w4uvoMvfV33423lxKfuf*7Yk|tX z2(pPdP!?HLl%+@&M0}y*%B!;UJ7?x5GYP5m`QCr*^W-*n&bhyH=bYa? z_spG``wi|L=tohnyjn)TMsK7y(VOWl^bWd;K0s5=D2ig>gMY0l`WJ@wr&>@{8FzrD zAE2neg&>OBA_P;E!2zo49L-VjL2M|-KUm1i8kdz*VjUMC4GO{Qq443tuu+x8OcK-^ z(-sM!tQJbf6=W1xM`n!6ADLGYK#OKvBg$|@8K+uYs&lFl1xBdcBMPh|JO?nKD-GED z?vuQ_uHWn)Fu<>Gez6DcOCPEXVc4js?H}6IGd3J@iqpoKWRJ<66yUFz#HDs8xG-!~ zPxK46sbg21sc|dkS+jBj0u;(ivgYZ-uu;9VRL7}*>i)5l>g*rPk14Wdh{}NqMm4&f%5aG0-7mi zd~w-XeOOg&5~niMw&T_9R?l{{_Ir({D1T6Fu296FNrAwaiIFR#sqmi?LWEZJ(7Xay zxmU5F!f|M4x)VjUfNv^o-4_iF_ZU8DyQmL4Hw zHQy4$%Q{CW4Tr*HTi(}jJDLgv#c&O}fvr!N?;Kbg($6rce(o@SFkXA1wtFN`bbd;h z&$D=O;Q5flwn67XG8n#bFW@&X9DX1w4#Lrc5%C2?Bs#x;zuC!Z?yT8~IGh{DCgGsJ zTZ*^+5PV}}!KyRryO^E!_V_LObf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}JPh43yW~GtiKkd*O5k|~;OK+$faO z*iF; zjGxO>k;3Cr@7WFeu=k9IEMFmuh*wjLd+=lUt01?!*o%k{RiF>8n8nHH1&4F7N6?9k zpo=nA=TFgSA|O(Tl&p%s#&XZ^&xA4i0U^;tM)1r%MOm683*QXC;$n3{h!;u)MhXu} z*AHwf(gT84>g}Ai5_@q{Z|ho7CP=*-rJ~I2F)m9nj@1QH40;pLTT9mmF4y55#z?&$ z%fw#1hpd-}%;F)-R>;r|GVr#aPdH`Z-1(K*BfvyPfQgI%6Bz*(Wvng$of1OP=w#Z& zT~4Y2PYshU0yBc7S(HxfZIDe?R&2yOBSwgfz=|?fH{6XtNeJy;tg*ou63On>q1Yp_ z(@HWDtz?w3xdvjOdrn3PLB0@32O z6=eiM)MRz@7z}GD6(mjF!I-d|2DJ{-Z9Tdb@&{6qb_r7CuY*9x$(UxPYETDnPadD? zF+SflC?YE|t?mvOF#+)?782Z@bD=^57`^s-Nol!v}R z7yASu?sJ2%IzRW4M_M0dOqJ|4^w$&6JHnXyZutchXiu@HlvN_rn!v6-F9-8yNsU!rz}fD8JZ&yXznb5V0G#4eU2oO zi9I54ILQLPz0nQLk}N=EBnyZ#oUoh<>!xi%buxI-x1ox`L`DXSGEASp)wF6K_phOuaUKwgf_c$rlik8KK+YLoz1d7NAlqe%Bo@_t=6BMg6dOIxd&P7*J z1E<_<8)cO5lE}!^h>T24lzBSr;vewKIk&@F-4uJoVMIoth>SpqvVW_?1aF50eXmw9 z%pCPN_Q+ilnTr;ZjNGLt^K{sa-)QtUVOYyKDGJ{c8G#})0wv1+tq$Y79oDS#mx^_y zI~k2@g*c4J$XyZ{xl2*z>999%D;YKbf2rw)A~FI+WCTi-{aYQji(eowVHu2@QUKR+~tqaxskyz(;y$u-1`PA69R S#0-%UGo(k%5KUr6l>Hwadk#4O literal 0 HcmV?d00001 diff --git a/lib/view_widget/classic_header.dart b/lib/view_widget/classic_header.dart index c5127240..2dafad97 100644 --- a/lib/view_widget/classic_header.dart +++ b/lib/view_widget/classic_header.dart @@ -56,11 +56,13 @@ class _CustomHeader extends RefreshIndicatorState { void initState() { super.initState(); - rootBundle.load("assets/riv/finger_tapping.riv").then((value) async { + // rootBundle.load("assets/riv/finger_tapping.riv").then((value) async { + rootBundle.load("assets/riv/runner_boy.riv").then((value) async { final riveFile = RiveFile(); riveFile.import(value); final artboard = riveFile.mainArtboard; - artboard.addController(_controllerIdle = SimpleAnimation("Idle_1")); + artboard.addController(_controllerIdle = SimpleAnimation("Animation")); + // artboard.addController(_controllerIdle = SimpleAnimation("Idle_1")); setState(() { _riveArtboard = artboard; @@ -71,10 +73,12 @@ class _CustomHeader extends RefreshIndicatorState { @override Widget buildContent(BuildContext context, RefreshStatus mode) { - if (mode == RefreshStatus.idle) { - _controllerIdle.isActive = false; - } else { - _controllerIdle.isActive = true; + if (_controllerIdle != null) { + if (mode == RefreshStatus.idle) { + _controllerIdle.isActive = false; + } else { + _controllerIdle.isActive = true; + } } return Container(