Skip to content

Crash with signal 11 (SIGSEGV), code 128 (SI_KERNEL), fault addr 0x0000000000000000 error #24

@newedgar

Description

@newedgar

When scrolling down multiple time while et the end of the dropdown items, that make the app crash.

#my code to reproduce :

final gradeList = [
      '5a', '5b', '5c',
      '6a', '6a+', '6b',
      '6b+', '6c', '6c+',
      '7a', '7a+', '7b',
      '7b+', '7c', '7c+',
      '8a', '8a+', '8b',
      '8b+', '8c', '8c+',
      '9a', '9a+', '9b',
      '9b+', '9c', '9c+',
    ];
final controller = DropdownController<String>();
List<CoolDropdownItem<String>> dropdownItems = [];
CoolDropdownItem<String> defaultItemSelected = CoolDropdownItem<String>(
        label: "??",
        value: "??",
      );

for (var i = 0; i < gradeList .length; i++) {
    dropdownItems.add(CoolDropdownItem<String>(
        label: gradeList [i],
        value: gradeList [i],
        isSelected: true,
      )
    );
}

CoolDropdown<String>(
    controller: controller,
    dropdownList: dropdownItems,
    defaultItem: defaultItemSelected,
    onChange: (value) async {
      if (controller.isError) {
        await controller.resetError();
      }
      controller.close();
    },
    onOpen: (value) {},
    resultOptions: ResultOptions(
      padding: EdgeInsets.symmetric(horizontal: 10),
      width: width,
      icon: const SizedBox(
        width: 10,
        height: 10,
        child: CustomPaint(
          painter: DropdownArrowPainter(),
        ),
      ),
      render: ResultRender.all,
      isMarquee: true,
    ),
    dropdownOptions: DropdownOptions(
        top: 20,
        height: 400,
        gap: DropdownGap.all(5),
        borderSide: BorderSide(width: 1.5, color: AppColors().mainColor()),
        padding: EdgeInsets.symmetric(horizontal: 10),
        align: DropdownAlign.left,
        animationType: DropdownAnimationType.size),
        

    dropdownItemOptions: DropdownItemOptions(
      isMarquee: true,
      mainAxisAlignment: MainAxisAlignment.center,
      render: DropdownItemRender.all,
      height: 50,
      textStyle: TextStyle(fontSize: 18, color: AppColors().fontColor()),
      selectedTextStyle: TextStyle(fontSize: 21, color: AppColors().fontColor(),fontWeight: FontWeight.w600),
      selectedBoxDecoration: BoxDecoration(
          borderRadius: BorderRadius.circular(10),
        color: AppColors().secondFadedColor1(),
      ),
    ),
  );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions