Scaffold and AppBar with MaterialApp In Flutter
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: 'FirstApp',
home: Scaffold(
appBar: AppBar(
title: Text(
'My First Flutter App',
style: TextStyle(color: Colors.blue),
),
backgroundColor: Colors.white,
),
backgroundColor: Colors.green,
body: Center(
child: Text(
'MaterialApp',
textDirection: TextDirection.ltr,
style: TextStyle(
decoration: TextDecoration.none,
color: Colors.white,
fontSize: 20),
),
),
),
));
}

Comments
Post a Comment