Skip to content

FlareActor color parameter is ignored #39

@furkantektas

Description

@furkantektas

Hello,
I created a Flare animation a few months ago : https://www.2dimensions.com/a/tektas/files/flare/literda-logo/preview

I was using this particular animation with FlareActor's color parameter. After updating the latest version (v1.2.1), FlareActor's color parameter does not work.
Here is a minimal example which should paint the animation on a yellow background with an Indigo color:

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flare Demo',
      theme: ThemeData(
        primarySwatch: Colors.yellow,
      ),
      home: MainPage(),
    );
  }
}

class MainPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
        color: Colors.yellow,
        width: 100.0,
        height: 100.0,
        child: FlareActor(
          "assets/literda_logo_anim.flr",
          alignment: Alignment.center,
          fit: BoxFit.contain,
          animation: "Reveal",
          color: Colors.indigo,
        ));
  }
}

Here is the output:

flare-color-demo

Here is the flutter doctor output:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.1.8, on Mac OS X 10.13.6 17G5019, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2018.1.2)
[✓] VS Code (version 1.30.2)
[✓] Connected device (1 available)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions