main.dart
import 'package:flutter/material.dart';
void main(){
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - Container Padding Margin")
),
body:Container(
color: Colors.green.shade200,
child: const Icon(Icons.light, size: 64),
margin: const EdgeInsets.all(16),
padding: const EdgeInsets.all(32)
)
),
),
);
}
More flutter tutorials
- flutter – AlertDialog height
- flutter – AlertDialog scrollable
- flutter – AlertDialog shape
- flutter – Animated align
- flutter – Align example
- flutter – ActionChip example
- flutter – ActionChip size
- flutter – How to change status bar color
- flutter – How to hide status bar
- flutter – How to change AppBar height
- flutter – How to get AppBar height
- flutter – Full screen display
- flutter – Container content alignment
- flutter – Container full width
- flutter – How to align Text