Repository: flutter
Issue: Issue with widget boundaries when specifying widget dimensions under non-integer windows display scaling.
Labels: platform-windows,platform-web,a: desktop,team-framework,fyi-web

### Steps to reproduce

ISSUE: When Windows display scaling is set to non-integer values, such as 125% or 150%, setting the dimensions of widgets can result in some sizes being displayed incompletely, with partially transparent borders.

1. Change windows display scale to non 100% 200% values, such as 150%.
2. New flutter project.
3. In the initial page, keep the Scaffold, remove all child widgets, and replace them with a Column containing Containers of different heights (e.g., 30-40 height), each with the same color which contrast with the background.
4. Run this page and there are some line will show between containers, and these lines has color same to container with alpha.

### Expected results

example on 100% windows display scale:
![image](https://github.com/user-attachments/assets/61916eb7-ea4e-4ca9-b7f4-2c593cf20e74)


### Actual results

example on 150% windows display scale:
![image](https://github.com/user-attachments/assets/4ce9379c-a9fb-4dcb-810e-4ce630aa4c58)


### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const DpiScalePage(),
    );
  }
}

class DpiScalePage extends StatelessWidget {
  const DpiScalePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        mainAxisSize: MainAxisSize.max,
        children: [
          testContainer(26),
          testContainer(27),
          testContainer(28),
          testContainer(29),
          testContainer(30),
          testContainer(31),
          testContainer(32),
          testContainer(33),
          testContainer(34),
          testContainer(35),
          testContainer(36),
          testContainer(37),
          testContainer(38),
          testContainer(39),
          testContainer(40),
        ],
      ),
    );
  }
}

Widget testContainer(double height) {
  return Container(
    color: Colors.grey.shade700,
    padding: const EdgeInsets.only(left: 20),
    height: height,
    width: double.infinity,
    alignment: Alignment.centerLeft,
    child: Text(
      "height: $height.",
      style: const TextStyle(fontSize: 14, color: Colors.black),
    ),
  );
}

```
[main.zip](https://github.com/user-attachments/files/17917156/main.zip)

</details>



### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

![image](https://github.com/user-attachments/assets/c36877e4-56ee-46d7-a64e-546cd9e5bbe1)

</details>


### Logs

<details open><summary>Logs</summary>

```console
Wrong displays, don't have logs.
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
PS F:\桌面> flutter doctor -v
[✓] Flutter (Channel stable, 3.24.5, on Microsoft Windows [版本 10.0.19045.5131], locale zh-CN)
    • Flutter version 3.24.5 on channel stable at D:\0-SDK\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dec2ee5c1f (13 days ago), 2024-11-13 11:13:06 -0800
    • Engine revision a18df97ca5
    • Dart version 3.5.4
    • DevTools version 2.37.3

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at D:\0-SDK\android-sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: D:\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.5)
    • Visual Studio at D:\Microsoft VS
    • Visual Studio Community 2022 version 17.11.35327.3
    • Windows 10 SDK version 10.0.22621.0

[✓] Android Studio (version 2024.2)
    • Android Studio at D:\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)

[✓] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is 127.0.0.1,localhost,::1
    • NO_PROXY contains localhost
    • NO_PROXY contains ::1
    • NO_PROXY contains 127.0.0.1

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [版本 10.0.19045.5131]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 131.0.6778.86
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 130.0.2849.80

[✓] Network resources
    • All expected network resources are available.
```

</details>