Skip to content

A simple but very flexible and accommodating chat shape in flutter.

License

Notifications You must be signed in to change notification settings

kenresoft/chat_shape

Repository files navigation

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.

Features

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

Screenshots

Here are some of the shapes that can be realized among many others by combination and variation of the various parameters:

Straight handle with cap

Straight handle with no cap

Curve handle with cap

No handle and no cap

Curve handle with no cap

Getting started

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

Usage

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,
 );
}

Additional information

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.

About

A simple but very flexible and accommodating chat shape in flutter.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published