Menu
CoddyTech

Row

Part of the Your First App section of Coddy's Flutter journey. Lesson 20 of 32.

A Row is a Column turned on its side: it puts its children next to each other, from left to right.

Row(
  children: [
    Text('Yes'),
    Text('No'),
  ],
)

Rows and columns are how almost every Flutter screen is laid out: a column of rows, rows with columns inside, and so on.

challenge icon

Challenge

Easy

The two words are stacked. Make them sit side by side, Left first and Right after it.

Try it yourself

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: Column(
            children: [
              Text('Left', style: TextStyle(fontSize: 24)),
              Text('Right', style: TextStyle(fontSize: 24)),
            ],
          ),
        ),
      ),
    );
  }
}
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Your First App

Practice on your own: Online Flutter compiler