Menu

Flutter Explained: One Codebase, Every Screen
πŸ“°

Flutter Explained: One Codebase, Every Screen

DEV Community: flutterΒ·The Practical DeveloperΒ·about 20 hours ago
#QEZkssei
#devtoflutter#devto#dev#widget#flutter
Reading 0:00
15s threshold

Introduction

Flutter is Google's framework for building apps from a single codebase: write once in Dart, and ship to iOS, Android, web, Windows, macOS, and Linux. It powers apps from Google Pay to the New York Times crossword app. Its core idea is simple and radical: everything on screen is a widget, and the interface is rebuilt from data whenever that data changes.

Everything is a widget

In Flutter, there are no separate concepts for layout, styling, and controls β€” everything is a widget, nested inside other widgets like HTML elements, but in code:

import 'package:flutter/material.dart' ; class Greeting extends StatelessWidget { @override Widget build ( BuildContext context ) { return Center ( child: Text ( 'Hello, Sara!' , style: TextStyle ( fontSize: 24 , color: Colors . teal ), ), ); } }

Enter fullscreen mode

Exit fullscreen mode

Center positions its child, Text displays words, TextStyle styles them β€” each a widget, composed by nesting.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.