MobileDataState.fromMap constructor

MobileDataState.fromMap(
  1. Map<String, dynamic> map
)

Creates a MobileDataState from a map, typically received from platform code.

Implementation

factory MobileDataState.fromMap(Map<String, dynamic> map) {
  return MobileDataState(
    isMobileDataEnabled: map['isMobileDataEnabled'] ?? false,
    networkOperator: map['networkOperator'],
    networkType: map['networkType'],
  );
}