I am developing a web app. The screen is divided into two expanded widgets nested in Row() widget with LayoutBuilder nested in each.
What I need:
1 When the user changes the height of web app, the UI should not overflow from bottom instead it must scroll.
Problems I faced While Achieving that:
I used SingleChildScrollView for scrolling over Row but it reduced the height according to the children's height.
I wrapped Row with Container and gave it a fixed screen height but it made the UI overflow and not scrollable.
Used CustomScrollView with SliverFillRemaining, and also tried with SliverToBoxAdapter. It enabled scrolling but did not render UI and threw exceptions when LayoutBuidlder was used Inside.
I also used ConstrainedBox with constraints property and IntrinsicHeight, it solved the problem but LayoutBuilder was not working inside IntrinsicHeight widget.
Code of the first case is
return SafeArea(
child: Scaffold(
body: SingleChildScrollView(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Container(
decoration: const BoxDecoration(
color: Color.fromARGB(255, 216, 244, 241),
),
child: const Padding(
padding: EdgeInsets.symmetric(vertical: 40),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(top: 5),
child: FlutterLogo(
size: 200,
),
),
],
),
),
),
),
Expanded(
child: Container(
decoration: const BoxDecoration(
color: blackColor,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: screenWidth * 0.3,
height: 45,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(45),
border: Border.all(color: mainMediumColor),
color: blackColor,
),
child: Center(
child: FittedBox(
fit: BoxFit.scaleDown,
child: Text(
'Log In',
style: GoogleFonts.poppins(
fontSize: 17, color: whiteColor),
),
),
),
),
],
),
)),
],
),
)));
Any Solution to this problem.???


Solved the problem. And here is the code for achieving your expected result.