In dart, I turn my `DataModel` into a json documen...
# flutter
m
In dart, I turn my
DataModel
into a json document using a
toMap()
method defined by me. I pass that document to the insert statement like this:
Copy code
dart
addTransaction(DataModel data) {
    var response = _databaseService
        .insert(
          data.toMap(),
        )
        .execute();
    return response;
  }
I want to do the same thing but in a
Stored Procedure
like this:
Copy code
dart
addTransaction(DataModel data) {
    var response = _databaseService
        .rpc(
          data.toMap(),
        )
        .execute();
    return response;
  }
What would be the name of the object type while defining this function? I cannot find
json
in the intellisense. The reason I want to do this is to be able to add some data from the json document in one table and the rest of the data in another table in one go.