CrudController<T extends Model> class
abstract
The quintessential resourceful controller
How to
Example:
class UsersCrudController implements CrudController {
@override
Future<dynamic> create(HttpRequest request) async {}
-- insert other crud methods --
}
final router = Router();
router.crud<User>(prefix: "", controller: UsersCrudController());
can be called without passing the User type hint.
router.crud(prefix: "", controller: SomeCrudController());
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
create(
HttpRequest request) → Future -
destroy(
HttpRequest request) → Future -
edit(
HttpRequest request) → Future -
index(
HttpRequest request) → Future -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
HttpRequest request) → Future -
store(
HttpRequest request) → Future -
toString(
) → String -
A string representation of this object.
inherited
-
update(
HttpRequest request) → Future
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited