Skip to content

Generator wrong type #204

@stact

Description

@stact

Hey I got an issue, just updated the package

Packages

reactive_forms: ^18.2.2
reactive_forms_generator: ^8.0.3 
reactive_forms_annotations: ^8.0.1
Image

Console when launching the app

models/groups/group.gform.dart:466:55: Error: A value of type 'Map<String, dynamic>' can't be returned from a function with return type 'Map<String, Object>'.
group.gform.dart:466
 - 'Map' is from 'dart:core'.
 - 'Object' is from 'dart:core'.
  Map<String, Object> get titleErrors => titleControl.errors;
                                                      ^
Image

Minimal implementation sample

part 'user_group.freezed.dart';
part 'user_group.gform.dart';

/// Domain
@freezed
@Rf()
abstract class Group with _$Group {
  /// Constructor
  const factory Group({
    required String title,
    required DateTime createdAt,
    required DateTime modifiedAt,
  }) = _Group;
  const Group._();
}

Hope it helps to find the issue. Let me know if you need additional details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions