universal_flutter_utils 0.0.3
universal_flutter_utils: ^0.0.3 copied to clipboard
A powerful, all-in-one Flutter utilities and widgets package to speed up development and keep your code clean.
π universal_flutter_utils #
A powerful, all-in-one Flutter utility package to boost productivity, maintain consistency, and speed up your app development.
Includes beautifully crafted widgets, utilities, themes, extensions, API helpers, file pickers, and much more.
β Version:
0.0.3
β¨ Features at a Glance #
β
Ready-to-use widgets (buttons, loaders, lists, bottom sheets, inputs, etc.)
β
Advanced UI: multi-select, responsive builder, shimmer, read more text, OTP input
β
Theme & typography management
β
File picker & file helper utilities
β
API & socket config with interceptors and AES encryption
β
String extensions, text helpers, validators, permissions, shared preferences
β
Cross-platform: Android, iOS, Web, macOS, Windows, Linux
β
Example app included!
π¦ Installation #
Add to your pubspec.yaml
:
dependencies:
universal_flutter_utils: ^0.0.3
Then run:
flutter pub get
β‘ Quick Start #
Import the package:
import 'package:universal_flutter_utils/universal_flutter_utils.dart';
Use ready-made widgets:
UFUButton(
text: "Get Started",
colorType: UFUButtonColorType.primary,
textSize: UFUTextSize.heading2,
fontWeight: UFUFontWeight.medium,
radius: 12,
onPressed: () => print("Button Pressed!"),
)
Use utilities:
List<XFile> fileList = await UFUtils.picker.selectImageFromGallery();
List<XFile> fileList = await UFUtils.picker.captureImageFromCamera();
UFUtils.textValidator(textInputController.text.trim(), isRequired: true, minCount: 3);
UFUtils.emailValidator(emailInputController.text.trim(), isRequired: true);
UFUtils.phoneValidator(phoneNoInputController.text.trim(), isRequired: true);
Use theme:
final theme = AppTheme.lightTheme;
π§© Example Usage #
The included example
project shows:
- API calls with interceptors
- Picking and uploading files
- Using
UFUButton
,UFUText
,UFUInputBox
, etc. - Theme setup & responsive builder
Run the example:
cd example
flutter run
π API Docs (High-Level) #
Module | What it offers |
---|---|
api_config/ |
AES encryption, request/response interceptors, API base config |
common/ |
Constants, enums (device type, run mode), helpers, services (cookies, firebase) |
extensions/ |
String extensions and method shortcuts |
models/ |
Shared data models |
socket_config/ |
Socket config and logging interceptors |
theme/ |
Themes, theme colors, font weights, sizes, etc. |
utils/ |
File helpers, validators, date/time utils, permissions, shared preferences |
widgets/ |
Buttons, loaders, input boxes, OTP, shimmer, multi-select, list views, etc. |
π¨ Widgets Highlights #
β
UFUButton
, UFUIconButton
, UFUCheckbox
β
UFUMultiSelect
, UFUSingleSelect
β
UFUReadMoreText
, UFUOtpInputBox
, UFUInputBox
β
UFUAvatar
, UFUDashedBorder
, UFUResponsiveBuilder
β
UFUNoDataFound
, UFUToast
, UFUPopUpMenuButton
β
UFUVideoPlayer
, UFUNetworkImage
, ShowUFULoader
, UFUShimmer
β
ShowUFUBottomSheets
, UFUScaffold
, UFUListView
, and more!
π§° Utilities Highlights #
β
AES encryption / decryption
β
File pickers (image, audio, any file)
β
Date & time formatting
β
Validators, text helpers, direction helpers
β
Shared preferences, cookie service, firebase service
β
Theme & color management
β
Social login helper stubs
π· Assets & Fonts #
assets/images/default_image.png
,alt-image.png
assets/folder.svg
- Fonts: Can be set through
UFUtils.fontFamily = "RethinkSans";
π Package Structure Overview #
lib/
βββ api_config/ β API helpers & encryption
βββ common/ β Constants, enums, services
βββ extensions/ β Dart & String extensions
βββ models/ β Shared models
βββ socket_config/ β Socket helpers
βββ theme/ β Themes, colors, fonts
βββ utils/ β Helpers (files, permissions, validators)
βββ widgets/ β Buttons, lists, loaders, inputs, etc.
βββ universal_flutter_utils.dart β Entry point
π License #
This project is licensed under the MIT License β see the LICENSE file.
π‘ Contributing #
We welcome issues, feature requests, and pull requests!
Feel free to help us make universal_flutter_utils
even better.
π Made with β€οΈ to save your time & keep your Flutter code clean. #
π¦ Need help setting it up, or want detailed docs?
π Feel free to open an issue or start a discussion!