Website • Discord • Releases • Donate • Documentation
ZenitUI is a UI library for Flutter meant to be used besides the Material library
Add the package to your dependencies:
dependencies:
zenit_ui:
git: https://github.com/dahliaOS/zenit_ui
A button gives the user a way to trigger an immediate action. There are two types of Buttons. Primary and Secondary.
Here is an example of how to create a basic Primary Button:
PrimaryButton(
onPressed: () => print("PrimaryButton was clicked"),
backgroundColor: ZenitColors.blue,
foregroundColor: const Color(0xffffffff),
child: const Text(
"Primary Button",
),
),
For a SecondaryButton just change the keyword to SecondaryButton.
A Switch is a component which allows you to toggle things on and off.
Here is an example of how to create a basic Switch:
bool _checked = false;
Switch(
value: _checked,
onChanged: (value) => setState(() => _checked = value),
),
Copyright @ 2019-2022 - The dahliaOS Authors - [email protected]
This project is licensed under the Apache 2.0 license