Margin

 import "package:flutter/material.dart";


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

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

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

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

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(
"Hello HEER",
style: TextStyle(fontWeight: FontWeight.bold),
),
centerTitle: true,
backgroundColor: Colors.grey,
),
/*body: Padding(
//padding: EdgeInsets.only(top: 11, left: 45),
padding: EdgeInsets.all(45),

child: Text("Hello World!", style: TextStyle(fontSize: 25),),
),*/

body: Container(
color: Colors.blueGrey,
margin: const EdgeInsets.all(11.0),
child: const Padding(
//padding: EdgeInsets.all(11),
padding: EdgeInsets.only(top: 21, left: 34),
child: Text(
"Hello World!",
style: TextStyle(fontSize: 25, color: Colors.white),
),
),
),
);
}
}

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