FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
114 stars 19 forks source link

Checkbox null error inside a ListView #3396

Closed sergi95 closed 1 month ago

sergi95 commented 1 month ago

Can we access your project?

Current Behavior

When I add a checkbox inside a ListView with its corresponding layout widgets, the page breaks and the checkbox does not work.

Expected Behavior

When you add a checkbox inside a ListView it should have the expected behavior and work without problems. A while ago it worked without problems.

Steps to Reproduce

  1. Create new page
  2. Add Listview widget
  3. Add Column widget
  4. Add Row widget
  5. Add Checkbox widget
  6. Run aplication
  7. Enter the page
  8. Click on the checkbox

Reproducible from Blank

Bug Report Code (Required)

IT4Cz8jfz49Om+FF7oSJcPpVtDgXHEQjRYIZ0uxTSkkaHZPMCpkqdcnQXFJWUuG0S2NYI2CZkmEx+azemvPDKfY5C0+qfYA4+M9QaQ/vVkCtaaqzO7qNdG5/AtxPN0jE1p+nmxFQAPhuZXAj3HGANu+RSjHXJ7WzNmsdOfKZIZOK2SrDX1iXc2URm05KZDPz

Visual documentation

image

Error_checkbox.webm

══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ dart_sdk.js:37972 The following _TypeError was thrown during a scheduler callback: dart_sdk.js:37972 TypeError: null: type 'Null' is not a subtype of type 'bool' dart_sdk.js:37972 dart_sdk.js:37972 When the exception was thrown, this was the stack: dart_sdk.js:37972 dart:sdk_internal 11994:11 throw_ dart_sdk.js:37972 dart:sdk_internal 22922:15 _failedAsCheck dart_sdk.js:37972 dart:sdk_internal 22908:14 _generalAsCheckImplementation dart_sdk.js:37972 dart:sdk_internal 31741:111 <fn> dart_sdk.js:37972 dart:sdk_internal 32788:74 moveNext dart_sdk.js:37972 dart:sdk_internal 32903:33 moveNext dart_sdk.js:37972 dart:sdk_internal 32787:30 moveNext dart_sdk.js:37972 dart:sdk_internal 13192:21 next dart_sdk.js:37972 dart:sdk_internal 134313:18 of dart_sdk.js:37972 dart:sdk_internal 30913:30 toList dart_sdk.js:37972 ../packages//auth/firebase_auth/firebase_auth_manager.dart.js 11274:223 get checkboxCheckedItems dart_sdk.js:37972 ../packages//auth/firebase_auth/firebase_auth_manager.dart.js 11319:1257 toWidgetClassDebugData dart_sdk.js:37972 ../packages//auth/firebase_auth/firebase_auth_manager.dart.js 23486:333 <fn> dart_sdk.js:37972 ../packages/flutter/src/scheduler/binding.dart.js 934:9 [_invokeFrameCallback] dart_sdk.js:37972 ../packages/flutter/src/scheduler/binding.dart.js 903:39 handleDrawFrame dart_sdk.js:37972 ../packages/flutter/src/scheduler/binding.dart.js 812:12 [_handleDrawFrame] dart_sdk.js:37972 dart:sdk_internal 206710:7 invoke dart_sdk.js:37972 dart:sdk_internal 178293:15 invokeOnDrawFrame dart_sdk.js:37972 dart:sdk_internal 206481:57 <fn> dart_sdk.js:37972 dart:sdk_internal 12238:16 _checkAndCall dart_sdk.js:37972 dart:sdk_internal 12243:17 dcall dart_sdk.js:37972 dart:sdk_internal 68743:21 ret dart_sdk.js:37972 ════════════════════════════════════════════════════════════════════════════════════════════════════ 15dart_sdk.js:37972 Another exception was thrown: TypeError: null: type 'Null' is not a subtype of type 'bool'

Environment

- FlutterFlow version: v4.1.72+ (released July 12, 2024)
- Platform: Web
- Browser name and version: Chrome 126.0.6478.127
- Operating system and version affected: Windows 11

Additional Information

I cannot develop everything I need, since I cannot implement it anywhere that needs this type of functionality.

msusviela commented 1 month ago

Hi @sergi95. I wasn't able to reproduce this from a blank project. I checked yours project and there's no action set for the checkbox, that might be what's causing the issue.

sergi95 commented 1 month ago

Hi @msusviela. I have created a page as simple as possible as follows:

  1. You add a list view with a checkbox inside.
  2. In the list view you configure a query backend for a document that contains a list
  3. You put the list as dynamic children from variable

With these steps, the checkbox is broken without doing the basic function of selecting and deselecting, and for it to do the basic function it is not necessary to create an action.

And the same thing happens if instead of a backend query, you use a list with a data type that you cannot initialize directly and you need to create an action to initialize the list when loading the page.

Bug report code: IT4Cz8jfz49Om+FF7oSJcPpVtDgXHEQjRYIZ0uxTSkkaHZPMD+wuY/SkcktuOe20YwlIM06knnwy/s3emvLXJvY7AASrGoh9yaVQSDqVUkyVMb7XELqVOW5/AtxPN0jE1p+nmxFQAPhuZXAj3HGANu+RSjHXJ7WzNmsdOfKZIZOK2SrDX1iXc2URm05KZDPz

msusviela commented 1 month ago

I've check again and it seems to be a configuration issue. Can you please reach out to support@flutterflow.io? They can better assist you with ensuring your project is configured correctly