CheckNetwork class final
The code you provided is written in Dart and defines a class
called CheckNetwork. Here's a
breakdown of what each part of the code does:
- Annotations
Constructors
- CheckNetwork()
-
The code
CheckNetwork({required Connectivity connectivity}) : _connectivity = connectivity;is a constructor for theCheckNetworkclass. It takes a required parameterconnectivityof typeConnectivityand assigns it to the private field_connectivity.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isConnected
→ Future<
bool> -
The
isConnectedmethod is an asynchronous method that checks if the device is connected to the internet. Here's a breakdown of what each part of the method does:no setter - 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