Repository: flutter
Issue: Simply concat colored boxes result in visible seams, possibly when having non-integer-sized widgets
Labels: a: tests,framework,has reproducible steps,P2,found in release: 3.0,found in release: 3.1,team-framework,triaged-framework

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Execute `flutter run` on the code sample, look at it


<!-- 2. If interested, remove `RepaintBoundary`, run again, look at it -->

**Expected results:** <!-- what did you want to see? -->
Should see a whole green screen without any seam

**Actual results:** <!-- what did you see? -->
has visible seam

Remark: This is only a reproducible sample; in my real-world case, the seam is quite ugly and affects the overall display


<!--

The screenshot:

![image](https://user-images.githubusercontent.com/5236035/175304772-f45286dd-d667-46ec-b88d-f388fca222ad.png)


Even if remove the RepaintBoundary in code, still buggy:

-->

![image](https://user-images.githubusercontent.com/5236035/175304879-4c988d95-ef97-4633-a8d1-ab80151bf9d5.png)

<details>
<summary>Code sample</summary>

<!--
      Please create a minimal reproducible sample that shows the problem
      and attach it below between the lines with the backticks.

      To create it you can use `flutter create bug` command and update the `main.dart` file.

      Alternatively, you can use https://dartpad.dev/
      which is capable of creating and running small Flutter apps.

      Without this we will unlikely be able to progress on the issue, and because of that
      we regretfully will have to close it.
-->

```dart
import 'dart:io';
import 'dart:ui' as ui;

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_test/src/_matchers_io.dart'; // ignore: implementation_imports
import 'package:path/path.dart' as p;

void main() {
  final binding = TestWidgetsFlutterBinding.ensureInitialized();
  binding.window
    ..physicalSizeTestValue = const Size(41, 41)
    ..devicePixelRatioTestValue = 1;

  testWidgets('example', (tester) async {
    await tester.pumpWidget(
      MaterialApp(
        debugShowCheckedModeBanner: false,
        home: Container(
          color: Colors.white,
          child: Column(
            children: [
              for (var i = 0; i < 2; ++i)
                Row(
                  children: [
                    for (var j = 0; j < 2; ++j)
                      Container(
                          color: Colors.green,
                          width: 20.5,
                          height: 20.5,
                        ),
                  ],
                ),
            ],
          ),
        ),
      ),
    );

    await tester.debugWidgetTestSaveScreenshot(find.byType(MaterialApp), 'debug_screenshot');
  });
}

// helper function
extension on WidgetTester {
  Future<void> debugWidgetTestSaveScreenshot([Finder? finder, String stem = 'debug_screenshot']) async {
    await runAsync(() async {
      final image = await captureImage(element(finder ?? find.byType(MaterialApp)));
      final bytes = (await image.toByteData(format: ui.ImageByteFormat.png))!.buffer.asUint8List();
      final path = p.join((goldenFileComparator as LocalFileComparator).basedir.path, '$stem.png');
      debugPrint(
          'debugWidgetTestSaveScreenshot save to path=$path image.size=${image.width}x${image.height} byte.length=${bytes.length}');
      File(path).writeAsBytesSync(bytes);
    });
  }
}

```

</details>

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

```
no log
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
no error
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
3.0.2
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->