Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 813 Bytes

CHANGELOG.md

File metadata and controls

31 lines (23 loc) · 813 Bytes

2.0.0 - Sep 01, 2024

  • Require Dart 3.0.0 or higher >=3.0.0 <4.0.0.

  • Make Either a sealed class, EitherEffect a sealed class, and ControlError a final class. Now you can use exhaustive switch expressions on Either instances.

    final Either<String, int> either = Either.right(10);
    
    // Use the `when` method to handle
    either.when(
      ifLeft: (l) => print('Left: $l'),
      ifRight: (r) => print('Right: $r'),
    ); // Prints Right: Either.Right(10)
    
    // Or use Dart 3.0 switch expression syntax 🤘
    print(
      switch (either) {
        Left() => 'Left: $either',
        Right() => 'Right: $either',
      },
    ); // Prints Right: Either.Right(10)

1.0.0 - Aug 23, 2022

  • This is our first stable release.

0.0.1 - Apr 27, 2021

  • Initial version, created by Stagehand