getL10nSheet method

  1. @override
Future<L10nSheet> getL10nSheet(
  1. Sheet sheet
)
override

Get the l10n data by Sheet.

Implementation

@override
Future<L10nSheet> getL10nSheet(Sheet sheet) => dio
    .get('/sheets/v2/spreadsheets/$spreadsheetToken/values/${sheet.id}')
    .then(
      (response) => L10nSheet(
        sheet,
        (response.data['data']['valueRange']['values'] as List)
            .map(
              (e) => (e as List).map<String?>((e) {
                if (e is String?) {
                  return e;
                }
                return null;
              }).toList(),
            )
            .toList(),
      ),
    );