Skip to content

Commit a480979

Browse files
committed
Fixed formatting
1 parent 5cb0c41 commit a480979

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.0.1
2+
3+
* Fixed formatting
14
## 1.0.0
25

36
* Initial release.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# take_it
22

3-
![My Company Logo](./logo.png)
3+
![Logo](./logo.png)
44

55
`take_it` is a **Scoped Service Locator** with **Constructor Injections** for Dart and Flutter. It helps you manage
66
dependencies in your application in a clean, efficient, and testable manner.

lib/src/di_scope_builder.dart

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class DiScopeBuilderState<T extends BaseDiModule>
5959
module?.dispose();
6060
module = newModule;
6161
module?._pushScope(
62-
() {
62+
() {
6363
if (mounted) {
6464
setState(() {
6565
isInitialized = true;
@@ -85,14 +85,14 @@ class DiScopeBuilderState<T extends BaseDiModule>
8585
final module = this.module;
8686
return isInitialized && module != null
8787
? _ParentModuleProvider(
88-
key: uniqueKey,
89-
module: module,
90-
91-
/// [Builder] for providing the correct context.
92-
child: Builder(builder: (context) {
93-
return widget.builder.call(context, module);
94-
}),
95-
)
88+
key: uniqueKey,
89+
module: module,
90+
91+
/// [Builder] for providing the correct context.
92+
child: Builder(builder: (context) {
93+
return widget.builder.call(context, module);
94+
}),
95+
)
9696
: widget.initializationPlaceholder ?? const SizedBox.shrink();
9797
}
9898
}
@@ -101,8 +101,7 @@ class DiScopeBuilderState<T extends BaseDiModule>
101101
///
102102
/// This function receives the [BuildContext] and the current [Scope] (module)
103103
/// and returns a widget that uses the module.
104-
typedef ChildBuilder<T> = Widget Function(
105-
BuildContext context, Scope scope);
104+
typedef ChildBuilder<T> = Widget Function(BuildContext context, Scope scope);
106105

107106
/// Signature for the function used to create a [BaseDiModule] instance.
108107
typedef CreateModule<T> = T Function();
@@ -127,7 +126,7 @@ class _ParentModuleProvider extends InheritedNotifier<BaseDiModule> {
127126
/// the module that it is providing. Returns `null` if no module is found.
128127
static BaseDiModule? of(BuildContext context) {
129128
final result =
130-
context.dependOnInheritedWidgetOfExactType<_ParentModuleProvider>();
129+
context.dependOnInheritedWidgetOfExactType<_ParentModuleProvider>();
131130
return result?.notifier;
132131
}
133132
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: take_it
22
description: Scoped Service Locator with Constructor Injections for Dart and Flutter.
3-
version: 1.0.0
3+
version: 1.0.1
44

55
repository: https://github.com/tekmates/take_it
66
homepage: https://github.com/tekmates/take_it

0 commit comments

Comments
 (0)