Container:
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'text widget',
home: Scaffold(
body: Center(
child: Container(
child: Text(
'Hello Max',
style: TextStyle(fontSize: 40.0),
),
alignment: Alignment.topLeft,
//alignment: Alignment.bottomLeft,
//alignment: Alignment.bottomCenter,
//alignment: Alignment.centerLeft,
width: 500.0,
height: 400.0,
//color: Colors.lightBlue,
padding: const EdgeInsets.fromLTRB(10.0, 30.0, 30.0, 20.0),
margin: const EdgeInsets.all(10.0),
decoration: new BoxDecoration(
gradient: const LinearGradient(
colors: [Colors.lightBlue, Colors.lightGreen, Colors.pink]),
border: Border.all(width: 5.0, color: Colors.black)),
),
)),
);
}
}