adjustable_positioned 1.0.0 copy "adjustable_positioned: ^1.0.0" to clipboard
adjustable_positioned: ^1.0.0 copied to clipboard

A Positioned Widget that can handle repositioning itself based on user input.

A Positioned Widget that can handle repositioning itself based on user input.

Features #

Reposition your widget.

Change the size of your widget.

Customize drag handles.

Sample

Getting started #

1. Depend on it #

Add this to your package's pubspec.yaml file:

dependencies:
    adjustable_positioned: '^1.0.0'

2. Install it

You can install packages from the command line:

$ pub get
..

Alternatively, your editor might support pub. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:adjustable_positioned/adjustable_positioned.dart';

Usage #

...
var handleSize = 24.0;
Stack(
    children: [
        Positioned(...),
        AdjustablePositionedWidget<Object>(
            startX: 48,
            startY: 64,
            startW: 128,
            startH: 128,
            minW: 64,
            minH: 64,
            activeAdjustmentCallback: (rect) { /** Do something */ },
            finishedAdjustmentCallback: (rect) { /** Do something else */ },
            handleWidgetBuilder: (context, handleId) => const Icon(Icons.circle),
            handleSize: handleSize,
            dragData: null,
            child: Padding(
                padding: EdgeInsets.all(handleSize),
                child: Container(color: Colors.red,),
            ),
        ),
    ....
    ]);
...

Additional information #

https://github.com/jdrotos/adjustable_positioned

1
likes
130
pub points
36%
popularity

Publisher

verified publisherdrotos.dev

A Positioned Widget that can handle repositioning itself based on user input.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on adjustable_positioned