0 purchases
collaction common
collaction_common #
This package provides a set of reusable widgets that can be used across all platforms. These widgets are designed to simplify and speed up the development process for creating collaction applications in Flutter.
Installation #
To use this package, add collaction_common as a dependency in your pubspec.yaml file.
Usage #
Import the package in your Dart code using:
import 'package:collaction_common/widgets/<widget>.dart';
copied to clipboard
Then, you can use any of the widgets provided in the package, such as:
CountryIcon(
countryCode: 'UG',
radius: 10,
),
copied to clipboard
Widgets #
The following widgets are included in this package:
CountryIcon #
Display the flag of a country in an avatar shape.
CountryFlagAvatar(
countryCode: 'US',
radius: 32.0,
)
copied to clipboard
Parameters #
Parameter
Description
key
Widget access key.
countryCode*
Valid two-letter country code as defined in ISO 3166-1.
radius
Circular avatar radius.
AccentChip #
Display a text label in a chip with an optional avatar leading and delete button.
AccentChip(
text: 'Hello World',
leading: Icon(Icons.ac_unit),
onDeleted: () => print('Chip deleted'),
labelColor: Colors.white,
color: Colors.blue,
noMaterialTapTargetSize: true,
)
copied to clipboard
Parameters #
Parameter
Description
key
Widget access key.
text*
Label text.
onDeleted
Deletion callback.
labelColor
Label text color.
color
Background color.
noMaterialTapTargetSize
Sets the the [MaterialTapTargetSize] used for the chip will be set to [MaterialTapTargetSize.shrinkWrap] when true, otherwise [MaterialTapTargetSize.padded] will be used.
PillButton #
[ElevatedButton] wrapper to display a pill-shaped button with text and an optional leading widget.
// Elevated button
PillButton(
text: 'Click me',
leading: Icon(Icons.ac_unit),
onTap: () => print('Button tapped'),
isEnabled: true,
isLoading: false,
)
// Elevated Icon button
PillButton.icon(
text: 'Click me',
leading: Icon(Icons.ac_unit),
onTap: () => print('Button tapped'),
isEnabled: true,
isLoading: false,
)
copied to clipboard
Parameters #
Parameter
Description
key
Widget access key.
text*
Button label.
leading
Widget to prepend to the button label. Most preferably an icon.Only required when using the PillButton.icon factory.
onTap
Button click callback.
isEnabled
Whether the button is allowing user interaction or not.
isLoading
Whether the button is loading.
Contributing #
All contributions are welcome, whether it is filing a bug report, filing a feature request, opening a pull request, or any other contribution.
We have a couple of documents which will guide you towards a good first contribution, our contributing documentation walks you through all of our conventions that we require you to uphold when contributing.
Contributing to CollAction
Additionally, if you want to do development, we have written a document that will help you setup your local environment.
Getting Started
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.