You have to add async to your function.
await database.transaction((txn) async { });
I would also replace then / catchError inside the function with await and try/catch.
If function use async-await then you have to use Future
Future<void> -> function is future and return null
Future<String> -> function is future and return String as output
In above you can replace Future<_> by the return type you expect.
I think you have to return int, it will help to know on which row CRUD operation is performed