getSheets method

  1. @override
Future<List<Sheet>> getSheets()
override

Get all sheets data from the platform. Like Sheet.id and Sheet.title.

An excel file may contain multiple sheets.

Implementation

@override
Future<List<Sheet>> getSheets() =>
    dio.get('/sheets/v3/spreadsheets/$spreadsheetToken/sheets/query').then(
          (response) => (response.data['data']['sheets'] as List)
              .map((e) => Sheet(e['sheet_id'], e['title']))
              .toList(),
        );