Closed alguintu closed 2 years ago
You should have a generic adapter you apply to all your models and there you can override type
(if you don't want to override all of the urlFor*
methods)
mixin WhateverAdapter<T extends DataModel<T>> on RemoteAdapter<T> {
@override
String get type => super.type.singularize();
}
Does that work?
I was pretty sure I tried all methods on type
yesterday. This works, thank you.
Is there a way to disable pluralization for all tables aside from overriding the
urlForFindAll
individually for each adapter? I've been searching for a while now but can't find an easy way to do it. Any help would be appreciated. Thanks.