Repository: flutter
Issue: [Hot reload] Negative padding values creates new elements in UI.
Labels: framework,t: hot reload,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-framework,triaged-framework



## Steps to Reproduce
1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->
2. Change the padding to any negative value. Example : `EdgeInsets.all(-10)`
3. Hot reload the app (Error screen)
4. Change the padding to any positive value. Example : `EdgeInsets.all(6)`
5. Hot reload the app
6. Observe

**Expected results:**
When provided with positive padding value again, screen should render with appropriate UI.

**Actual results:**
A new clone widget is renderer or added in the column

![Actual results](https://i.ibb.co/HtsCHLN/Screenshot-2023-03-15-at-12-49-00-PM.png)

<details>
<summary>Code sample</summary>

- Change value on line 30 to reproduce the bug
`padding: EdgeInsets.all(5)` -> `padding: EdgeInsets.all(-7)` -> `padding: EdgeInsets.all(10)`

```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 const MaterialApp(
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: SingleChildScrollView(
        child: Column(
          children: [
            Container(
              child: const Padding(
                padding: EdgeInsets.all(5),
                child: Text('A single widget'),
              ),
            )
          ],
        ),
      ),
    );
  }
}
```

</details>

<details>
  <summary>Logs</summary>


```
The following assertion was thrown building Container:
'package:flutter/src/rendering/shifted_box.dart': Failed assertion: line 111 pos 15: 'padding.isNonNegative': is not true.
shifted_box.dart:111

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was
Container
main.dart:28
When the exception was thrown, this was the stack
#2      new RenderPadding
shifted_box.dart:111
#3      Padding.createRenderObject
basic.dart:1935
#4      RenderObjectElement.mount
framework.dart:5817
#5      SingleChildRenderObjectElement.mount
framework.dart:6376
...     Normal element mounting (7 frames)
#12     Element.inflateWidget
framework.dart:3953
#13     MultiChildRenderObjectElement.inflateWidget
framework.dart:6512
#14     MultiChildRenderObjectElement.mount
framework.dart:6524
...     Normal element mounting (86 frames)
#100    Element.inflateWidget
framework.dart:3953
#101    MultiChildRenderObjectElement.inflateWidget
framework.dart:6512
#102    MultiChildRenderObjectElement.mount
framework.dart:6524
...     Normal element mounting (134 frames)
#236    Element.inflateWidget
framework.dart:3953
#237    MultiChildRenderObjectElement.inflateWidget
framework.dart:6512
#238    MultiChildRenderObjectElement.mount
framework.dart:6524
...     Normal element mounting (172 frames)
#410    Element.inflateWidget
framework.dart:3953
#411    MultiChildRenderObjectElement.inflateWidget
framework.dart:6512
#412    MultiChildRenderObjectElement.mount
framework.dart:6524
...     Normal element mounting (492 frames)
#904    Element.inflateWidget
framework.dart:3953
#905    Element.updateChild
framework.dart:3682
#906    RenderObjectToWidgetElement._rebuild
binding.dart:1176
#907    RenderObjectToWidgetElement.mount
binding.dart:1145
#908    RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure>
binding.dart:1092
#909    BuildOwner.buildScope
framework.dart:2682
#910    RenderObjectToWidgetAdapter.attachToRenderTree
binding.dart:1091
#911    WidgetsBinding.attachRootWidget
binding.dart:926
#912    WidgetsBinding.scheduleAttachRootWidget.<anonymous closure>
binding.dart:906
#916    _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:192:26)
(elided 5 frames from class _AssertionError, class _Timer, and dart:async-patch)
```


## Flutter doctor
```
[✓] Flutter (Channel stable, 3.7.6, on macOS 13.2.1 22D68 darwin-arm64, locale en-US)
    • Flutter version 3.7.6 on channel stable at /Users/manthan/Documents/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 12cb4eb7a0 (2 weeks ago), 2023-03-01 10:29:26 -0800
    • Engine revision ada363ee93
    • Dart version 2.19.3
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/manthan/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • 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 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.76.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (4 available)
    • vivo 1929 (mobile)         • I779OVI79T6HPVAM                     • android-arm64  • Android 10 (API 29)
    • iPhone 14 Pro Max (mobile) • 19007623-BB2D-44F4-909B-42A0BC257056 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
    • macOS (desktop)            • macos                                • darwin-arm64   • macOS 13.2.1 22D68 darwin-arm64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 111.0.5563.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available
```

</details>