File tree 4 files changed +12
-5
lines changed
packages/network_info_plus
4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 8
8
* Add gateway ip address information.
9
9
* Add broadcast information.
10
10
* Add subnet mask information.
11
+
12
+ ## 1.1.1
13
+
14
+ * Fix app crash when wifi info is not available.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ This package is not an _endorsed_ implementation of `network_info_plus`. Therefo
9
9
``` yaml
10
10
dependencies :
11
11
network_info_plus : ^2.0.2
12
- network_info_plus_tizen : ^1.1.0
12
+ network_info_plus_tizen : ^1.1.1
13
13
` ` `
14
14
15
15
Then you can import ` network_info_plus` in your Dart code:
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: network_info_plus_tizen
2
2
description : Tizen implementation of the network_info_plus plugin
3
3
homepage : https://github.com/flutter-tizen/plugins
4
4
repository : https://github.com/flutter-tizen/plugins/tree/master/packages/network_info_plus
5
- version : 1.1.0
5
+ version : 1.1.1
6
6
7
7
flutter :
8
8
plugin :
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ class NetworkInfoPlusTizenPlugin : public flutter::Plugin {
92
92
result->Error (" -1" , " Initialization failed" );
93
93
return ;
94
94
}
95
- std::string reply = " " ;
95
+ std::string reply;
96
96
if (method_call.method_name ().compare (" wifiName" ) == 0 ) {
97
97
reply = GetWifiInfo (WifiInfoType::ESSID);
98
98
} else if (method_call.method_name ().compare (" wifiBSSID" ) == 0 ) {
@@ -108,14 +108,17 @@ class NetworkInfoPlusTizenPlugin : public flutter::Plugin {
108
108
} else if (method_call.method_name ().compare (" wifiBroadcast" ) == 0 ) {
109
109
std::string ipv4 = GetWifiInfo (WifiInfoType::IPV4);
110
110
std::string subnet_mask = GetWifiInfo (WifiInfoType::SUBNET_MASK);
111
- reply = IntegerToDottedDecimal (DottedDecimalToInteger (ipv4) |
112
- ~DottedDecimalToInteger (subnet_mask));
111
+ if (!ipv4.empty () && !subnet_mask.empty ()) {
112
+ reply = IntegerToDottedDecimal (DottedDecimalToInteger (ipv4) |
113
+ ~DottedDecimalToInteger (subnet_mask));
114
+ }
113
115
} else {
114
116
result->NotImplemented ();
115
117
return ;
116
118
}
117
119
if (reply.length () == 0 ) {
118
120
result->Error (" -1" , " Not valid result" );
121
+ LOG_ERROR (" Could not retrieve %s." , method_call.method_name ().c_str ());
119
122
return ;
120
123
}
121
124
flutter::EncodableValue msg (reply);
You can’t perform that action at this time.
0 commit comments