Closed icred-raul closed 1 month ago
Scroll infintely on mobile platform too. I had tested on web and worked very well.
https://github.com/bosskmk/pluto_grid/assets/126168272/8d6155ab-92f9-463a-b125-087d21a08d33
return PlutoGrid( mode: PlutoGridMode.selectWithOneTap, createFooter: (stateManager) { return PlutoInfinityScrollRows( fetch: fetch, stateManager: stateManager, initialFetch: true, fetchWithFiltering: true, fetchWithSorting: true, ); }, onLoaded: (event) { store.setListExportStateManager(event.stateManager); }, onSelected: (event) { if (event.row?.cells['isFinished']?.value) { _showMenu( context: context, uuid: event.row?.cells['uuid']?.value, ); } }, configuration: const PlutoGridConfiguration( localeText: PlutoGridLocaleText.brazilianPortuguese(), ), columns: GridListExportMobile()._columns, rows: GridListExportMobile().rows( export: store.listExport, ), ); Future<PlutoInfinityScrollRowsResponse> fetch( PlutoInfinityScrollRowsRequest request, ) async { final store = GetIt.I.get<ListExportsStore>(); final filterModel = { if (store.startDate != null && store.endDate != null) "startDate": FilterModelDart( filterType: 'dateTime', type: 'inRange', dateFrom: store.startDate?.startDateFormattedToBack, dateTo: store.endDate?.endDateFormattedToBack, ).toJson(), if (store.startDate != null) "startDate": FilterModelDart( filterType: 'dateTime', type: 'greaterThanOrEqual', dateFrom: store.startDate?.startDateFormattedToBack, ).toJson(), if (store.uuid != null && store.uuid!.isNotEmpty) "uuid": FilterModelDart( type: 'equals', filterType: 'text', filter: store.uuid, ).toJson(), if (store.cpf != null && store.cpf!.isNotEmpty) "createPerson.code": FilterModelDart( type: 'equals', filterType: 'text', filter: store.cpf != null ? UtilBrasilFields.removeCaracteres(store.cpf!) : null, ).toJson(), }; final repository = GetIt.I.get<ExportRepository>(); final result = await repository.exportList({ "startRow": request.filterRows.length * 10, "endRow": request.filterRows.length * 10, "sortModel": [ {"sort": "desc", "colId": "startDate"} ], "filterModel": filterModel, }); final rows = (result['rowData'] as List) .map((e) => ExportModelResponse.fromJson(e)) .toList(); return PlutoInfinityScrollRowsResponse( isLast: false, rows: GridListExportMobile().rows(export: rows), ); }
Flutter version
PlutoGrid version
OS
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Steps to reproduce the bug
Expected results
Scroll infintely on mobile platform too. I had tested on web and worked very well.
Actual results
https://github.com/bosskmk/pluto_grid/assets/126168272/8d6155ab-92f9-463a-b125-087d21a08d33
Code sample
Execution Environment
Flutter version
PlutoGrid version
OS