Repository: flutter
Issue: [Windows] Resizing the Desktop window alters the border width by a pixel
Labels: framework,platform-windows,c: rendering,a: desktop,has reproducible steps,P2,found in release: 2.10,found in release: 2.13,team-windows,triaged-windows

<details>
<summary>code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        fontFamily: "Microsoft Yahei",
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const SizedBox(
              height: 100,
              width: 100,
              child: VerticalDivider(
                color: Colors.blue,
                thickness: 0,
                width: 0,
              ),
            ),
            const Divider(
              thickness: 1,
              color: Colors.blue,
            ),
            ToggleButtons(
              children: const [
                Text(
                  "现在",
                  style: TextStyle(color: Colors.blue),
                ),
                Text(
                  "确定",
                  style: TextStyle(color: Colors.blue),
                )
              ],
              isSelected: const [false, false],
              mouseCursor: SystemMouseCursors.click,
              textStyle: const TextStyle(
                fontFamily: "Microsoft Yahei",
                height: 1,
              ),
              borderWidth: 0,
              constraints: const BoxConstraints.tightForFinite(
                height: 30,
                width: 56,
              ),
              borderColor: Colors.blue,
              onPressed: (index) {},
            ),
            ElevatedButton(
              onPressed: () {
                showDialog(
                  context: context,
                  builder: (context) {
                    return AlertDialog(
                      title: const Text("ToggleButtons"),
                      content: SizedBox(
                        width: 200,
                        height: 200,
                        child: Center(
                          child: ToggleButtons(
                            children: const [
                              Text(
                                "现在",
                                style: TextStyle(color: Colors.blue),
                              ),
                              Text(
                                "确定",
                                style: TextStyle(color: Colors.blue),
                              )
                            ],
                            isSelected: const [false, false],
                            mouseCursor: SystemMouseCursors.click,
                            textStyle: const TextStyle(
                              fontFamily: "Microsoft Yahei",
                              height: 1,
                            ),
                            constraints: const BoxConstraints.tightForFinite(
                              height: 30,
                              width: 56,
                            ),
                            borderColor: Colors.blue,
                            borderWidth: 1,
                            onPressed: (index) {},
                          ),
                        ),
                      ),
                    );
                    // return AlertDialog();
                  },
                );
              },
              child: const Text("dialog"),
            )
          ],
        ),
      ),
    );
  }
}
```
</details> 

```
 Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version 10.0.19044.1586], locale zh-CN)
    • Flutter version 2.10.3 at D:\flutter                                                        
    • Upstream repository https://github.com/flutter/flutter.git                                  
    • Framework revision 7e9793dee1 (13 days ago), 2022-03-02 11:23:12 -0600                      
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2
```
<details>
<summary>output</summary>

![image](https://user-images.githubusercontent.com/23625690/158511260-b7326e1e-f336-49ea-a55a-19f68ffce080.png)

![image](https://user-images.githubusercontent.com/23625690/158511289-be925983-072e-43f9-b085-5692e7bccdac.png)
![image](https://user-images.githubusercontent.com/23625690/158511362-85849165-aee3-43fc-b702-a1351c3f0087.png)
![image](https://user-images.githubusercontent.com/23625690/158511394-1a60984e-7f1d-4773-96b2-2caa537e1fcd.png)

</details>