-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work ont: hot reloadReloading code during "flutter run"Reloading code during "flutter run"
Description
Steps to Reproduce
- Create a new sample app with
flutter new tabbar-bug. - Edit the
_MyHomePageState.buildmethod so that it looks like the code below. - Start debugging in VS Code. I'm using a physical Pixel 5, rather than the emulator.
- Edit the indicatorPadding value. Note that it doesn't do anything.
- Edit the indicatorSize value. Note that now the indicatorPadding change takes effect (as well as the indicatorSize change).
Expected results:
Editing the indicatorPadding value and hot-reloading should take effect immediately.
Actual results:
You have to hot-restart the app, or also edit indicatorSize, for indicatorPadding to do anything.
Code sample
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
title: Text(widget.title),
bottom: TabBar(
indicatorColor: Colors.blue[100],
indicatorSize: TabBarIndicatorSize.label,
indicatorPadding: const EdgeInsets.all(12), // <-- Changes here don't work on hot-reload.
tabs: const [
Tab(text: 'Dogs'),
Tab(text: 'Cats'),
Tab(text: 'Fish')
],
),
),
body: Center(
//...
Logs
...nothing interesting in the logs...
[✓] Flutter (Channel stable, 3.0.4, on Microsoft Windows [Version 10.0.22621.436], locale en-GB)
• Flutter version 3.0.4 at C:\Users\roger\Flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 85684f9300 (3 weeks ago), 2022-06-30 13:22:47 -0700
• Engine revision 6ba2af10bb
• Dart version 2.17.5
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc1)
• Android SDK at C:\Users\roger\AppData\Local\Android\sdk
• Platform android-33, build-tools 31.0.0-rc1
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.10)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.11.32126.315
• Windows 10 SDK version 10.0.22000.0
[✓] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\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 11.0.12+7-b1504.28-7817840)
[✓] VS Code (version 1.69.2)
• VS Code at C:\Users\roger\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.44.0
[✓] Connected device (4 available)
• Pixel 5 (mobile) • 15291FDD400488 • android-arm64 • Android 12 (API 32)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.436]
• Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.63
• Edge (web) • edge • web-javascript • Microsoft Edge 103.0.1264.62
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!```
</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.
-->
Metadata
Metadata
Assignees
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work ont: hot reloadReloading code during "flutter run"Reloading code during "flutter run"