Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/ui/geometry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ class Rect {
int get hashCode => hashValues(left, top, right, bottom);

@override
String toString() => 'Rect.fromLTRB(${left.toStringAsFixed(1)} ${top.toStringAsFixed(1)}, ${right.toStringAsFixed(1)}, ${bottom.toStringAsFixed(1)})';
String toString() => 'Rect.fromLTRB(${left.toStringAsFixed(1)}, ${top.toStringAsFixed(1)}, ${right.toStringAsFixed(1)}, ${bottom.toStringAsFixed(1)})';
}

/// A radius for either circular or elliptical shapes.
Expand Down
5 changes: 5 additions & 0 deletions testing/dart/rect_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import 'dart:ui';
import 'package:test/test.dart';

void main() {
test('toString test', () {
const Rect r = Rect.fromLTRB(1.0, 3.0, 5.0, 7.0);
expect(r.toString(), 'Rect.fromLTRB(1.0, 3.0, 5.0, 7.0)');
});

test('rect accessors', () {
const Rect r = Rect.fromLTRB(1.0, 3.0, 5.0, 7.0);
expect(r.left, equals(1.0));
Expand Down