ScrollView Widget

 import "package:flutter/material.dart";


void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Hello App",
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blueGrey,
),
home: const FlutterApp(),
);
}
}

class FlutterApp extends StatelessWidget {
const FlutterApp({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(
"Welcome to Flutter Application",
style: TextStyle(fontWeight: FontWeight.bold),
),
centerTitle: true,
backgroundColor: Colors.grey,
),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: SingleChildScrollView(
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: [
Container(
margin: const EdgeInsets.only(right: 11),
width: 500,
height: 200,
color: Colors.brown,
),
Container(
margin: const EdgeInsets.only(right: 11),
width: 500,
height: 200,
color: Colors.black,
),
Container(
margin: const EdgeInsets.only(right: 11),
width: 500,
height: 200,
color: Colors.amberAccent,
),
Container(
margin: const EdgeInsets.only(right: 11),
width: 500,
height: 200,
color: Colors.teal,
),
Container(
margin: const EdgeInsets.only(right: 11),
width: 500,
height: 200,
color: Colors.lightGreen,
),
],
),
),
),
Container(
margin: const EdgeInsets.only(bottom: 11),
//width: 200,
height: 200,
color: Colors.purple,
),
Container(
margin: const EdgeInsets.only(bottom: 11),
//width: 200,
height: 200,
color: Colors.black,
),
Container(
margin: const EdgeInsets.only(bottom: 11),
//width: 200,
height: 200,
color: Colors.amber,
),
Container(
margin: const EdgeInsets.only(bottom: 11),
//width: 200,
height: 200,
color: Colors.red,
),
Container(
margin: const EdgeInsets.only(bottom: 11),
//width: 200,
height: 200,
color: Colors.pinkAccent,
),
Container(
margin: const EdgeInsets.only(bottom: 11),
//width: 200,
height: 200,
color: Colors.teal,
),
Container(
margin: const EdgeInsets.only(bottom: 11),
//width: 200,
height: 200,
color: Colors.grey,
),
],
),
),
),
);
}
}

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