Getting Started with Flutter: Install, Your First App and Project Structure
A step-by-step guide from installing the Flutter SDK to running your first app and understanding the project structure, with tips that save you time at the start.
A good Flutter app should look great on a small phone, a tablet and a desktop window. Learn how to get there with LayoutBuilder, breakpoints, adaptive navigation and correct right-to-left support.

A Flutter app might open on a 5-inch phone, a tablet, a Windows window or a browser. Hard-code the layout and one of them will break. Luckily Flutter has good tools for responsive UI.
For the size of the whole window:
final width = MediaQuery.sizeOf(context).width;But sometimes the layout should react to its parent's space, not the screen; LayoutBuilder is better there:
LayoutBuilder(
builder: (context, constraints) {
final isWide = constraints.maxWidth >= 840;
return isWide ? const WideLayout() : const NarrowLayout();
},
)Material guidance suggests these values, and they are a good start:
A bottom NavigationBar works best on phones and a side NavigationRail on wide screens:
Widget build(BuildContext context) {
final wide = MediaQuery.sizeOf(context).width >= 600;
return Scaffold(
body: Row(
children: [
if (wide) NavigationRail(
selectedIndex: index,
onDestinationSelected: onSelect,
destinations: railItems,
),
Expanded(child: pages[index]),
],
),
bottomNavigationBar: wide ? null : NavigationBar(
selectedIndex: index,
onDestinationSelected: onSelect,
destinations: barItems,
),
);
}GridView.builder(
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: 280,
mainAxisSpacing: 12,
crossAxisSpacing: 12,
),
itemBuilder: (context, i) => ProductCard(items[i]),
)The number of columns adapts to the width by itself.
A form that spans a 27-inch monitor looks ugly and is hard to read. Wrap it in ConstrainedBox(constraints: BoxConstraints(maxWidth: 900)) and a Center.
Expanded, Flexible and content-sized layouts.EdgeInsetsDirectional.only(start: ...) instead of EdgeInsets.only(left: ...).AlignmentDirectional.centerStart instead of Alignment.centerLeft.Directionality.With these few principles, a single codebase looks professional on phone, web and desktop.
The FastFlutter VIP course takes you from zero to a published app, with direct support from the instructor.