UI Design Flutter Week 2
UI Design Flutter Week 2
Creating projects
#
There are a couple ways to create a new project.
The Flutter extension performs code analysis. The code analysis can:
Start debugging by clicking Run > Start Debugging from the main IDE window, or
press F5.
When a Flutter project is open in VS Code, you should see a set of Flutter specific
entries in the status bar, including a Flutter SDK version and a device name (or the
message No Devices):
1. Run the app from a supported Flutter editor or a terminal window. Either a physical
or virtual device can be the target. Only Flutter apps in debug mode can be hot
reloaded or hot restarted.
2. Modify one of the Dart files in your project. Most types of code changes can be hot
reloaded; for a list of changes that require a hot restart, see Special cases.
3. If you're working in an IDE/editor that supports Flutter's IDE tools, select Save
All (cmd-s/ctrl-s), or click the hot reload button on the toolbar.
4. If you're running the app at the command line using flutter run, enter r in the
terminal window.
Text Widget:
import 'package:flutter/material.dart';
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.lightGreen,
appBar: AppBar(
backgroundColor: Colors.green,
title: const Text("welcome Screen"),
), // AppBar
body: Container(
child: const Center(
child: Text("Hello world!!"),
), // Center
), // Container
), // Scaffold
); // MaterialApp
}
}