use null aware operators (#32711) * use null aware operators * rollback changes about null-aware operator * disable lint prefer_is_not_empty
diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart index 4290f6b..6ba3677 100644 --- a/packages/flutter_tools/lib/src/vmservice.dart +++ b/packages/flutter_tools/lib/src/vmservice.dart
@@ -718,13 +718,11 @@ /// The number of bytes allocated (e.g. by malloc) in the native heap. int _heapAllocatedMemoryUsage; - int get heapAllocatedMemoryUsage { - return _heapAllocatedMemoryUsage == null ? 0 : _heapAllocatedMemoryUsage; - } + int get heapAllocatedMemoryUsage => _heapAllocatedMemoryUsage ?? 0; /// The peak resident set size for the process. int _maxRSS; - int get maxRSS => _maxRSS == null ? 0 : _maxRSS; + int get maxRSS => _maxRSS ?? 0; // The embedder's name, Flutter or dart_runner. String _embedder;