Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/platform_android/network_service_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ class NetworkServiceImpl implements NetworkService {
.get(Uri.parse(FlutterConfig.get('BASE_URL') +
FlutterConfig.get('ACTUATOR_INFO_PATH')))
.timeout(const Duration(seconds: 3));
// if (response.statusCode == 200) {
// ActuatorInfo actuatorInfo =
// ActuatorInfo.fromJson(jsonDecode(response.body));
// versionInfo = actuatorInfo.build['version']!;
// }
if (response.statusCode == 200) {
ActuatorInfo actuatorInfo =
ActuatorInfo.fromJson(jsonDecode(response.body));
versionInfo = actuatorInfo.build['version']!;
versionInfo = actuatorInfo.build['version'] ?? 'Unknown';
}
} catch (e) {
debugPrint("Fetch actuator info failed $e");
Expand Down Expand Up @@ -83,7 +88,7 @@ class NetworkServiceImpl implements NetworkService {
} on PlatformException {
debugPrint('SaveVersionToGlobalParam Api Call Failed');
} catch (e) {
debugPrint('Save version failed: $e');
debugPrint('Save screen header failed: $e');
}
return response;
}
Expand Down