commonkit 0.1.3 copy "commonkit: ^0.1.3" to clipboard
commonkit: ^0.1.3 copied to clipboard

A lightweight utility package for Flutter with widgets, helpers, and extensions

CommonKit #

A lightweight, reusable utility package for Flutter apps, providing a collection of widgets, helpers, and extensions to simplify common development tasks.

Pub Version License

Features #

Widgets #

  • LoadingOverlay: Display a loading spinner with customizable theme.
  • CustomSnackbar: Show styled snackbars with icons and colors.
  • CustomButton: Create reusable buttons with text, icons, and themes.
  • Toast: Present short-lived notifications at the screen bottom.
  • CustomDialog: Offer customizable dialogs with themed buttons.
  • AdvancedImagePicker: Pick and preview images (non-web only; web stub available).

Extensions #

  • StringExtensions: Add capitalize() and truncate() to strings.
  • ContextExtensions: Access screenWidth, screenHeight, and more.

Helpers #

  • Validators: Validate form fields (e.g., email, required).
  • DateFormatter: Format dates and get "time ago" strings.
  • NetworkHelper: Simplify HTTP GET/POST with file upload support.
  • ImageCacheHelper: Preload images for performance.
  • Debouncer: Delay function calls for input debouncing.
  • StorageHelper: Store key-value pairs persistently (non-web only).
  • AnimationHelper: Create fade and slide animations easily.
  • ResponsiveHelper: Build responsive layouts with breakpoints.
  • SessionManager: Manage login/logout with global state.
  • DirectoryManager: Handle local file system operations (create, update, delete, list; non-web only).
  • Logger: Log messages with info, warning, and error levels.
  • ClipboardManager: Copy/paste text to/from the clipboard (web-compatible).
  • DataSerializer: Serialize/deserialize JSON data.
  • PermissionManager: Request and check app permissions (non-web only).

Configuration #

  • CommonKitTheme: Define app-wide colors and styles.
  • GlobalConfig: Manage global settings like base URL and user session with persistence.

Example #

The example directory contains a sample app demonstrating all features. The ExamplePage in example/lib/main.dart provides an interface to test utilities like network requests, file uploads, directory management, clipboard operations, and permissions. Run it with:

cd example
flutter run
2
likes
0
points
95
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight utility package for Flutter with widgets, helpers, and extensions

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, image_picker, intl, path_provider, permission_handler, shared_preferences

More

Packages that depend on commonkit