A simple but very flexible and accommodating chat shape in flutter. This can be of help as it can save the time needed to draw different chat-like shapes. Different shapes have been accounted for programmatically in this simple package.
The basic parameters of this widget which can be used powerfully to customize the shape are:
- Shape Handle
- Handle Cap
- Shape Radius
- Shape Height
- Shape Width
- Handle Height
- Handle Width
Here are some of the shapes that can be realized among many others by combination and variation of the various parameters:
To use this package, you can include the following to your pubspec.yaml
file
dependencies:
flutter:
sdk: flutter
chat_shape:
git:
url: git@github.com:kenresoft/chat_shape.git
ref: master
Widget getShape() {
ChatShape(
context: context,
width: MediaQuery.of(context).size.width - 40,
height: 200,
color: Colors.indigo,
applyTopRadius: true,
enableHandle: true,
handleHeight: 80,
handleWidth: 100,
radius: 30,
enableHandleCap: false,
handle: HandleType.curved,
);
}
The code snippet for the screenshots above can be found in the Example directory
The package is not limited to this 5 examples alone.
It's flexible and can be used to generate more custom shapes.