AdsConnectivity class

Connectivity checker with periodic recheck.

YOUR OLD PROBLEM: One-way latch permanently blocked ads if user opened app offline. Even 30 seconds in an elevator = zero ads for entire session.

NEW DESIGN:

  • First check: real DNS lookup
  • If offline: rechecks every recheckInterval (default 2 min)
  • If online: caches for recheckInterval then rechecks
  • No permanent latch — recovers from temporary offline

Constructors

AdsConnectivity()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

isOnline → bool
no setter

Static Methods

check() → Future<bool>
Returns true if online. Caches result for _recheckInterval.
configure({Duration? recheckInterval}) → void
forceCheck() → Future<bool>
Force immediate recheck (call after network change event)
reset() → void