Skip to content

Commit

Permalink
Refactor state_controller.dart: Ignore error and stack trace in setSt…
Browse files Browse the repository at this point in the history
…ate method
  • Loading branch information
PlugFox committed Oct 16, 2024
1 parent 7612e18 commit b3b0fa5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/state_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ abstract base class StateController<S extends Object> extends Controller
void setState(S state) {
runZonedGuarded<void>(
() => Controller.observer?.onStateChanged(this, _$state, state),
(error, stackTrace) {/* ignore */},
(error, stackTrace) {/* ignore */}, // coverage:ignore-line
);
_$state = state;
if (isDisposed) return;
Expand Down
1 change: 1 addition & 0 deletions test/unit/handler_context_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ void main() => group('HandlerContext', () {
expect(lastContext, isNotNull);
await expectLater(lastContext!.done, completes);
// Event should be done by now.
expect(lastContext!.isDone, isTrue);
expect(
lastContext,
allOf(
Expand Down

0 comments on commit b3b0fa5

Please sign in to comment.