flutter_extended_wrap 0.0.3 copy "flutter_extended_wrap: ^0.0.3" to clipboard
flutter_extended_wrap: ^0.0.3 copied to clipboard

A Flutter Plugin to extend the default Wrap with more Alignment and Spacing Options.

Flutter Extended Wrap #

Install #

pubspec.yaml #

Update pubspec.yaml and add the following line to your dependencies to import the package from pub.dev:

dependencies:
  flutter_extended_wrap: ^0.0.3

Import #

Import the package with:

import 'package:flutter_extended_wrap/flutter_extended_wrap.dart';

Features #

With the extended Wrap you can automatically make a default Flutter Wrap expand to its parent size and then you can specify how many children a Wrap should put on each run. Additionally you have some options to customize where the free space is put like for example placing the children on both sides with the free space in the center of the Wrap.

Types #

class ExtendedWrap {
  const ExtendedWrap({
    super.key,
    this.direction = Axis.horizontal,
    this.extendedWrapAlignment = ExtendedWrapAlignment.center,
    this.spacing = 0.0,
    this.runSpacing = 0.0,
    this.runAlignment = WrapAlignment.start,
    this.crossAxisAlignment = WrapCrossAlignment.start,
    this.textDirection,
    this.verticalDirection = VerticalDirection.down,
    this.clipBehavior = Clip.none,
    required this.childSizeInDirection,
    this.expandWrap = true,
    this.desiredChildrenPerRun,
    this.minFreeSpacePerRun = 0.0,
    required this.children,
  });
}


enum ExtendedWrapAlignment {
  start,
  end,
  center,
  spaceBetween,
  spaceAround,
  spaceEvenly,
  spaceCenter,
  spaceCenterOrAlignCenter,
  spaceCenterAndAround
}

Usage #

You can find an example on how to use different configurations of the expanded Wrap inside of the /example folder which displays the following:

Example

Changelog #

CHANGELOG.md

2
likes
160
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter Plugin to extend the default Wrap with more Alignment and Spacing Options.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_extended_wrap