Skip to content

TesteurManiak/bastiui_smileys

Repository files navigation

smiley_ui

GitHub stars GitHub license Coverage Status

Implementation of BastiUi design in Flutter. (Inspired by Aloïs Deniel implementation)

Try the demo

Getting started

For now this package is not available on pub.dev so, you can add the package by adding the following to your pubspec.yaml:

smiley_ui:
  git:
    url: https://github.com/TesteurManiak/bastiui_smileys.git
    ref: main # Optional, use it if you want a specific branch or tag.

Documentation

Base widget which draws an animated smiley.

Code Sample

SmileyWidget(
    expression: SmileyExpression.happy,
);

Screenshot

SmileyWidget

Supported Parameters

  • expression: The expression of the smiley.
  • isSelected: Selection state of the smiley.
  • isEnabled: Define if the widget is enabled or not. (Manage the opacity on the widget)
  • onTap: Callback when the widget is tapped on.

Widget which displays a list of smileys and allows selection.

Code Sample

SmileysSelection();

Screenshot

SmileysSelection

Supported Parameters

  • expressions: List of smiley expressions to display.
  • onSmileySelected: Callback triggered when the user selects or unselect a smiley.

Widget to use as the content of a bottom sheet.

This widget will display the SmileysSelection widget alongside a title and a submit button which will be disabled while the user did not select a smiley.

Code Sample

SmileyBottomSheet();

// Or use
showSmileysBottomSheet(context);

Screenshot

SmileyBottomSheet

Supported Parameters

  • title: Title of the bottom sheet.
  • submitButtonText: Text that will be used for the submit button.
  • submitButtonStyle: ButtonStyle used for the submit button.

Dialog which contains the SmileysSelection widget.

Code Sample

SmileysDialog();

// Or use
showSmileysDialog(context);

Screenshot

SmileysDialog

Supported Parameters

  • title: Title of the dialog.
  • submitButtonText: Text of the submit button.
  • cancelButtonText: Text of the cancel button.
  • submitButtonStyle: Style of the submit button.
  • cancelButtonStyle: Style of the cancel button.

Credits