Skip to content

Commit

Permalink
running dart format
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanpodila committed Nov 18, 2022
1 parent 042700e commit 0059b5d
Show file tree
Hide file tree
Showing 14 changed files with 79 additions and 62 deletions.
2 changes: 1 addition & 1 deletion mobx/lib/mobx.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ export 'package:mobx/src/core.dart'
DerivationState;
export 'package:mobx/src/core/atom_extensions.dart';

export 'version.dart';
export 'version.dart';
2 changes: 1 addition & 1 deletion mobx/lib/src/api/async/async_action.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class AsyncAction {
R _runUnary<R, A>(
Zone self, ZoneDelegate parent, Zone zone, R Function(A a) f, A a) {
final actionInfo =
_actions.startAction(name: '${_actions.name}(Zone.runUnary)');
_actions.startAction(name: '${_actions.name}(Zone.runUnary)');
try {
final result = parent.runUnary(zone, f, a);
return result;
Expand Down
3 changes: 2 additions & 1 deletion mobx/lib/src/api/async/observable_stream.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ class ObservableStream<T> implements Stream<T>, ObservableValue<T?> {

ObservableStream<R> _wrap<R>(Stream<R> stream,
{EqualityComparer<dynamic>? equals}) =>
ObservableStream._(_context, stream, null, _cancelOnError, name, _equals ?? equals);
ObservableStream._(
_context, stream, null, _cancelOnError, name, _equals ?? equals);

ObservableFuture<R> _wrapFuture<R>(Future<R> future) =>
ObservableFuture._(_context, future, FutureStatus.pending, null, name);
Expand Down
2 changes: 1 addition & 1 deletion mobx/lib/src/api/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ part 'extensions/observable_future_extension.dart';
part 'extensions/observable_list_extension.dart';
part 'extensions/observable_set_extension.dart';
part 'extensions/observable_map_extension.dart';
part 'extensions/primitive_types_extensions.dart';
part 'extensions/primitive_types_extensions.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ extension StringExtension on String {
Observable<String> obs({ReactiveContext? context, String? name}) {
return Observable(this, context: context, name: name);
}
}
}
1 change: 0 additions & 1 deletion mobx/test/extensions/primitive_types_extensions_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@ void main() {
flag.toggle();
expect(flag.value, equals(true));
});

});
}
6 changes: 2 additions & 4 deletions mobx/test/observable_set_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ void main() {
expect(set.name, equals('test'));
});

test('creates a set that iterates at insertion order',
() {
test('creates a set that iterates at insertion order', () {
final oset = ObservableSet<int>();
[3, 2, 1].forEach(oset.add);
expect(oset.toList(), equals([3, 2, 1]));
});

test('of creates a set that iterates at insertion order',
() {
test('of creates a set that iterates at insertion order', () {
final oset = ObservableSet<int>();
[3, 2, 1].forEach(oset.add);
expect(oset.toList(), equals([3, 2, 1]));
Expand Down
8 changes: 4 additions & 4 deletions mobx/test/reaction_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -325,16 +325,16 @@ void main() {
test('when disposed, clearObservables', () {
final x = Observable(0);

final reaction = ReactionImpl(mainContext, () {}, name: 'test_reaction_1')
..track(() => x.value + 1);
final reaction =
ReactionImpl(mainContext, () {}, name: 'test_reaction_1')
..track(() => x.value + 1);
expect(reaction.hasObservables, isTrue);

reaction.dispose();
final prevDerivation = reaction.startTracking();
final prevDerivation = reaction.startTracking();
reaction.endTracking(prevDerivation);

expect(reaction.hasObservables, isFalse);

});
});
});
Expand Down
40 changes: 20 additions & 20 deletions mobx_codegen/test/data/valid_import_prefixed_output.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
@override
io.File get biographyNotes => (_$biographyNotesComputed ??= Computed<io.File>(
() => super.biographyNotes,
name: 'UserBase.biographyNotes'))
name: 'UserBase.biographyNotes'))
.value;
Computed<io.File?>? _$biographyNotesNullableComputed;

@override
io.File? get biographyNotesNullable => (_$biographyNotesNullableComputed ??=
Computed<io.File?>(() => super.biographyNotesNullable,
name: 'UserBase.biographyNotesNullable'))
Computed<io.File?>(() => super.biographyNotesNullable,
name: 'UserBase.biographyNotesNullable'))
.value;

late final _$namesAtom = Atom(name: 'UserBase.names', context: context);
Expand Down Expand Up @@ -45,7 +45,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$filesNullableAtom =
Atom(name: 'UserBase.filesNullable', context: context);
Atom(name: 'UserBase.filesNullable', context: context);

@override
List<io.File?> get filesNullable {
Expand All @@ -61,7 +61,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$processesAtom =
Atom(name: 'UserBase.processes', context: context);
Atom(name: 'UserBase.processes', context: context);

@override
List<T> get processes {
Expand All @@ -77,7 +77,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$biographyAtom =
Atom(name: 'UserBase.biography', context: context);
Atom(name: 'UserBase.biography', context: context);

@override
io.File get biography {
Expand All @@ -93,7 +93,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$biographyNullableAtom =
Atom(name: 'UserBase.biographyNullable', context: context);
Atom(name: 'UserBase.biographyNullable', context: context);

@override
io.File? get biographyNullable {
Expand All @@ -109,7 +109,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$friendWithImplicitTypeArgumentAtom =
Atom(name: 'UserBase.friendWithImplicitTypeArgument', context: context);
Atom(name: 'UserBase.friendWithImplicitTypeArgument', context: context);

@override
User<io.Process> get friendWithImplicitTypeArgument {
Expand Down Expand Up @@ -144,7 +144,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$friendWithExplicitTypeArgumentAtom =
Atom(name: 'UserBase.friendWithExplicitTypeArgument', context: context);
Atom(name: 'UserBase.friendWithExplicitTypeArgument', context: context);

@override
User<T> get friendWithExplicitTypeArgument {
Expand Down Expand Up @@ -194,7 +194,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$callbackNullableAtom =
Atom(name: 'UserBase.callbackNullable', context: context);
Atom(name: 'UserBase.callbackNullable', context: context);

@override
void Function(io.File?, {T? another}) get callbackNullable {
Expand All @@ -210,7 +210,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$callback2Atom =
Atom(name: 'UserBase.callback2', context: context);
Atom(name: 'UserBase.callback2', context: context);

@override
io.File Function(String, [int, io.File]) get callback2 {
Expand All @@ -226,7 +226,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$callback2NullableAtom =
Atom(name: 'UserBase.callback2Nullable', context: context);
Atom(name: 'UserBase.callback2Nullable', context: context);

@override
io.File? Function(String?, [int?, io.File?]) get callback2Nullable {
Expand All @@ -242,7 +242,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$localTypedefCallbackAtom =
Atom(name: 'UserBase.localTypedefCallback', context: context);
Atom(name: 'UserBase.localTypedefCallback', context: context);

@override
ValueCallback<io.Process> get localTypedefCallback {
Expand All @@ -253,13 +253,13 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
@override
set localTypedefCallback(ValueCallback<io.Process> value) {
_$localTypedefCallbackAtom.reportWrite(value, super.localTypedefCallback,
() {
super.localTypedefCallback = value;
});
() {
super.localTypedefCallback = value;
});
}

late final _$localTypedefCallbackNullableAtom =
Atom(name: 'UserBase.localTypedefCallbackNullable', context: context);
Atom(name: 'UserBase.localTypedefCallbackNullable', context: context);

@override
ValueCallback<io.Process?> get localTypedefCallbackNullable {
Expand All @@ -276,7 +276,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$prefixedTypedefCallbackAtom =
Atom(name: 'UserBase.prefixedTypedefCallback', context: context);
Atom(name: 'UserBase.prefixedTypedefCallback', context: context);

@override
io.BadCertificateCallback get prefixedTypedefCallback {
Expand All @@ -293,7 +293,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$prefixedTypedefCallbackNullableAtom =
Atom(name: 'UserBase.prefixedTypedefCallbackNullable', context: context);
Atom(name: 'UserBase.prefixedTypedefCallbackNullable', context: context);

@override
io.BadCertificateCallback? get prefixedTypedefCallbackNullable {
Expand Down Expand Up @@ -337,7 +337,7 @@ mixin _$User<T extends io.Process> on UserBase<T>, Store {
}

late final _$UserBaseActionController =
ActionController(name: 'UserBase', context: context);
ActionController(name: 'UserBase', context: context);

@override
void updateBiography(io.File newBiography) {
Expand Down
2 changes: 1 addition & 1 deletion mobx_codegen/test/data/valid_late_variables_output.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mixin _$TestStore on _TestStore, Store {
late final _$usernameAtom =
Atom(name: '_TestStore.username', context: context);
Atom(name: '_TestStore.username', context: context);

@override
String get username {
Expand Down
Loading

0 comments on commit 0059b5d

Please sign in to comment.