Fix wasted memory caused by debug fields - 16 bytes per object (when adding that should-be-removed field crosses double-word alignment) (#113927)

This commit is contained in:
fzyzcjy 2022-10-26 07:31:14 +08:00 committed by GitHub
parent b816801abd
commit e39fa7a836
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -842,7 +842,13 @@ class AnimationController extends Animation<double>
String toStringDetails() {
final String paused = isAnimating ? '' : '; paused';
final String ticker = _ticker == null ? '; DISPOSED' : (_ticker!.muted ? '; silenced' : '');
final String label = debugLabel == null ? '' : '; for $debugLabel';
String label = '';
assert(() {
if (debugLabel != null) {
label = '; for $debugLabel';
}
return true;
}());
final String more = '${super.toStringDetails()} ${value.toStringAsFixed(3)}';
return '$more$paused$ticker$label';
}