From e1a40a2474ec26d36f3093fdb7df7c723588f0f7 Mon Sep 17 00:00:00 2001 From: Maurits van Beusekom Date: Mon, 4 Mar 2024 15:38:20 +0100 Subject: [PATCH] Added 'Ioc' type alias --- packages/flutter_ioc/CHANGELOG.md | 4 ++++ packages/flutter_ioc/lib/src/ioc_container.dart | 4 ++++ packages/flutter_ioc/pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/flutter_ioc/CHANGELOG.md b/packages/flutter_ioc/CHANGELOG.md index 130819f..0828995 100644 --- a/packages/flutter_ioc/CHANGELOG.md +++ b/packages/flutter_ioc/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.0 + +* Adds the `Ioc` alias to allow developers to access the `IocContainer` class in a shorter way. + ## 2.0.0 * **BREAKING CHANGE:** Removes the hard dependency on `get_it`, which means: diff --git a/packages/flutter_ioc/lib/src/ioc_container.dart b/packages/flutter_ioc/lib/src/ioc_container.dart index df84788..56302f7 100644 --- a/packages/flutter_ioc/lib/src/ioc_container.dart +++ b/packages/flutter_ioc/lib/src/ioc_container.dart @@ -10,6 +10,10 @@ enum ScopeChange { removed, } +/// A shorter alias for the [IocContainer] type. This allows developers to +/// use the shorter `Ioc.container` syntax instead of writing the full name. +typedef Ioc = IocContainer; + /// A standard interface providing inversion of control services to Dart or /// Flutter applications. abstract class IocContainer { diff --git a/packages/flutter_ioc/pubspec.yaml b/packages/flutter_ioc/pubspec.yaml index 8152760..de903c0 100644 --- a/packages/flutter_ioc/pubspec.yaml +++ b/packages/flutter_ioc/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_ioc description: A standard interface providing inversion of control services to Dart or Flutter applications. -version: 2.0.0 +version: 2.1.0 publish_to: none