๐ฑ code_nest_ui
code_nest_ui
is a Flutter package providing a set of reusable and customizable UI components. It helps developers quickly build modern, clean, and responsive user interfaces in their Flutter applications.
โจ Features
- Beautiful pre-styled widgets
- Consistent design system
- Easy-to-integrate components
- Fully responsive and theme-friendly
๐ผ๏ธ CodeNest Validators
๐ง Email Validator
Validates a well-formed email input field.
๐ Password Validator
Checks for minimum length and optionally special characters.
๐ง Username Validator
Ensures username is not empty and meets length requirements.
๐ข Number Validator
Accepts only numeric values as input.
๐ PIN Validator
Validates a 4- or 6-digit numeric PIN input.
๐ URL Validator
Checks if the input is a valid URL.
๐งฑ CodeNest Spacers
code_nest_ui provides handy spacer widgets to improve layout readability and maintain consistent spacing across your app UI.
โ๏ธ CodeNestVerticalSpacer
Adds vertical space between widgets.
โ๏ธ CodeNestHorizontalSpacer
Adds horizontal space between widgets.
๐ SnackBar Utilities โ Success & Failure Toasts
The code_nest_ui package includes quick and easy utilities to show consistent feedback to users using Flutter's SnackBar.
โ Success SnackBar
Use this to notify users of a successful action (e.g., form submitted, data saved).
โ Failure SnackBar
Use this to indicate an error or failed operation (e.g., validation failed, network error).
๐ CodeNestLogger
The code_nest_ui package includes lightweight, categorized logging utilities to help you debug, trace responses, and monitor app behavior consistently.
Use these loggers throughout your app to improve visibility during development or debugging.
โ Error Logger
Logs critical errors such as exceptions, failures, or crashes.
โน๏ธ Info Logger
Logs general-purpose messages for debugging or tracking flow.
๐ Response Logger
Logs formatted API or service responses (JSON, status codes, etc.).
โ ๏ธ Warning Logger
Logs non-critical issues that may need attention (e.g., deprecated API usage, retry needed).
๐ Typography โ CodeNestText
The CodeNestText widget in code_nest_ui makes it easy to apply consistent, customizable, and styled text across your Flutter application.
๐ค Normal Text
Displays styled plain text with support for font size, color, weight, and alignment.
๐งฉ Rich Text
Displays multiple text spans with varied styles in a single line or paragraph.
๐๏ธ Outlined Text
Shows text with a stroke (outline) effect, great for bold headers or banner text.
๐ฌ CodeNestTooltip
The CodeNestTooltip widget enhances accessibility and UX by providing helpful hover or long-press messages on any UI element.
Use it to show contextual information, labels, or descriptions without cluttering your layout.
๐ ๏ธ ToolTip
Displays helpful text when the user hovers (web/desktop) or long-presses (mobile) on a widget.
๐ CodeNestSwitch
The CodeNestSwitch widget provides a reusable and consistent toggle switch UI for enabling or disabling settings, toggles, and preferences across your app.
It wraps Flutter's native Switch widget but adds support for cleaner syntax and design-system consistency.
๐ณ Switch
Use the switch to represent on/off states like dark mode, notifications, etc.
๐งญ CodeNest UI Navigation
The code_nest_ui package provides a collection of pre-styled, reusable navigation widgets that help structure and navigate your app seamlessly across mobile, tablet, and desktop platforms.
๐งฑ CodeNestAppBar
A consistent top app bar across screens.
๐งฑ CodeNestBottomNavBar
A tab-like bottom navigation for switching main sections.
๐งฑ CodeNestDrawer
A collapsible side drawer for secondary or grouped items.
๐งฑ CodeNestNavigationBar (Material 3)
A Material You navigation bar with active indicators.
๐งฑ CodeNestNavigationRail
A side-positioned navigation rail for large screens.
๐งฑ CodeNestTabBar
A top-positioned tab bar for switching between content sections.
๐ผ๏ธ CodeNestImage
The code_nest_ui package provides multiple image handling widgets that make it easy to display images from local assets, network sources, SVGs, and cached content with graceful fallbacks and styling.
๐ฆ Asset Image
Display images stored locally in your app's assets folder.
๐ Network Image
Display a basic image from a URL.
โก Cached Network Image
Display network images with caching and loading placeholder/fallback support.
๐งพ SVG Image
Render SVG images from assets or network.
๐ CodeNestLoaders
The code_nest_ui package includes beautiful and reusable loading widgets to indicate progress, waiting states, or content placeholders across your app.
๐ Circular Progress Loader
A customizable circular loading indicator.
โจ Shimmer Loader
Displays animated placeholders using a shimmer effect.
๐๏ธ CodeNestLottieAnimations
code_nest_ui includes pre-configured animation widgets using Lottie to add beautiful, lightweight, vector-based animations to your Flutter app.
๐จ Lottie Asset Animation
Plays a .json Lottie file from your local assets/ directory.
๐จ Lottie Network Animation
Plays a .json Lottie animation from a network URL.
๐ CodeNestButtons
The code_nest_ui package provides a collection of pre-styled and reusable button components designed for speed, consistency, and customization.
๐น Filled Button
A high-emphasis button for primary actions.
๐น Filled Icon Button
A filled button with an icon and label.
๐น Icon Button (Material)
Simple tappable icon using Material icons.
๐น Icon Button (SVG)
Tappable icon button with an SVG icon.
๐ฆ Outlined Button
A low-emphasis action button with a border.
๐ฆ Icon Outlined Button
An outlined button with an icon and label.
๐ฆ Icon Outlined Button (SVG)
An outlined button with an SVG icon and label.
๐งฉ Segmented Button
A set of mutually exclusive or multi-select button segments.
โ CodeNestDivider
The code_nest_ui package offers a set of customizable dividers to visually separate content and improve layout clarity.
๐ซ Solid Horizontal Divider
A classic horizontal line divider with customizable thickness, color, and margin.
๐ช Dashed Vertical Divider
A vertical dashed line, often used between two sections in a Row.
๐ช Dotted Divider
A dotted horizontal line to subtly separate sections.
๐ฆ CodeNestContainer
CodeNestContainer is a flexible, reusable layout widget that wraps Flutter's Container with enhanced customization options. It helps maintain consistency in spacing, decoration, and theming across your app.
๐ช Container
Best for: wrapping content, sections, cards, buttons, headers.
๐ CodeNestFormField
The code_nest_ui package provides beautifully styled, reusable form fields to speed up form creation and enforce design consistency.
๐ค Text Form Field
A customizable input field for single-line text input.
๐ฝ Dropdown Form Field
A dropdown selector styled like a text field.
๐ Multi-line Text Form Field
A multi-line input field for longer text.
๐ Password Text Form Field
A secure text field with toggle visibility.
๐ Picker Text Form Field
A read-only input that opens a picker (e.g., date, time, custom selection).
๐ Getting Started
To use this package, add the following to your pubspec.yaml
:
dependencies:
code_nest_ui: ^0.0.8
Then run:
flutter pub get
๐ Usage Example
import 'package:flutter/material.dart';
import 'package:code_nest_ui/code_nest_ui.dart';
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: CodeNestAppBar(
title: 'CodeNest UI Demo',
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CodeNestText(
text: 'Welcome to CodeNest UI!',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
CodeNestVerticalSpacer(height: 20),
CodeNestTextFormField(
labelText: 'Enter your email',
validator: CodeNestValidators.email,
),
CodeNestVerticalSpacer(height: 16),
CodeNestFilledButton(
text: 'Get Started',
onPressed: () {
CodeNestSnackBar.showSuccess(
context,
'Welcome to CodeNest UI!',
);
},
),
],
),
),
),
);
}
}
๐จ Customization
All CodeNest UI components are fully customizable and follow Flutter's theming system. You can customize colors, fonts, and styling to match your app's design.
// Example: Custom button styling
CodeNestFilledButton(
text: 'Custom Button',
backgroundColor: Colors.purple,
textColor: Colors.white,
borderRadius: 12.0,
onPressed: () {},
)
๐ Documentation
For detailed documentation and API reference, visit our documentation site.
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
๐ Issues
If you encounter any issues or have suggestions, please open an issue on GitHub.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐จโ๐ป Author
Imran - GitHub
๐ Support
If you like this package, please give it a โญ on GitHub and ๐ on pub.dev!
๐ง Contact
For questions or support, feel free to reach out:
- GitHub: @Imran200216
- Email: your-email@example.com
Happy Coding with CodeNest UI! ๐
Libraries
- animations/code_nest_animations_exports
- animations/code_nest_lottie_asset_animation
- animations/code_nest_lottie_network_animation
- buttons/code_nest_btn_exports
- buttons/code_nest_filled_btn
- buttons/code_nest_floating_action_btn
- buttons/code_nest_icon_btn
- buttons/code_nest_icon_filled_btn
- buttons/code_nest_icon_outlined_btn
- buttons/code_nest_outlined_btn
- buttons/code_nest_segmented_btn
- buttons/code_nest_text_btn
- chips/code_nest_action_chip
- chips/code_nest_chip
- chips/code_nest_chip_exports
- chips/code_nest_choice_chip
- chips/code_nest_filter_chip
- chips/code_nest_input_chip
- code_nest_ui
- container/code_nest_container
- container/code_nest_container_exports
- divider/code_nest_divider
- divider/code_nest_divider_exports
- forms/code_nest_drop_down_text_form_field
- forms/code_nest_forms_exports
- forms/code_nest_multi_line_text_form_field
- forms/code_nest_password_text_form_field
- forms/code_nest_picker_text_form_field
- forms/code_nest_text_form_field
- images/code_nest_asset_image
- images/code_nest_cached_network_image
- images/code_nest_images_exports
- images/code_nest_network_image
- images/code_nest_svg_image
- loaders/code_nest_circular_progress_loader
- loaders/code_nest_loaders_exports
- loaders/code_nest_shimmer_loader
- logger/code_nest_logger
- logger/code_nest_logger_exports
- nav/code_nest_app_bar
- nav/code_nest_drawer
- nav/code_nest_tab_bar
- snack_bar/code_nest_failure_snack_bar
- snack_bar/code_nest_snack_bar_exports
- snack_bar/code_nest_success_snack_bar
- snack_bar/code_nest_warning_snack_bar
- spacer/code_nest_spacer
- spacer/code_nest_spacer_exports
- switch /code_nest_adaptive_switch
- switch /code_nest_adaptive_switch_exports
- texts/code_nest_rich_text
- texts/code_nest_text
- texts/code_nest_text_outlined
- texts/code_nest_texts_exports
- tool_tips/code_nest_tool_tip
- tool_tips/code_nest_tool_tip_exports
- validators/code_nest_validators
- validators/code_nest_validators_exports