Skip to content

Commit

Permalink
remove unecessary usage of runtimeType in dart:ui (flutter#8844)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwilliams authored May 4, 2019
1 parent 72bafad commit 1d062db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/ui/geometry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ abstract class OffsetBase {
int get hashCode => hashValues(_dx, _dy);

@override
String toString() => '$runtimeType(${_dx?.toStringAsFixed(1)}, ${_dy?.toStringAsFixed(1)})';
String toString() => 'OffsetBase(${_dx?.toStringAsFixed(1)}, ${_dy?.toStringAsFixed(1)})';
}

/// An immutable 2D floating-point offset.
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/pointer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class PointerData {
final double scrollDeltaY;

@override
String toString() => '$runtimeType(x: $physicalX, y: $physicalY)';
String toString() => 'PointerData(x: $physicalX, y: $physicalY)';

/// Returns a complete textual description of the information in this object.
String toStringFull() {
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ class ParagraphStyle {

@override
String toString() {
return '$runtimeType('
return 'ParagraphStyle('
'textAlign: ${ _encoded[0] & 0x002 == 0x002 ? TextAlign.values[_encoded[1]] : "unspecified"}, '
'textDirection: ${ _encoded[0] & 0x004 == 0x004 ? TextDirection.values[_encoded[2]] : "unspecified"}, '
'fontWeight: ${ _encoded[0] & 0x008 == 0x008 ? FontWeight.values[_encoded[3]] : "unspecified"}, '
Expand Down Expand Up @@ -1174,7 +1174,7 @@ class TextPosition {

@override
String toString() {
return '$runtimeType(offset: $offset, affinity: $affinity)';
return 'TextPosition(offset: $offset, affinity: $affinity)';
}
}

Expand Down Expand Up @@ -1223,7 +1223,7 @@ class ParagraphConstraints {
int get hashCode => width.hashCode;

@override
String toString() => '$runtimeType(width: $width)';
String toString() => 'ParagraphConstraints(width: $width)';
}

/// Defines various ways to vertically bound the boxes returned by
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class WindowPadding {

@override
String toString() {
return '$runtimeType(left: $left, top: $top, right: $right, bottom: $bottom)';
return 'WindowPadding(left: $left, top: $top, right: $right, bottom: $bottom)';
}
}

Expand Down

0 comments on commit 1d062db

Please sign in to comment.