We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
II am on latest dev branch of riverpod generator and yet I am facing issues for generics. The code builder leaves "Generics" in 2 functions:
1). _copyWith: The create Function parameter does not consider Generics and generates a compile time error.
ListBlocProvider _copyWith( ListBloc Function() create, )
2). == override: The first condition of == does not consider generics and hence 2 objects are never equal and generate a compile time error.
@OverRide bool operator ==(Object other) { return other is ListBlocProvider && other.runtimeType == runtimeType && other.getData == getData; }
A sample error message is added for better understanding.
THIS IS WHAT "SHOULD" BE GENERATED:
BUT THIS IS WHAT IS GENERATED:
The text was updated successfully, but these errors were encountered:
Please share your provider definition. The generated code isn't useful to me without seeing the code that generated this.
Sorry, something went wrong.
BASE:
import 'package:astra_ui/state/list_state.dart'; import 'package:fast_immutable_collections/fast_immutable_collections.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'test.g.dart';
typedef ListDataGetter<Model, Sort, Cursor> = Future<(IList, Cursor)> Function({ Map<String, dynamic> filters, Sort? sort, Cursor? cursor, });
@riverpod class ListBloc<Model, Sort, Cursor> extends _$ListBloc<Model, Sort, Cursor> { @OverRide ListState<Model, Sort, Cursor> build({ required String type, required ListDataGetter<Model, Sort, Cursor> getData, String? parentId, }) { return ListState<Model, Sort, Cursor>( data: [].lock, loading: true, parentId: parentId, ); } }
rrousselGit
No branches or pull requests
II am on latest dev branch of riverpod generator and yet I am facing issues for generics.
The code builder leaves "Generics" in 2 functions:
1). _copyWith: The create Function parameter does not consider Generics and generates a compile time error.
ListBlocProvider _copyWith( ListBloc Function() create, )
2). == override: The first condition of == does not consider generics and hence 2 objects are never equal and generate a compile time error.
@OverRide bool operator ==(Object other) { return other is ListBlocProvider && other.runtimeType == runtimeType && other.getData == getData; }
A sample error message is added for better understanding.
THIS IS WHAT "SHOULD" BE GENERATED:
BUT THIS IS WHAT IS GENERATED:
The text was updated successfully, but these errors were encountered: