Let's get started with some basic text:
- In your text_layout.dart file, add the shell for a class called TextLayout, which will extend StatelessWidget. Import all the requisite packages:
import 'package:flutter/material.dart';
class TextLayout extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container();
}
}
- Open basic_screen.dart and perform these updates so that the TextLayout widget will be displayed underneath ImmutableWidget.
For the sake of brevity, AppBar and the Drawer code have been ellipted:
import 'package:flutter/material.dart';
import 'package:flutter_layout/immutable_widget.dart';
import 'package:flutter_layout/text_layout.dart';
class BasicScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(...),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children:[
...