NetworkSpeed class
NetworkSpeed class that provides methods to check network speed
Constructors
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 Methods
-
getCurrentNetworkSpeed(
) → Future< Map< String, dynamic> > - Get current network speed details Returns a Map containing network type, download speed, and upload speed
-
getCurrentNetworkType(
) → Future< NetworkType> - Get the current network type (mobile, wifi, or unknown)
-
getDownloadSpeed(
) → Future< double> - Get download speed in Mbps
-
getNetworkSpeedStream(
{int interval = 1000}) → Stream< Map< String, dynamic> > - Stream that emits network speed updates continuously Interval parameter defines how often to check (in milliseconds)
-
getUploadSpeed(
) → Future< double> - Get upload speed in Mbps
-
runDownloadSpeedTest(
{String? testFileUrl}) → Future< double> - Run a speed test by downloading a test file Returns download speed in Mbps
-
runUploadSpeedTest(
{String? testFileUrl}) → Future< double> - Run a speed test by uploading a test file Returns upload speed in Mbps