Scaffold Widget
- The Scaffold widget occupies the whole screen of the device
- Provides the visual structure for the UI of the Flutter app
Properties
- appBar
- body
- floatingActionButton
- drawer
- backgroundColor
- bottomNavigationBar
Example (VS code)
import 'package:flutter/material.dart';
void main(List<String> args) {
runApp(MaterialApp(
home: Scaffold(
backgroundColor: Colors.amber,
appBar: AppBar(
backgroundColor: Colors.red,
centerTitle: true,
title: Text("Profile App"),
),
body: Center(
child: Text(
"Welcome to Flutter",
style: TextStyle(fontSize: 30),
),
))));
}
No comments:
Post a Comment