import
'package:flutter/material.dart'
;
void
main() => runApp(MyApp());
class
MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return
MaterialApp(
title:
'TextSpan'
,
theme: ThemeData(
primarySwatch: Colors.green,
),
home: MyHomePage(),
debugShowCheckedModeBanner:
false
,
);
}
}
class
MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class
_MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return
Scaffold(
appBar: AppBar(
title: Text(
'GeeksforGeeks Align Widget'
),
backgroundColor: Colors.green),
body: Center(
child: Container(
height: 120.0,
width: 120.0,
color: Colors.blue[50],
child: Align(
alignment: Alignment.center,
child: Text(
"Geeky Text"
,
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
),
)));
}
}