Repository: flutter
Issue: Border dimensions are incorrect when strokeAlign is set to strokeAlignInside or strokeAlignOutside.
Labels: framework,has reproducible steps,team-framework,found in release: 3.27,found in release: 3.29

### Steps to reproduce

When setting `stokeAlign` of `Border` to `strokeAlignInside` or `strokeAlignOutside` the `dimensions` are incorrect.

`Border.all(width: 10, strokeAlign: BorderSide.strokeAlignInside).dimensions` returns `EdgeInsets.all(10)` while `EdgeInsets.zero` is expected.

`Border.all(width: 10, strokeAlign: BorderSide.strokeAlignOutside).dimensions` returns `EdgeInsets.zero` while `EdgeInsets.all(10)` is expected.

The samples below show how this affects the size of the `Container` widget.

1. When `Border.strokeAlign` is set to `BorderSide.strokeAlignInside` `Container` adds 10px padding to the child and thus size is 220px instead of 200px.
   <img width="363" alt="Image" src="https://github.com/user-attachments/assets/3a92f549-dd17-4d52-91af-67c6d8337129" />

2. When `Border.strokeAlign` is set to `BorderSide.strokeAlignOutside` `Container` doesn't add padding to the child and thus size is 200px instead of 220px.
   <img width="363" alt="Image" src="https://github.com/user-attachments/assets/d0255132-fdd0-49c9-82a4-236034be829b" />

### Expected results

`Border.all(width: 10, strokeAlign: BorderSide.strokeAlignInside).dimensions` should return `EdgeInsets.zero` as the border is drawn inside the border path.

`Border.all(width: 10, strokeAlign: BorderSide.strokeAlignOutside).dimensions` should return `EdgeInsets.all(10)` as the border is drawn outside the border path.

### Actual results

`Border.all(width: 10, strokeAlign: BorderSide.strokeAlignInside).dimensions` returns `EdgeInsets.all(10)`

`Border.all(width: 10, strokeAlign: BorderSide.strokeAlignOutside).dimensions` returns `EdgeInsets.zero` 

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const App());
}

class App extends StatelessWidget {
  const App({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Container(
            decoration: BoxDecoration(
              color: Colors.red,
              border: Border.all(
                width: 10,
                strokeAlign: BorderSide.strokeAlignInside,
                // strokeAlign: BorderSide.strokeAlignCenter,
                // strokeAlign: BorderSide.strokeAlignOutside,
              ),
            ),
            child: SizedBox.square(dimension: 200),
          ),
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details closed>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details closed><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel master, 3.28.0-2.0.pre.38865, on macOS 15.2 24C101 darwin-arm64, locale en-US) [2.7s]
    • Flutter version 3.28.0-2.0.pre.38865 on channel master at /Users/ksokolovskyi/development/flutter_master
    • Upstream repository git@github.com:ksokolovskyi/flutter.git
    • FLUTTER_GIT_URL = git@github.com:ksokolovskyi/flutter.git
    • Framework revision 02e11f95a1 (29 hours ago), 2025-01-24 09:50:38 -0500
    • Engine revision 02e11f95a1
    • Dart version 3.8.0 (build 3.8.0-24.0.dev)
    • DevTools version 2.42.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [1,779ms]
    • Android SDK at /Users/ksokolovskyi/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/ksokolovskyi/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 16.2) [931ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    ! CocoaPods 1.14.3 out of date (1.16.2 is recommended).
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods

[✓] Chrome - develop for the web [10ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2) [9ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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+-79915917-b509.11)

[✓] VS Code (version 1.96.4) [7ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (4 available) [6.2s]
    • iPhone 13 mini (mobile)                 • FE5BEA00-295F-48CB-9632-96E7F4F8C370 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-0 (simulator)
    • macOS (desktop)                         • macos                                • darwin-arm64   • macOS 15.2 24C101 darwin-arm64
    • Chrome (web)                            • chrome                               • web-javascript • Google Chrome 125.0.6422.141

[✓] Network resources [1,208ms]
    • All expected network resources are available.
```

</details>