Add Text Padding Widget
Step 1: Text Padding Widget
Column(
children: <Widget>[
Center(child:Container(
padding: EdgeInsets.fromLTRB(22, 22, 22, 22),
child: Text('Padding Container Widget',
style: TextStyle(fontSize: 22)))),
Padding(
padding: EdgeInsets.fromLTRB(15, 20, 15, 20),
child: Text('Padding Widget',
style: TextStyle(fontSize: 22))),
]
)
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
centerTitle: true,
backgroundColor: Colors.cyan,
title: Text("Padding Widget"),
),
body: Column(
children: <Widget>[
Center(child:Container(
padding: EdgeInsets.fromLTRB(22, 22, 22, 22),
child: Text('Padding Container Widget',
style: TextStyle(fontSize: 22)))),
Padding(
padding: EdgeInsets.fromLTRB(15, 20, 15, 20),
child: Text('Padding Widget',
style: TextStyle(fontSize: 22))),
]
)
)
);
}
}