mbToCellularDataStatus function
- double? remainingDataMb
Implementation
CellularDataStatus? mbToCellularDataStatus(double? remainingDataMb) {
if (remainingDataMb == null) return CellularDataStatus.unknown;
if (remainingDataMb <= 0) {
return CellularDataStatus.reacheddatalimit;
} else if (remainingDataMb <= 500) {
return CellularDataStatus.neardatalimit;
} else {
return CellularDataStatus.active;
}
}