HomeiOS Developmentandroid - DraggableScrollableSheet with a header and listing view

android – DraggableScrollableSheet with a header and listing view


I’m not capable of create

return DraggableScrollableSheet(
        initialChildSize: 0.2,
        minChildSize: 0.2,
        maxChildSize: 1,
        snapSizes: const [.4, 1],
        snap: true,
        builder: (BuildContext context, ScrollController scrollController) {
          return SafeArea(
              youngster: Container(
                  ornament: createSheedBoxDecoration(),
                  youngster: Column(
                    youngsters: [
                      createDragHandle(),
                      createListItemTitleWidget(),
                      Expanded(
                          child:
                              linesListViewWidget(busLines, scrollController)),
                    ],
                  )));
        });

createDragHandle and createListItemTitleWidget are simply widgets but when attempt to increase the DraggableScrollableSheet by clicking on them nothing occurs.

I’ve additionally tried to make use of IgnorePointer on them however for the reason that scrollController is distributed to the listing view solely by deciding on and dragging listing view merchandise I can increase DraggableScrollableSheet.

For extra readability listed here are createDragHandle and createListItemTitleWidget

  Widget createDragHandle() {
    return IgnorePointer(
      youngster: Row(
        mainAxisAlignment: MainAxisAlignment.middle,
        youngsters: [
          Container(
            margin: const EdgeInsets.only(top: 16, bottom: 8),
            height: 8,
            width: 80,
            decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(10), color: Colors.grey),
          ),
        ],
      ),
    );
  }
  Widget createListItemTitleWidget() {
    return Padding(
      padding: const EdgeInsets.solely(left: 16, high: 16, backside: 16),
      youngster: Row(
        youngsters: [
          const Icon(Icons.directions, size: 24),
          const SizedBox(
            width: 8.0,
          ),
          Text(
            "Header",
            style: Theme.of(context).textTheme.bodyLarge,
            overflow: TextOverflow.ellipsis,
          )
        ],
      ),
    );
  }

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments