-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: selectionSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsfound in release: 3.7Found to occur in 3.7Found to occur in 3.7found in release: 3.8Found to occur in 3.8Found to occur in 3.8frameworkflutter/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 onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
SelectionArea shrinks to the child size on the web while it expands to the parent size on other platforms. It lacks consistency. Tiny differences would be acceptable, but this bug causes a much bigger difference as shown below.
I see the issue regardless of the renderer type on the web.
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const App());
}
class App extends StatelessWidget {
const App();
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Scaffold(
body: SizedBox.square(
dimension: 200,
child: SelectionArea(
child: Text('text'),
),
),
),
);
}
}| Windows | Web |
|---|---|
![]() |
![]() |
Another example:
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const App());
}
class App extends StatelessWidget {
const App();
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SizedBox.expand(
child: SelectionArea(
child: Scrollbar(
thumbVisibility: true,
trackVisibility: true,
child: SingleChildScrollView(
primary: true,
padding: const EdgeInsets.all(16.0),
child: Text('text\n' * 100),
),
),
),
),
),
);
}
}| Windows | Web |
|---|---|
![]() |
![]() |
Steps to Reproduce
Just run each sample above on web and other platforms.
flutter doctor -v
[√] Flutter (Channel stable, 3.7.3, on Microsoft Windows [Version 10.0.22000.1574], locale ja-JP)
• Flutter version 3.7.3 on channel stable at D:\xxxxx\flutter\sdk
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 9944297138 (10 days ago), 2023-02-08 15:46:04 -0800
• Engine revision 248290d6d5
• Dart version 2.19.2
• DevTools version 2.20.1
[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at D:\xxxxx\android\sdk
• Platform android-33, build-tools 33.0.1
• ANDROID_HOME = D:\xxxxx\android\sdk
• Java binary at: C:\Program Files\JetBrains\IntelliJ IDEA 2021.3.3\jbr\bin\java
• Java version OpenJDK Runtime Environment JBR-17.0.5+1-653.25-jcef (build 17.0.5+1-b653.25)
• All Android licenses accepted.
[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.1)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.3.32811.315
• Windows 10 SDK version 10.0.19041.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[√] IntelliJ IDEA Ultimate Edition (version 2022.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.3.3
• Flutter plugin version 72.1.4
• Dart plugin version 223.8617.8
[√] VS Code (version 1.75.1)
• VS Code at C:\Users\xxxxx\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.58.0
[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.1574]
• Edge (web) • edge • web-javascript • Microsoft Edge 110.0.1587.49
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 3 categories.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: selectionSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsfound in release: 3.7Found to occur in 3.7Found to occur in 3.7found in release: 3.8Found to occur in 3.8Found to occur in 3.8frameworkflutter/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 onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team



