Iteo / theme_tailor

Code generator for Flutter's theme extension classes.
https://pub.dev/packages/theme_tailor
MIT License
79 stars 13 forks source link

[Bug]: Member not found: 'TailorMixin.fromJson'. #100

Closed shahmirzali49 closed 9 months ago

shahmirzali49 commented 9 months ago

Desctibe the bug

dart run build_runner build --delete-conflicting-outputs
[INFO] Generating build script completed, took 426ms
[WARNING] ../../.puro/shared/pub_cache/hosted/pub.dev/theme_tailor-3.0.0/lib/builder.dart:11:45: Error: Member not found: 'TailorMixin.fromJson'.
    [TailorAnnotationsGenerator(TailorMixin.fromJson(options.config))],
                                            ^^^^^^^^
[INFO] Precompiling build script... completed, took 1.2s
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'package:flutter/material.dart';
import 'package:theme_tailor_annotation/theme_tailor_annotation.dart';

part 'theme_extension.tailor.dart';

@TailorMixinComponent()
class AppColors extends ThemeExtension<AppColors> with _$AppColorsTailorMixin {
  const AppColors({
    required this.color100,
    required this.color200,
    required this.color300,
    required this.textColor100,
    required this.textColor200,
    required this.textColor300,
    required this.buttonSplashColor,
    required this.buttonBorderColor,
    required this.homePageSliverHeaderTextColor1,
    required this.homePageSliverHeaderTextColor2,
  });
  final Color color100;
  final Color color200;
  final Color color300;
  final Color textColor100;
  final Color textColor200;
  final Color textColor300;
  final Color homePageSliverHeaderTextColor1;
  final Color homePageSliverHeaderTextColor2;
  final Color buttonSplashColor;
  final Color buttonBorderColor;
}

Reproduction steps

dart run build_runner build --delete-conflicting-outputs

Expected behaviour

work

Dart version

3.3.0

Package version

3.0.0

What platform are you seeing the problem on?

terminal

Falynsky commented 9 months ago

@shahmirzali49 Fix available on version 3.0.1 :)