onCreate method

  1. @protected
Future<T> onCreate(
  1. T newItem
)

Called when trying to add a new item, Must return the added item, or throw an error if it's failed to add.

Implementation

@protected
Future<T> onCreate(T newItem) async {
  return newItem;
}