flutter_lion_components 0.2.0
flutter_lion_components: ^0.2.0 copied to clipboard
A Flutter UI component library inspired by Lion Web Components. Provides accessible, themable, and reusable form components.
Flutter Lion Components ๐ฆ #
A Flutter UI component library inspired by Lion Web Components. Designed to provide high-quality, accessible, and customizable form elements for Flutter applications.
โจ Features #
- Lion-Inspired UI โ Matches the styling and behavior of Lion Web Components.
- Themed & Customizable โ Supports light/dark modes, custom colors, and typography.
- Form Validation โ Built-in validation logic inspired by Lionโs validation system.
- Accessible โ Follows Flutterโs Material accessibility best practices.
๐ Installation #
Add the package to your pubspec.yaml:
dependencies:
flutter_lion_components:
git:
url: https://github.com/BooManLag/flutter_lion_components.git
Then, run:
flutter pub get
๐ ๏ธ Usage #
Lion Input #
LionInput(
label: "Your Name",
value: "",
onChanged: (val) => print("User typed: \$val"),
validator: (value) {
if (value == null || value.isEmpty) return "This field is required";
return null;
},
)
Lion Button #
LionButton(
label: "Submit",
onPressed: () {
print("Button Clicked!");
},
)
Lion Form #
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
LionForm(
formKey: _formKey,
fields: [
LionInput(
label: "Email",
value: "",
onChanged: (val) => print(val),
),
],
onSubmit: () {
if (_formKey.currentState!.validate()) {
print("Form submitted!");
}
},
)
Lion Dialog #
LionDialog.show(
context,
title: "Hello!",
content: "Welcome to Flutter Lion Components",
);
๐งช Running Tests #
To validate the components:
flutter test
๐ License #
MIT License