Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

ci_connectivity

obs: for now we don’t have ios support

getting started

flutter plugin for checking network connection. it is not just checking if you are connected to wifi or mobile network, this plugin provides a validation with connection to the google server to determine if there is or is not the possibility of making a connection.

usage

the simplest way to use the plugin is with the checkconnection method, which returns a boolean value to identify whether a connection exists.

import 'package:ci_connectivity/ci_connectivity.dart';

if (ciconnectivity().checkconnection) {
    // is connected
} else {
    // is not connected
}

we also offer a listener to listen for change in connection status.

import 'package:ci_connectivity/ci_connectivity.dart';

final ciconnectivity = ciconnectivity();

ciconnectivity.loopverifystatus();
ciconnectivity.onlistenerstatusnetwork.listen((event) {
    print(event);
});

it is still possible to use an interface helper, if you want a simple visual implementation of the resource. can be used as future or stream.

import 'package:ci_connectivity/helpers/ci_connectivity_builder.dart';

ciconnectivitybuilder(
    withstream: true, // indicates whether it will be rendered with a streambuilder
    childonconnected: text('connected'),
    childondisconnected: text('diconnected'),
)

Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.