Skip to content

The setter 'imageFilter' isn't defined for the class 'Paint'. #11

@emailsubjekt

Description

@emailsubjekt

I am using your regular example from github

this is my pubspec

smart_flare: ^0.2.8

This is my main

import 'package:flutter/material.dart';
import 'package:smart_flare/smart_flare.dart';

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

class FlareDemo extends StatefulWidget {
@OverRide
_FlareDemoState createState() => _FlareDemoState();
}

class _FlareDemoState extends State {
@OverRide
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
body: SmartFlareActor(
width: 295.0,
height: 251.0,
filename: 'animations/rotating_star.flr'));
}
}

THIS IS THE ERROR MESSAGE I GET

Compiler message:
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.8.3/lib/flare.dart:1331:18: Error: The setter 'imageFilter' isn't defined for the class 'Paint'.

  • 'Paint' is from 'dart:ui'.
    Try correcting the name to the name of an existing setter, or defining a setter or field named 'imageFilter'.
    layerPaint.imageFilter = _blurFilter(baseBlurX, baseBlurY);
    ^^^^^^^^^^^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.8.3/lib/flare.dart:1347:13: Error: The setter 'imageFilter' isn't defined for the class 'Paint'.
  • 'Paint' is from 'dart:ui'.
    Try correcting the name to the name of an existing setter, or defining a setter or field named 'imageFilter'.
    ..imageFilter = _blurFilter(
    ^^^^^^^^^^^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.8.3/lib/flare.dart:1391:13: Error: The setter 'imageFilter' isn't defined for the class 'Paint'.
  • 'Paint' is from 'dart:ui'.
    Try correcting the name to the name of an existing setter, or defining a setter or field named 'imageFilter'.
    ..imageFilter = _blurFilter(
    ^^^^^^^^^^^
    Compiler failed on D:\FlutterDell\Test152-Flare2\BoringStarTest\boring_star_test\lib\main.dart

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 665

  • What went wrong:
    Execution failed for task ':app:compileflutterBuildDebugX86'.

Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 10s
Finished with error: Gradle task assembleDebug failed with exit code 1

I get the same thing from flutter_flare

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions