Browse Source

safety

master
fmk 3 years ago
parent
commit
ba5424e2cc
  1. BIN
      assets/riv/runner_boy.riv
  2. 8
      lib/view_widget/classic_header.dart

BIN
assets/riv/runner_boy.riv

Binary file not shown.

8
lib/view_widget/classic_header.dart

@ -56,11 +56,13 @@ class _CustomHeader extends RefreshIndicatorState<CustomHeader> {
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,11 +73,13 @@ class _CustomHeader extends RefreshIndicatorState<CustomHeader> {
@override
Widget buildContent(BuildContext context, RefreshStatus mode) {
if (_controllerIdle != null) {
if (mode == RefreshStatus.idle) {
_controllerIdle.isActive = false;
} else {
_controllerIdle.isActive = true;
}
}
return Container(
height: 50,

Loading…
Cancel
Save