convenience_types 0.10.0 copy "convenience_types: ^0.10.0" to clipboard
convenience_types: ^0.10.0 copied to clipboard

A package to ensamble convenience types commonly used through flutter projects developed by Capyba.

0.10.0 #

  • Added Either<L, R> type for type-safe disjoint unions.
  • Added Try<T> type for safe synchronous computation wrapping.
  • Added sequence() and traverse() extensions for Iterable<Maybe<T>> and Iterable<Result<T>>.
  • Added filtered iterable extensions: .values, .nothings, .successes, and .failures.
  • Added payload field to AppError base class and all its subclasses.
  • Updated HttpError to automatically map its response to the AppError payload.
  • Added DebugPrint extensions for Result, Maybe, and RequestStatus to improve the debugging experience in Flutter.
  • Added fold method to Result.
  • Added orElse and orElseGet to Result and Maybe.
  • Added mapSucceeded and mapFailed to RequestStatus.

0.9.1 #

  • add 100% test coverage for all types and errors API surface
  • fix prefer_function_declarations_over_variables lint rules in example app
  • refactor tests to support stricter Nothing<Never> type checks natively
  • add mocktail as a dev dependency to test HTTP responses and DioException fallback handling

0.9.0 #

  • add NoParams type
  • add UseCase base type
  • add SizingInformation type
  • add ValueObject Base type

0.8.1 #

  • changed id to identity to avoid conflicts
  • changed behavior of mapNothing/mapAsyncNothing
  • changed behavior of mapFailure/mapAsyncFailure

0.8.0 #

  • add mapNothing and mapAsynNothing to Maybe type
  • add mapFailure and mapAsyncFailure to Result type
  • add Unit type
  • fix getOrElse behavior

New #

  • dart built-in pattern matching
  • sdk updtate

0.7.0 #

New #

  • dart built-in pattern matching
  • sdk updtate

0.6.3 #

New #

  • warning fixes

0.6.2 #

New #

  • connectivity_plus: 6.1.2
  • dio: 5.8.0+1

0.6.1 #

New #

  • connectivity_plus: 6.0.5
  • dio: 5.7.0
  • state_notifier: 1.0.0
  • freezed_annotation: 2.4.4
  • freezed: 2.5.7
  • build_runner: 2.4.13

0.6.0 #

New #

  • connectivity_plus: 5.0.2
  • dio: 5.4.1
  • state_notifier: 1.0.0
  • freezed_annotation: 2.4.1
  • freezed: 2.4.7

0.5.2 #

New #

  • add maybeAsyncCombine
  • add connectionError to parseHttpError

Fix #

  • remove async return to maybeCombine

0.5.1 #

Change #

  • add async return to maybeCombine

0.5.0 #

New #

  • add castInto<k> method to FormField<T> to help casting field types leaving names unchanged

0.4.0 #

New #

  • add mapAsyncSuccess<K> method to Result to chain asynchronous access to data
  • add mapAsyncJust<K> method to Maybe to chain asynchronous access to data
  • add (Maybe<J>, Maybe<K>).maybeCombine extension method to (Maybe<J>, Maybe<K>) records to neatly control access to an ordered pair of two Maybes possible values

0.3.3 #

fixes #

  • add defaultNoInternetConnectionMessage to parseHttpError method

0.3.2 #

fixes #

  • add maybeResponse<T>() generic method to AppError

0.3.1 #

fixes #

  • FormUtils as a mixin class

0.3.0 #

new #

  • add generic type to httpError to accomodate possible error.responses

0.2.2 #

fixes #

  • add 'slug' in the parameters of 'parseHttpError' and utilize it in the errors 'slug' field.

0.2.1 #

changed #

  • update Flutter sdk to 3.7.12
  • update dependencies
  • fix msg field on HttpBadRequestError and UnprocessableEntityError

0.2.0 #

new #

  • Maybe factories
  • maybeData getters
  • const contructors to AppError

0.1.2 #

fixes #

  • getOrElse behavior
  • Getting Started session in the readme

0.1.1 #

new #

  • added example

fixes #

  • typos (convinience -> convenience)

0.1.0 #

new #

  • types: FormField, Maybe, RequestStatus, Result
  • errors: CacheError, DeviceInfoError, FormError, HttpError, StorageError
  • exceptions: ParseException, CacheException
  • formUtils: FormUtils, SeedTestStateMixin
7
likes
150
points
397
downloads

Documentation

API reference

Publisher

verified publishercapyba.com

Weekly Downloads

A package to ensamble convenience types commonly used through flutter projects developed by Capyba.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

connectivity_plus, dio, flutter, freezed_annotation, state_notifier

More

Packages that depend on convenience_types