@@ -19,7 +19,8 @@ abstract class BindContextImpl implements BindContext {
1919 @internal
2020 final Set <String > tags = {};
2121 final _singletonBinds = < Type , SingletonBind > {};
22- List <SingletonBind > get instanciatedSingletons => _singletonBinds.values.toList ();
22+ List <SingletonBind > get instanciatedSingletons =>
23+ _singletonBinds.values.toList ();
2324
2425 @visibleForTesting
2526 List <BindContract > getProcessBinds () => _binds;
@@ -49,7 +50,9 @@ abstract class BindContextImpl implements BindContext {
4950 return bindValue;
5051 }
5152
52- var bind = _binds.firstWhere ((b) => b.factoryFunction is T Function (Injector ), orElse: () => BindEmpty ());
53+ var bind = _binds.firstWhere (
54+ (b) => b.factoryFunction is T Function (Injector ),
55+ orElse: () => BindEmpty ());
5356 if (bind is BindEmpty ) {
5457 return null ;
5558 }
@@ -109,24 +112,31 @@ abstract class BindContextImpl implements BindContext {
109112 }
110113
111114 @mustCallSuper
112- void instantiateSingletonBinds (List <SingletonBind > singletons, Injector injector) {
113- final filteredList = _binds.where ((bind) => ! bind.isLazy && ! _containBind (singletons, bind));
115+ void instantiateSingletonBinds (
116+ List <SingletonBind > singletons, Injector injector) {
117+ final filteredList =
118+ _binds.where ((bind) => ! bind.isLazy && ! _containBind (singletons, bind));
114119 for (final bindElement in filteredList) {
115120 var b = bindElement.factoryFunction (injector);
116- _singletonBinds[b.runtimeType] = SingletonBind (value: b, bind: bindElement);
121+ _singletonBinds[b.runtimeType] =
122+ SingletonBind (value: b, bind: bindElement);
117123 }
118124 }
119125
120126 bool _containBind (List <SingletonBind > singletons, BindContract bind) {
121- return singletons.indexWhere ((element) => element.bind.factoryFunction == bind.factoryFunction) != - 1 ;
127+ return singletons.indexWhere ((element) =>
128+ element.bind.factoryFunction == bind.factoryFunction) !=
129+ - 1 ;
122130 }
123131
124132 Type _getInjectType <B >() {
125133 var foundType = B ;
126134
127135 for (var singleton in _singletonBinds.values) {
128136 if (singleton.value is B ) {
129- foundType = _singletonBinds.entries.firstWhere ((map) => map.value.value == singleton.value).key;
137+ foundType = _singletonBinds.entries
138+ .firstWhere ((map) => map.value.value == singleton.value)
139+ .key;
130140 break ;
131141 }
132142 }
0 commit comments