https://github.com/helightdev/stitched_stack
A flutter library providing a way to stich a size-bound stack onto a widget
https://github.com/helightdev/stitched_stack
Last synced: 4 months ago
JSON representation
A flutter library providing a way to stich a size-bound stack onto a widget
- Host: GitHub
- URL: https://github.com/helightdev/stitched_stack
- Owner: helightdev
- License: apache-2.0
- Created: 2022-09-05T01:46:51.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-05T11:04:10.000Z (almost 3 years ago)
- Last Synced: 2025-01-22T15:09:48.657Z (6 months ago)
- Language: Dart
- Size: 11.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
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.```dart
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))
],
);
}
}
```