3

I'm still new to Flutter Web. I have 3 lines in my flutter web, the first line is the welcome message, the second line is a product and the last is contact, to see those lines user needs to do a scroll on my web. But how can I wrap my code using the Scroll function in flutter web? this is my code.

 class HomeScreen extends StatelessWidget { const HomeScreen({Key? key}) : super(key: key); @override Widget build(BuildContext context) { Size size = MediaQuery.of(context).size; return Scaffold( body: Column( children: [ Container( // Code Line 1 height: size.height, width: size.width, decoration: BoxDecoration( image: DecorationImage( image: AssetImage("assets/images/container.jpg"), fit: BoxFit.fitWidth), ), child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[ CusAppBar(), Spacer(), Body(), Spacer( flex: 1, ), ], ), ), Container( // Code Line 2 Here ), Container( // Code Line 3 Here ) ], ), ); } } 

My background is react, usually we just use tag ScrollView outside the container so the user can scroll the page. But how I can implement it on flutter web?

Thank you.

1 Answer 1

11

Try to add your fist Column inside SingleChildScrollView like below hope it help you:

body: SingleChildScrollView( child:Column( children:[ //Declare Your Widgets Here ], ), ), 
Sign up to request clarification or add additional context in comments.

1 Comment

I Accept it but I can't upvote cus I don't have enough reputation. sorry.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.