Open bing6 opened 4 years ago
import 'package:flare_flutter/flare_actor.dart'; import 'package:flutter/material.dart';
void main() { WidgetsFlutterBinding.ensureInitialized(); runApp(Material( child: MyHomePage(), )); }
class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => new _MyHomePageState(); }
class _MyHomePageState extends State { @override Widget build(BuildContext context) { return new FlareActor("assets/Penguin.flr", alignment: Alignment.center, fit: BoxFit.contain, animation: "walk"); } }
Do you have the same problems as me?
me too
I just ran the snippet you posted, and it seems to be running correctly on my side. What Flutter version are you using? Are you running the latest Flare-Flutter?
import 'package:flare_flutter/flare_actor.dart'; import 'package:flutter/material.dart';
void main() { WidgetsFlutterBinding.ensureInitialized(); runApp(Material( child: MyHomePage(), )); }
class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => new _MyHomePageState(); }
class _MyHomePageState extends State {
@override
Widget build(BuildContext context) {
return new FlareActor("assets/Penguin.flr", alignment: Alignment.center, fit: BoxFit.contain, animation: "walk");
}
}
Do you have the same problems as me?