π 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!
Libraries
- api_config/AESUtil
- api_config/api_config
- api_config/interceptors/error_interceptor
- api_config/interceptors/request_interceptor
- api_config/interceptors/response_interceptor
- common/color
- common/confirmation_dialog_type
- common/constants/file_uploder
- common/constants/pagination_constants
- common/constants/responsive_design
- common/constants/screen
- common/constants/widget_keys
- common/duration
- common/enums/device_type
- common/enums/network_multiselect
- common/enums/run_mode
- common/font_family
- common/font_weight
- common/index
- common/methods/index
- common/orientation
- common/position
- common/services/firebase
- common/services/index
- common/services/notification/service
- common/services/run_mode/index
- common/services/social_login/index
- common/services/social_login/method_channel
- common/services/social_login/platform_interface
- common/text_helper
- common/text_size
- extensions/card_number_input_formatter
- extensions/index
- extensions/no_leading_zero
- extensions/string_extensions
- models/contact
- models/index
- models/network_multiselect/network_multiselect_request_params
- models/popover_action
- socket_config/interceptors/interceptor
- socket_config/interceptors/interceptor_manager
- socket_config/interceptors/logging_interceptor
- socket_config/socket_config
- theme/app_theme
- theme/form_ui_helper
- theme/index
- theme/theme_colors
- theme/theme_model
- universal_flutter_utils
- utils/app_config/index
- utils/biometric_recognition/index
- utils/date_time/index
- utils/direction_helper
- utils/file_picker/audio_file_handeling/controller
- utils/file_picker/audio_file_handeling/index
- utils/file_picker/file_helper
- utils/file_picker/index
- utils/form_validator/index
- utils/index
- utils/permissions/index
- utils/shared_preferences/index
- widgets/animated_spin_kit/delay_tween
- widgets/animated_spin_kit/fading_circle
- widgets/animated_spin_kit/three_bounce
- widgets/animations/index
- widgets/animations/scale_and_rotate
- widgets/animations/scale_in_out
- widgets/avatar/index
- widgets/avatar/size
- widgets/bottom_sheet/controller
- widgets/bottom_sheet/custom_list_bottom_sheet/index
- widgets/bottom_sheet/index
- widgets/button/color_type
- widgets/button/index
- widgets/button/radius
- widgets/button/size
- widgets/button/type
- widgets/check_box/index
- widgets/confirmation_dialog/index
- widgets/dashed_border/index
- widgets/file_picker/index
- widgets/icon/index
- widgets/icon_button/index
- widgets/image_picker/index
- widgets/index
- widgets/input_box/clear_icon
- widgets/input_box/controller
- widgets/input_box/debounce
- widgets/input_box/index
- widgets/input_box/type
- widgets/listview/index
- widgets/load_more_button/index
- widgets/loader/custom_dialog
- widgets/loader/index
- widgets/multi_select/header
- widgets/multi_select/index
- widgets/multi_select/list
- widgets/multi_select/modal
- widgets/multi_select/multi_list
- widgets/multi_select/multi_list_model
- widgets/multi_select/sub_header
- widgets/multi_select/sub_list
- widgets/multi_select/tag_modal
- widgets/multi_select/type
- widgets/multi_select/view
- widgets/network_image/index
- widgets/no_data_found/index
- widgets/otp_input_box/index
- widgets/popup_menu_button/index
- widgets/read_more_text/index
- widgets/read_more_text/read_more_dialog
- widgets/responsive_builder/index
- widgets/scaffold/index
- widgets/shimmer/index
- widgets/single_select/header
- widgets/single_select/index
- widgets/single_select/list
- widgets/single_select/model
- widgets/single_select/type
- widgets/single_select/view
- widgets/svg_image/index
- widgets/text/index
- widgets/text_button/index
- widgets/text_span/index
- widgets/thumb/folder_thumb
- widgets/thumb/icon_thumb
- widgets/thumb/icon_type
- widgets/thumb/image_thumb
- widgets/thumb/index
- widgets/thumb/thumb_size
- widgets/thumb/type
- widgets/toast/index
- widgets/video_player/controller
- widgets/video_player/index