Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded children alignment in ReorderableWrap #169

Open
maciejpos opened this issue Dec 15, 2022 · 0 comments
Open

Expanded children alignment in ReorderableWrap #169

maciejpos opened this issue Dec 15, 2022 · 0 comments

Comments

@maciejpos
Copy link

Hi Follks, Is it possible to expand/spread equally the children to use entire available width as depicted below (to achieve the same result as via GridView.extent)?

image

    var wrap = ReorderableWrap( // based on original demo source code
      spacing: 8.0,
      runSpacing: 4.0,
      padding: const EdgeInsets.all(8),
      children: _tiles,
      onReorder: _onReorder,
      onNoReorder: (int index) {
        //this callback is optional
        debugPrint('${DateTime.now().toString().substring(5, 22)} reorder cancelled. index:$index');
      },
      onReorderStarted: (int index) {
        //this callback is optional
        debugPrint('${DateTime.now().toString().substring(5, 22)} reorder started: index:$index');
      }
    );

    Widget wrapGridView = GridView.extent( // this place children as expected however it's of course not reorderable...
      crossAxisSpacing: 8,
      mainAxisSpacing: 4,
      maxCrossAxisExtent: 160,
      shrinkWrap: true,
      children: _tiles,
    );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant