Closed mlars84 closed 1 year ago
Workaround solution:
abstract class FirstPageKey {
T firstPageKey<T>(T a, int b);
}
T firstPageKeyShim<T>(T a, int? b) {
if (a is int) return a;
throw 'unknown';
}
@GenerateMocks(
[],
customMocks: [
MockSpec<PagingController>(
returnNullOnMissingStub: true,
fallbackGenerators: {#firstPageKey: firstPageKeyShim}),
],
)
Tools:
Using mockito's GenerateMocks annotation,
@GenerateMocks([PagingController])
, results in the following error and build_runner failure:Any thoughts on a potential solution for this?