FLUTTER ECOSYSTEM

oxidized

Definitions of Rust-like types, Option and Result, to promote safer programming.

Latest version
6.2.0
30-day downloads
9.8K
Likes
52
Pub points
155

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

Oxidized provides Rust-inspired Option and Result types for Dart, enabling safer and more expressive error handling. By modeling optional values (Option) and operations that may fail (Result), it helps developers avoid null-related bugs and handle errors explicitly. These types encourage functional programming patterns, improving code clarity and robustness. The package is lightweight and integrates seamlessly into existing Dart projects across all major platforms.

Use cases
  • Handling nullable values safely
  • Replacing null checks with explicit Option usage
  • Managing function results with success/failure states
  • Writing resilient error-handling logic
  • Adopting functional programming patterns in Dart
Key features
  • Rust-like Option type
  • Rust-like Result type
  • Null safety through explicit handling
  • Functional programming utilities
  • Cross-platform compatibility
Suitable for
  • Developers seeking safer alternatives to null
  • Teams adopting functional programming styles
  • Projects requiring robust error management
  • Dart applications targeting multiple platforms
  • Those wanting to reduce runtime crashes from null references
Considerations
  • Learning curve for developers unfamiliar with Option/Result
  • Potential verbosity in simple cases
  • Requires careful integration to avoid over-engineering
  • Not a replacement for Dart's built-in null safety
  • May increase complexity in small or trivial functions
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add oxidized

Categories

Dependencies

Dependency list 1 items

Source repository

Related projects