SingleChildScrollView

 import "package:flutter/material.dart";


void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: DemoScroll(),
),
),
),
);
}
class DemoScroll extends StatelessWidget {
const DemoScroll({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("SingleChildScrollView"),
),
body: Padding(
padding: EdgeInsets.all(8.0),
child: SingleChildScrollView(
child: Column(
children: [
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: [
Container(
margin: EdgeInsets.all(8.0,),
width: 200, height: 200,
color: Colors.orange,
),
Container(
margin: EdgeInsets.all(8.0,),
width: 200, height: 200,
color: Colors.pink,
),
Container(
margin: EdgeInsets.all(8.0,),
width: 200, height: 200,
color: Colors.black54,
),
Container(
margin: EdgeInsets.all(8.0,),
width: 200, height: 200,
color: Colors.purple,
),
Container(
margin: EdgeInsets.all(8.0,),
width: 200, height: 200,
color: Colors.teal,
),
Container(
margin: EdgeInsets.all(8.0,),
width: 200, height: 200,
color: Colors.amber,
),
],
),
),
Container(
margin: EdgeInsets.all(8.0,),
/*width: 200,*/ height: 200,
color: Colors.deepPurple,
),
Container(
margin: EdgeInsets.all(8.0,),
/*width: 200,*/ height: 200,
color: Colors.brown,
),
Container(
margin: EdgeInsets.all(8.0,),
/*width: 200,*/ height: 200,
color: Colors.green,
),
Container(
margin: EdgeInsets.all(8.0,),
/*width: 200,*/ height: 200,
color: Colors.pink,
),
Container(
margin: EdgeInsets.all(8.0,),
/*width: 200,*/ height: 200,
color: Colors.black,
),
Container(
margin: EdgeInsets.all(8.0,),
/*width: 200,*/ height: 200,
color: Colors.deepOrange,
),
],
),
),
),
);
}
}

Comments

Popular posts from this blog

Second GET API Calling with Bloc simple Example in Flutter

Stack Container Scrollable Card widget UI with Custom Widget

Pagination with Bloc Pattern in Flutter