universal_flutter_utils

pub package License: MIT

A production-ready Flutter UI toolkit and utilities package for building mobile, web, and desktop apps faster. Includes reusable widgets, Dio API helpers, Firebase authentication, file pickers, form validators, themes, socket.io, maps, and more — all in one import.

Version: 0.0.10-beta.1 · View on pub.dev


Why use this package?

Stop rebuilding the same Flutter boilerplate in every project. universal_flutter_utils bundles the UI components and backend helpers most apps need:

  • Flutter widgets — buttons, inputs, loaders, bottom sheets, lists, avatars, shimmer, OTP, video player
  • Form validation — email, phone, password, required field, and custom validators
  • Networking — Dio HTTP client with interceptors, AES encryption, retry, and error handling
  • Real-time — Socket.io configuration with logging interceptors
  • Firebase — auth, crashlytics, push notifications (FCM), and messaging setup
  • Authentication — Google Sign-In, Apple Sign-In, Facebook login, and biometric (fingerprint / Face ID)
  • File picker — image, camera, audio recording, document upload, and file helpers
  • Maps & location — place picker, Google Maps autocomplete, geolocation utilities
  • Theming — light/dark themes, typography, colors, responsive layout builder
  • Cross-platform — Android, iOS, Web, macOS, Windows, Linux

Installation

Add to your pubspec.yaml:

dependencies:
  universal_flutter_utils: ^0.0.10-beta.1

Then run:

flutter pub get

Quick Start

Import the package:

import 'package:universal_flutter_utils/universal_flutter_utils.dart';

Flutter UI widgets

UFUButton(
  text: "Get Started",
  colorType: UFUButtonColorType.primary,
  textSize: UFUTextSize.heading2,
  fontWeight: UFUFontWeight.medium,
  radius: 12,
  onPressed: () => print("Button Pressed!"),
)

UFUInputBox(
  hintText: "Email",
  controller: emailController,
)

UFUOtpInputBox(onCompleted: (otp) => verifyOtp(otp))

ShowUFULoader(msg: "Loading...")
ShowUFUBottomSheet(child: (controller) => YourWidget())

Form validators

UFUtils.textValidator(text, isRequired: true, minCount: 3);
UFUtils.emailValidator(email, isRequired: true);
UFUtils.phoneValidator(phone, isRequired: true);

File picker

List<XFile> images = await UFUtils.picker.selectImageFromGallery();
List<XFile> photos = await UFUtils.picker.captureImageFromCamera();

Theme

final theme = AppTheme.lightTheme;
MaterialApp(theme: theme, ...);

Widgets

Category Components
Buttons UFUButton, UFUIconButton, UFUTextButton, UFUCheckbox
Inputs UFUInputBox, UFUOtpInputBox, debounced search input
Selection UFUMultiSelect, UFUSingleSelect, UFUPopUpMenuButton
Layout UFUScaffold, UFUListView, UFUResponsiveBuilder, UFUDashedBorder
Feedback ShowUFULoader, UFUToast, UFUShimmer, UFUNoDataFound
Dialogs ShowUFUConfirmationDialog, ShowUFUBottomSheet, ShowRecordingDialog
Media UFUNetworkImage, UFUVideoPlayer, UFUAvatar, image cropper
Text UFUText, UFUReadMoreText, selectable text support
Maps Place picker, Google Maps autocomplete, location helpers
Pickers Image picker, file picker, audio recorder bottom sheet

Utilities

Category What it offers
API / Dio api_config/ — AES encryption, request/response/error interceptors, file upload
Socket.io socket_config/ — connection config and logging interceptors
Validators Email, phone, password, required fields, custom rules
File helpers Gallery, camera, audio, multi-file upload, file preparation
Date & time Formatting and parsing utilities
Permissions Camera, storage, location, notification permission handling
Preferences Shared preferences wrapper for tokens, language, settings
Biometric Fingerprint and Face ID authentication
Social login Google, Apple, Facebook sign-in helpers
Firebase Auth, Crashlytics, FCM push notifications
Extensions String helpers, card number formatter, input box extensions
Theme AppTheme, ThemeColors, font weights, text sizes, form UI helper

Package Structure

lib/
 ├── api_config/         → Dio HTTP client, AES encryption, interceptors
 ├── common/             → Constants, enums, Firebase & cookie services
 ├── extensions/         → String and input formatters
 ├── models/             → Address, contact, shared data models
 ├── socket_config/      → Socket.io helpers
 ├── theme/              → Themes, colors, typography
 ├── utils/              → Validators, file picker, permissions, preferences
 ├── widgets/            → UI components (buttons, inputs, lists, maps, etc.)
 └── universal_flutter_utils.dart → Single entry-point export

Example App

The included example/ project demonstrates:

  • API calls with Dio interceptors and encryption
  • File picking and uploading
  • UFUButton, UFUText, UFUInputBox, and other widgets
  • Theme setup and responsive layout
cd example
flutter run

Search & Discoverability

This package is tagged for pub.dev topics: widgets, utilities, ui, networking, authentication.

Common searches this package helps with:

flutter widgets · flutter ui kit · dio interceptor · flutter form validation · flutter file picker · flutter bottom sheet · flutter otp input · flutter multi select · flutter shimmer · firebase auth flutter · socket.io flutter · flutter theme · google maps place picker · flutter biometric auth · social login flutter · flutter utilities


License

MIT License — see LICENSE.


Contributing

Issues, feature requests, and pull requests are welcome on GitHub.

Made with care to save your time and keep Flutter code clean.

Libraries

api_config/api_config
api_config/encryption_util
api_config/interceptors/error_interceptor
api_config/interceptors/request_interceptor
api_config/interceptors/response_interceptor
api_config/interceptors/retry
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/cookies
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/input_box_extension
extensions/no_leading_zero
extensions/string_extensions
models/address
models/contact
models/index
models/local_info
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
A Flutter UI toolkit and utilities package for faster app development.
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/local_information/repo
utils/map_launcher/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/html/index
widgets/icon/index
widgets/icon_button/index
widgets/image_cropper/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/maps/auto_complete/controller
widgets/maps/auto_complete/index
widgets/maps/auto_complete/widget/auto_complete
widgets/maps/auto_complete/widget/empty_result
widgets/maps/auto_complete/widget/searched_result
widgets/maps/place_picker/controller
widgets/maps/place_picker/index
widgets/maps/place_picker/widget/custom_place_picker
widgets/multi_select/index
widgets/multi_select/list
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/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