stitched_stack 1.0.1 copy "stitched_stack: ^1.0.1" to clipboard
stitched_stack: ^1.0.1 copied to clipboard

A flutter library providing a way to stich a size-bound stack onto a widget


Stitched_Stack Logo
stitched_stack

A flutter library providing a way to stich a size-bound stack onto a widget.

Features #

This library exposes the StitchedStack widget, than can be used to stitch a stack onto a widget. The stacks size will be coupled to the size of the stitched widget, which (mostly) behaves exactly like it would without the stack overlaying/underlaying it.

The stitched stack will by default automatically update its size if the child grows or shrinks. This behaviour can be disabled by setting the manual property. The stitched stack will also respond to layout changes and rebuild completely. This behaviour can be disabled by providing fixed constraints.

Example #

This simple example shows how to create a TextField with a stitched widget in the bottom-right corner. The Container will stay stitched at the corner, even if the TextField grows.

import 'package:flutter/material.dart';
import 'package:stitched_stack/stitched_stack.dart';

class MyWidget extends StatelessWidget {

  TextEditingController fieldController = TextEditingController();
  
  @override
  Widget build(BuildContext context) {
    return StitchedStack(
      stitch: TextField(controller: fieldController, maxLines: 99, minLines: 1),
      children: [
        Positioned(bottom: 0, right: 0, child: Container(color: Colors.red, width: 50, height: 50))
      ],
    );
  }
}

Screenshot

7
likes
140
pub points
0%
popularity

Publisher

verified publisherhelight.dev

A flutter library providing a way to stich a size-bound stack onto a widget

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on stitched_stack