create<R> method
Implementation
Future<void> create<R>(T data) async {
emit(state.copy(isLoading: true));
try {
var result = await handler.create(data);
emit(state.copy(result: result.result));
} catch (_) {
emit(state.copy(error: "Something went wrong!"));
}
}