07-21-2023, 09:59 PM
Use `SingleChildScrollView` with `SixedBox` height to screen size. Here in the below code, Text will appear in top and content that need to display at bottom is separated by `Spacer()` and finally button is placed
@override Widget build(BuildContext context) {
return Scaffold(
body: SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 21,),
child: SizedBox(
height: MediaQuery.of(context).size.height,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text( "Address",
style: TextStyle( color: YourColor,
fontSize: YourSize,
fontWeight: YourFontWeight
),
),
spacer(), //after spacer contentwill diplay at the bottom ofscreen
/// Below button will go to bottom
ElevatedButton(
onPressed: (){},
child: Text('Click'),
),
]
))
);
}
@override Widget build(BuildContext context) {
return Scaffold(
body: SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 21,),
child: SizedBox(
height: MediaQuery.of(context).size.height,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text( "Address",
style: TextStyle( color: YourColor,
fontSize: YourSize,
fontWeight: YourFontWeight
),
),
spacer(), //after spacer contentwill diplay at the bottom ofscreen
/// Below button will go to bottom
ElevatedButton(
onPressed: (){},
child: Text('Click'),
),
]
))
);
}