Repository navigation
Stack not clipping Transform.rotate #75731
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/found 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 onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework teamwaiting for PR to land (fixed)A fix is in flightA fix is in flight
Description
I'm having this extremely frustrating issue:
It should clip, but it doesn't. It only happens in some scenarios, I believe it is an Skia issue.
Possibly related: #38753
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: darkBlue),
debugShowCheckedModeBanner: false,
home: Scaffold(
body: MyWidget(),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: Container(
width: 300,
height: 300,
color: Colors.white,
child: Stack(
children: [
Positioned(
left: 0,
top: 0,
child: Transform.rotate(
angle: 1,
child: Container(
color: Colors.red,
width: 250,
height: 250,
),
),
),
],
),
),
);
}
}Tested in Dartpad (Flutter 1.26.0-17.3.pre) and locally (1.26.0-17.2.pre) in Flutter Web.
Edit: using Clip.hardEdge in a Stack doesn't work, but wrapping a Stack in a ClipRect works 🤨 this is very buggy.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/found 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 onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework teamwaiting for PR to land (fixed)A fix is in flightA fix is in flight

Activity
darshankawar commentedon Feb 10, 2021
Verified this on latest master.
Wrapping
StackwithClipRRect:flutter doctor -v
[-]Stack not clipping Transform.rotate[/-][+][Web]: Stack not clipping Transform.rotate[/+]14 remaining items
Further clarify Stack documentation on overflowing (#130776)
Further clarify Stack documentation on overflowing (flutter#130776)
github-actions commentedon Aug 7, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.