zeba_academy_label 1.0.0 copy "zeba_academy_label: ^1.0.0" to clipboard
zeba_academy_label: ^1.0.0 copied to clipboard

A lightweight Flutter package for building styled, filled, outlined, and preset labels.

Zeba Academy Label #

pub package pub points likes license

A lightweight and customizable Flutter package for building beautiful labels with filled, outlined, soft, semantic preset, size, icon, and custom styling support.

Build status labels, category labels, tags, badges, status indicators, filters, and compact UI elements with a simple and expressive API.


Features #

  • Filled labels
  • Outlined labels
  • Soft labels
  • Success preset
  • Error preset
  • Warning preset
  • Info preset
  • Neutral preset
  • Primary preset
  • Small, medium, and large sizes
  • Custom colors
  • Custom text colors
  • Custom padding
  • Custom border radius
  • Custom border width
  • Custom text styles
  • Leading widgets
  • Trailing widgets
  • Optional icons
  • Material 3 compatible
  • Lightweight and dependency-free
  • Fully customizable
  • Null-safe
  • Simple API
  • No external dependencies

Installation #

Add zeba_academy_label to your pubspec.yaml:

dependencies:
  zeba_academy_label: ^1.0.0

Then run:

flutter pub get

Import #

import 'package:zeba_academy_label/zeba_academy_label.dart';

Basic Usage #

const ZebaLabel(
  text: 'Active',
)

Label Styles #

Filled Label #

const ZebaLabel.filled(
  text: 'Premium',
)

A filled label uses a solid background color.


Outlined Label #

const ZebaLabel.outlined(
  text: 'Featured',
)

An outlined label uses a transparent background with a visible border.


Soft Label #

const ZebaLabel.soft(
  text: 'Draft',
)

A soft label uses a subtle tinted background and border.


Semantic Presets #

Success #

const ZebaLabel.success(
  text: 'Completed',
)

Error #

const ZebaLabel.error(
  text: 'Failed',
)

Warning #

const ZebaLabel.warning(
  text: 'Pending',
)

Information #

const ZebaLabel.info(
  text: 'Information',
)

Label Sizes #

ZebaLabel supports three built-in sizes:

ZebaLabelSize.small
ZebaLabelSize.medium
ZebaLabelSize.large

Small #

const ZebaLabel(
  text: 'Small',
  size: ZebaLabelSize.small,
)

Medium #

const ZebaLabel(
  text: 'Medium',
  size: ZebaLabelSize.medium,
)

Large #

const ZebaLabel(
  text: 'Large',
  size: ZebaLabelSize.large,
)

Custom Colors #

const ZebaLabel(
  text: 'Custom',
  color: Colors.purple,
)

Custom Text Color #

const ZebaLabel(
  text: 'Custom',
  color: Colors.black,
  textColor: Colors.white,
)

Custom Border Radius #

const ZebaLabel(
  text: 'Rounded',
  borderRadius: BorderRadius.all(
    Radius.circular(20),
  ),
)

Custom Padding #

const ZebaLabel(
  text: 'Spacious',
  padding: EdgeInsets.symmetric(
    horizontal: 20,
    vertical: 12,
  ),
)

Custom Border Width #

const ZebaLabel.outlined(
  text: 'Outlined',
  borderWidth: 2,
)

Custom Text Style #

const ZebaLabel(
  text: 'Styled',
  textStyle: TextStyle(
    fontSize: 16,
    fontWeight: FontWeight.bold,
  ),
)

Labels with Icons #

const ZebaLabel(
  text: 'Verified',
  icon: Icon(Icons.check_circle),
)

Leading Widget #

const ZebaLabel(
  text: 'New',
  leading: Icon(Icons.fiber_new),
)

Trailing Widget #

const ZebaLabel(
  text: 'Next',
  trailing: Icon(Icons.arrow_forward),
)

Complete Example #

import 'package:flutter/material.dart';
import 'package:zeba_academy_label/zeba_academy_label.dart';

class LabelExample extends StatelessWidget {
  const LabelExample({super.key});

  @override
  Widget build(BuildContext context) {
    return Wrap(
      spacing: 12,
      runSpacing: 12,
      children: [
        const ZebaLabel.filled(
          text: 'Filled',
        ),

        const ZebaLabel.outlined(
          text: 'Outlined',
        ),

        const ZebaLabel.soft(
          text: 'Soft',
        ),

        const ZebaLabel.success(
          text: 'Success',
        ),

        const ZebaLabel.error(
          text: 'Error',
        ),

        const ZebaLabel.warning(
          text: 'Warning',
        ),

        const ZebaLabel.info(
          text: 'Info',
        ),

        const ZebaLabel(
          text: 'Verified',
          icon: Icon(Icons.check_circle),
        ),
      ],
    );
  }
}

API Reference #

ZebaLabel #

Property Type Description
text String Text displayed inside the label
style ZebaLabelStyle Filled, outlined, or soft style
size ZebaLabelSize Small, medium, or large
color Color? Custom label color
preset ZebaLabelPreset? Semantic color preset
textColor Color? Custom text color
padding EdgeInsetsGeometry? Custom internal padding
borderRadius BorderRadius? Custom border radius
borderWidth double Border thickness
textStyle TextStyle? Custom text style
icon Widget? Optional icon before text
iconSpacing double Spacing around icon
leading Widget? Widget before the label text
trailing Widget? Widget after the label text

Available Styles #

enum ZebaLabelStyle {
  filled,
  outlined,
  soft,
}

Available Sizes #

enum ZebaLabelSize {
  small,
  medium,
  large,
}

Available Presets #

enum ZebaLabelPreset {
  success,
  error,
  warning,
  info,
  neutral,
  primary,
}

Design Philosophy #

zeba_academy_label is designed to be:

  • Simple
  • Lightweight
  • Flexible
  • Easy to learn
  • Easy to customize
  • Production-ready
  • Compatible with modern Flutter applications

The package focuses on providing a clean label API without unnecessary complexity or external dependencies.


Testing #

Run the test suite:

flutter test

Analyze the package:

flutter analyze

Validate the package before publishing:

flutter pub publish --dry-run

Contributing #

Contributions are welcome!

  1. Fork the repository.
  2. Create a feature branch.
git checkout -b feature/your-feature
  1. Make your changes.
  2. Add or update tests.
  3. Run:
flutter analyze
flutter test
  1. Commit your changes.
git commit -m "Add your feature"
  1. Push your branch.
git push origin feature/your-feature
  1. Open a Pull Request.

Issues and Feature Requests #

If you find a bug or have a feature request, please open an issue in the project repository.

When reporting a bug, please include:

  • Flutter version
  • Dart version
  • Package version
  • Operating system
  • Minimal reproduction example
  • Expected behavior
  • Actual behavior

About Me #

✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.

You can learn more about me and my work at sufyanism.com or connect with me on LinkedIn.


Your All-in-One Learning Hub! #

🚀 Explore courses and resources in coding, technology, and development at Zeba Academy.

Empower yourself with practical skills through curated tutorials, real-world projects, and hands-on experience. Level up your tech game today! 💻✨

Zeba Academy is a learning platform dedicated to coding, technology, and development.

➡ Visit our main site: zeba.academy

➡ Explore hands-on courses and resources at: code.zeba.academy

➡ Check out our YouTube for more tutorials: zeba.academy

➡ Follow us on Instagram: zeba.academy


License #

Copyright © 2026 Sufyan bin Uzayr.

This project is licensed under the GNU General Public License v3.0.

You may use, study, modify, and distribute this software under the terms of the GPL-3.0 license.

See the LICENSE file for the complete license text.


Thank you for visiting!

Made with ❤️ for the Flutter and open-source community by Zeba Academy.

0
likes
150
points
4
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A lightweight Flutter package for building styled, filled, outlined, and preset labels.

Homepage
Repository (GitHub)
View/report issues

Topics

#flutter #label #badge #ui #widget

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on zeba_academy_label