GSheets class
Manages googleapis auth and Spreadsheet fetching.
Constructors
-
GSheets(dynamic credentialsJson, {String? impersonatedUser, List<
String> scopes = const [SheetsApi.spreadsheetsScope, SheetsApi.driveScope]}) - Creates an instance of GSheets.
-
GSheets.withClient(FutureOr<
AutoRefreshingAuthClient> client) - Creates an instance of GSheets with custom client
-
GSheets.withServiceAccountCredentials(ServiceAccountCredentials credentials, {String? impersonatedUser, List<
String> scopes = const [SheetsApi.spreadsheetsScope, SheetsApi.driveScope]}) - Creates an instance of GSheets.
Properties
Methods
-
close(
{bool closeExternal = true}) → Future< void> - Closes the client and cleans up any resources associated with it.
-
createSpreadsheet(
String title, {List< String> worksheetTitles = const <String>['Sheet1'], ValueRenderOption render = ValueRenderOption.unformattedValue, ValueInputOption input = ValueInputOption.userEntered}) → Future<Spreadsheet> -
Creates a new
Spreadsheet
, and returns it. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
spreadsheet(
String spreadsheetId, {ValueRenderOption render = ValueRenderOption.unformattedValue, ValueInputOption input = ValueInputOption.userEntered}) → Future< Spreadsheet> -
Fetches and returns Future
Spreadsheet
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
batchUpdate(
AutoRefreshingAuthClient client, String spreadsheetId, List< Map< requests) → Future<String, dynamic> >Response> - Applies one or more updates to the spreadsheet. About batchUpdate
-
export(
{required AutoRefreshingAuthClient client, required String spreadsheetId, required String spreadsheetUrl, required ExportFormat format, required int? worksheetId}) → Future< Uint8List> -
Exports spreadsheet with
spreadsheetId
in specifiedformat
and returns bytes that can be written to the file