Skip to content

Commit b3b0fa5

Browse files
committed
Refactor state_controller.dart: Ignore error and stack trace in setState method
1 parent 7612e18 commit b3b0fa5

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎lib/src/state_controller.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ abstract base class StateController<S extends Object> extends Controller
4343
void setState(S state) {
4444
runZonedGuarded<void>(
4545
() => Controller.observer?.onStateChanged(this, _$state, state),
46-
(error, stackTrace) {/* ignore */},
46+
(error, stackTrace) {/* ignore */}, // coverage:ignore-line
4747
);
4848
_$state = state;
4949
if (isDisposed) return;

‎test/unit/handler_context_test.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ void main() => group('HandlerContext', () {
2929
expect(lastContext, isNotNull);
3030
await expectLater(lastContext!.done, completes);
3131
// Event should be done by now.
32+
expect(lastContext!.isDone, isTrue);
3233
expect(
3334
lastContext,
3435
allOf(

0 commit comments

Comments
 (0)