This is a simple two columns layout for desktop application. The window can be resized to any size even very small like 100x100 thus the content won't fit by design and should be clipped. And normally it's working until I use Row to build the layout
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Row(
children: [
// left panel
Container(
width: 400,
child: Placeholder(),
),
// content panel
Expanded(child: Placeholder())
],
),
)
);
}
}
Now I'm getting an error like "A RenderFlex overflowed by 3.3 pixels on the right." if I resize the window to a very small size.
So far I've tried to use SingleChildScrollView but found it's working only for Column. Also I've played with ClipRect but don't know how to use it for this case.
Edit: Solution with Warp widget won't help here as moving the widgets doesn't help if they just don't fit - I can resize the window so the width is less than the width of the first row cell. What's more I cannot use Expanded widget for the right cell. Actually this is very common layout with left panel for menu and right for the content