1-Container: A box that can contain other widgets. It can be styled with properties like color, padding, margin, etc.
Container(
width: 100,
height: 100,
color: Colors.blue,
child: Text(‘Hello’, style: TextStyle(color: Colors.white)),
),
2-Row: A horizontal layout widget that arranges its children in a row:
Row(
children: [
Icon(Icons.home),
Text(‘Home’),
],
),
3-Column: A vertical layout widget that arranges its children in a column:
Column(
children: [
Icon(Icons.email),
Text(‘Email’),
],
),
4-Text: Displays a simple text in your UI:
Text(‘Welcome to Flutter’),
5-Image: Displays an image in your UI:
Image.network(‘https://example.com/image.jpg’),
6-ListView: A scrollable list of widgets:
ListView(
children: [
ListTile(title: Text(‘Item 1’)),
ListTile(title: Text(‘Item 2’)),
ListTile(title: Text(‘Item 3’)),
],
),
7-AppBar: A material design app bar that typically contains a title and action icons:
AppBar(
title: Text(‘My App’),
actions: [
IconButton(icon: Icon(Icons.search), onPressed: () {}),
],
),
8-RaisedButton: A button with a raised appearance:
RaisedButton(
onPressed: () {
// Button click action
},
child: Text(‘Click Me’),
),
9-Scaffold: A basic structure of an app page that implements the Material Design visual layout structure:
Scaffold(
appBar: AppBar(title: Text(‘My App’)),
body: Center(child: Text(‘Hello Flutter!’)),
),
10-TextField: A widget to capture text input from the user.:
TextField(
onChanged: (text) {
// Process the text input
},
decoration: InputDecoration(
labelText: ‘Enter your name’,
),
),
11-Stack: A widget that overlays its children on top of each other:
Stack(
children: [
Image.asset(‘background.jpg’),
Positioned(
bottom: 20,
left: 20,
child: Text(‘Overlay Text’),
),
],
),
12-Card: A material design card with a rounded corner and elevation:
Card(
child: ListTile(
leading: Icon(Icons.person),
title: Text(‘John Doe’),
subtitle: Text(‘Software Developer’),
),
),