insertRow method
Updates row values with values from map
.
Expands current sheet's size if inserting range is out of sheet's bounds.
map
- map containing values to insert (not null nor empty)
row
- row index to insert values of map
to,
rows start at index 1
fromColumn
- optional (defaults to 1), column index for the first inserted
value,
columns start at index 1 (column A)
mapTo
- optional (defaults to 1), index of a row to which
keys of the map
will be mapped to,
rows start at index 1
appendMissing
- optional (defaults to false
), whether keys of map
(with its related values) that are not present in a mapTo
row
should be added
overwrite
- optional (defaults to false
), whether clear cells of
row
if map
does not contain value for them
Returns Future true
in case of success.
Throws GSheetsException.
Implementation
Future<bool> insertRow(
int row,
Map<String, dynamic> map, {
int fromColumn = 1,
int mapTo = 1,
bool appendMissing = false,
bool overwrite = false,
}) async {
checkMap(map);
return insertRows(
row,
[map],
fromColumn: fromColumn,
mapTo: mapTo,
appendMissing: appendMissing,
overwrite: overwrite,
);
}