You are now going to use a Column widget and then a Stack widget to place elements on the screen:
- In the profile_screen.dart file, import the material.dart library.
- Type stless to create a new stateless widget, and call it ProfileScreen:
import 'package:flutter/material.dart';
class ProfileScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container();
}
}
- In the main.dart file, remove the MyHomePage class, and use the new ProfileScreen class as the home of MyApp:
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: ProfileScreen(),
);
}
}
- In the profile_screen.dart file, add this shell code. This won't do anything yet, but it gives us three places to add the elements for this screen:
class ProfileScreen extends StatelessWidget {
@override
Widget build(BuildContext context)...