create method

Future<T> create([
  1. Map<String, Object?> attributes = const {}
])

Creates and saves a model.

Implementation

Future<T> create([Map<String, Object?> attributes = const {}]) async {
  final model = definition.newInstance(attributes, _db);
  await model.save();
  return model;
}