deactivationDelay property

Duration deactivationDelay
getter/setter pair

Duration to wait before deactivating this Bloc

If a new dependent comes in within this time, then the bloc will not be deactivated. This is really helpful during widget rebuilds when a widget disconnects and reconnects immediately. With this delay these rebuilds will not affect the performance of the bloc.

Implementation

static Duration deactivationDelay = const Duration(seconds: 2);