bosskmk / pluto_grid

PlutoGrid is a dataGrid for flutter that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.
https://pluto.weblaze.dev
MIT License
637 stars 291 forks source link

[Bug] PWA build throws NoSuchMethodError on rendererContext #933

Closed iamdineshkumar closed 7 months ago

iamdineshkumar commented 10 months ago

Steps to reproduce the bug

  1. Build Flutter web app bash flutter build web I even tried to build forcing web renderer to html and canvaskit as well as with --profile flag to avoid minification
  2. then server the generated web application

Expected results

  1. When custom renderer is declared for the cell it should render
  2. When click on button widget generated in custom render should function normally

Actual results

It leads to grey area in cell instead of actual output On clicking button leads to no reaction image

Actually issue shown in console is rendererContext.get$cell is not a function

image

Code sample

columns = [

         PlutoColumn(
              title: 'S.No',
              field: 'sNo',
              type: PlutoColumnType.text(),
              renderer:  (rendererContext) {
               return Text(rendererContext.row.rowIdx);
             }
        ),

        PlutoColumn(
              title: 'Name',
              field: 'name',
              type: PlutoColumnType.text(),
        ),
        PlutoColumn(
              title: 'Action',
              field: 'button',
              type: PlutoColumnType.text(),
              renderer:  (rendererContext) {
          return Row(
            children: [
              IconButton(
                icon: const Icon(
                  Icons.visibility_rounded,
                ),
                onPressed: () {
                  showDialog(
                    context: context,
                    builder: (context) => const AlertDialog(
                      title: Text(rendererContext.cell.value),
                    ),
                  );
                },
                iconSize: 18,
                color: Colors.green,
                padding: const EdgeInsets.all(0),
              ),
            ],
          );
        },
      ),
   ),
];

Execution Environment

Flutter version Flutter version is 3.10.6

PlutoGrid version PlutoGrid version is 7.0.2

OS Windows 10 & Latest MacOS

iamdineshkumar commented 9 months ago

While running in development with Iive reload in chrome everything works fine. But when it's build for web then comes the issue.

iamdineshkumar commented 9 months ago

@bosskmk Am i building this in right way or Any workaround to handle this?

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 30 days with no activity.

iamdineshkumar commented 8 months ago

Any update?

iamdineshkumar commented 8 months ago

Any update?

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 7 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

iamdineshkumar commented 7 months ago

Its still not resolved or addressed