flare_flutter 1.0.0 copy "flare_flutter: ^1.0.0" to clipboard
flare_flutter: ^1.0.0 copied to clipboard

outdated

Vector design and runtime animation for Flutter.

example/lib/main.dart

import "package:flare_flutter/flare_actor.dart";
import "package:flutter/material.dart";

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flare Demo',
      theme: new ThemeData(primarySwatch: Colors.blue),
      home: new MyHomePage(title: 'Flare-Flutter'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _MyHomePageState createState() => new _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  String _animationName = "idle";

  @override
    Widget build(BuildContext context) {
        return new Scaffold(
            backgroundColor: Colors.grey,
            appBar: new AppBar(title: new Text(widget.title)),
            body: new Center(
                child: new Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    mainAxisSize: MainAxisSize.min,
                    children: 
                    [
                        Expanded(
                            child: FlareActor("assets/Filip.flr",
                                alignment: Alignment.center,
                                fit: BoxFit.contain,
                                animation: _animationName,
                            )
                        )
                    ],
                ),
            )
        );
    }
}
730
likes
0
pub points
98%
popularity

Publisher

verified publisherrive.app

Vector design and runtime animation for Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flare_flutter