Releases: MAlazhariy/internet_state_manager
v1.9.0
[1.8.0]
Enhanced
-
Introduced a new
initialize()
method inInternetStateManagerInitializer
that performs a local network connectivity check before the app starts.
This ensures that the internet state is correctly initialized and available from the first frame of the app. -
Improved
NoInternetBottomWidget
UI by adding bottom padding as a Safe area, ensuring it displays correctly above system UI. -
Added a ready-to-use
NoInternetScreen
widget that automatically checks internet connectivity at intervals defined bycheckConnectionPeriodic
inInternetStateOptions
(default:Duration(seconds: 12)
). This periodic check runs only ifautoCheckConnection
is set totrue
(default).
Updated Initialization Example:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// ✅ Required: Initializes internet connection check before app runs
await InternetStateManagerInitializer.initialize();
runApp(
InternetStateManagerInitializer(
child: MyApp(),
),
);
}
New Usage
-
Using
InternetStateManager
withoutbuilder
will automatically display NoInternetBottomWidget at the bottom of the screen when the internet is disconnected. -
For full-screen custom handling, use
InternetStateManager.builder
to render your own widget, or provideNoInternetScreen
toInternetStateManager
like this:InternetStateManager( noInternetScreen: NoInternetScreen(), // Shows this screen when offline, or pass your custom screen. child: // Your screen here, );
v1.7.1
[1.7.1] Fix | Replaced internet_connection_checker
with internet_connection_checker_plus
package
v1.7.0
[1.7.0] Added checkConnectionTimeout
option to set the timeout duration when checking real internet connection.
v1.6.1
[1.6.1]
Added
- Change
checkConnection
return type toFuture<bool>
to return if connection is available or not.
v1.6.0
[1.6.0]
Added
- Change
checkConnection
return type toFuture<bool>
to return if connection is available or not.
v1.5.0
[1.5.0]
Enhanced
- Recheck the connection if
autoCheckConnection
is TRUE or if connection lost.
v1.4.2
[fix] update internet_connection_checker version to any
v1.4.1
[1.4.1]
Added
internetCheck()
context extension to allow checking internet form context extension.
v1.4.0
[1.4.0]
Added
internetCheck
context extension to allow to check internet form context extension.
v1.3.1
[1.3.1]
Added
internetStateStream
accessed fromcontext
to listen for internet connection changes only (without listening to loading states), i.e.:context.internetStateStream.listen((status){})
.
Fixed
- ios 12+ known issues with
ConnectivityPlus
that get none even if the local network is available,
the bloc is now checking the real internet connection oniOS
even if the local network is none.