corextra 1.0.4 copy "corextra: ^1.0.4" to clipboard
corextra: ^1.0.4 copied to clipboard

Handy Dart extensions and utility functions for easier coding.

corextra #

A lightweight Dart package offering handy extensions and utility functions
for common types like String, int, double, List, and more.
Make your Dart and Flutter code cleaner, safer, and easier to read.

pub package


Features #

  • Extensions on core types for safer parsing and formatting
  • Null-safe and concise checks like .isNullOrEmpty on String? and List?
  • Convenient conversion helpers: .toTryInt(), .toTryDouble(), .toTryBool()
  • String utilities like .capitalize()
  • Numeric helpers to sanitize negative values
  • Helper functions like isStringEmpty() and isListEmpty() for legacy or functional use
  • DateTime extensions for easy parsing from string to DateTime and formatting from DateTime to string with customizable formats
  • ResponsiveBreakpoints: simple and customizable screen size helpers (xs, sm, md, lg, xl) for responsive layouts in Flutter
  • Custom Exception System for structured error handling across your app:
    • CorextraException (base class)
    • CorextraCustomException for generic app-level errors
    • CorextraNetworkException for network-related errors (e.g., Dio, HTTP requests)
  • DioErrorHandler for convenient network error handling:
    • Maps Dio errors to user-friendly messages
    • Throws typed exceptions (CorextraNetworkException)
    • Ready for future network-related utility functions

Getting Started #

Add this package to your Dart or Flutter project by adding this line to your pubspec.yaml:

dependencies:
  corextra: ^1.0.4

Then import it in your Dart code:

import 'package:corextra/corextra.dart';
6
likes
0
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

Handy Dart extensions and utility functions for easier coding.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter, intl

More

Packages that depend on corextra