smiley_ui
Implementation of BastiUi design in Flutter. (Inspired by Aloïs Deniel implementation)
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
SmileyWidget
Base widget which draws an animated smiley.
Code Sample
SmileyWidget(
expression: SmileyExpression.happy,
);
Screenshot
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.
SmileysSelection
Widget which displays a list of smileys and allows selection.
Code Sample
SmileysSelection();
Screenshot
Supported Parameters
expressions
: List of smiley expressions to display.onSmileySelected
: Callback triggered when the user selects or unselect a smiley.
SmileyBottomSheet
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
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.
SmileysDialog
Dialog which contains the SmileysSelection
widget.
Code Sample
SmileysDialog();
// Or use
showSmileysDialog(context);
Screenshot
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.