#30DaysMasterFlutter
Learn the basics of Flutter and Dart in 30 days! We provide a roadmap, resources, and project ideas to help you along your journey.
back to 30 Days to Master FlutterDay 11
In Flutter, UI design involves creating visual and interactive elements for your app using widgets. Widgets are pre-built components that can be arranged in a hierarchy to create complex layouts. Tools and libraries such as Material Design and Cupertino can help you design and build beautiful looking UIs.
Project - Product Details
Build a product details screen as shown in the following picture
Tips
- Use
Image.network
to display your image.- Widgets
Container
,Text
,ElevatedButton
,IconButton
,Container
,Stack
,Row
andColumn
- Don’t forget to post screenshot after you are done to your social networks with hashtag #30DaysMasterFlutter
By the end of this day, you should have a basic understanding of how to use widgets to create custom layouts and designs.
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'My App',
home: Scaffold(
appBar: AppBar(
title: Text('My App'),
),
body: Container(
padding: EdgeInsets.all(16.0),
child: Column(
children: <Widget>[
Image.network(FlutterLogo()),
SizedBox(height: 16.0),
Text(
'Welcome to my app!',
style: TextStyle(fontSize: 24.0),
),
SizedBox(height: 16.0),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
RaisedButton(
child: Text('Button 1'),
onPressed: () {},
),
RaisedButton(
child: Text('Button 2'),
onPressed: () {},
),
],
),
],
),
),
),
);
}
}
Enjoying? Tell your friends.
Learn the basics of Flutter and Dart in 30 days! We provide a roadmap, resources, and project ideas to help you along your journey.
back to 30 Days to Master FlutterJoin our community on Discord to connect with fellow learners, share your progress, and get help with any questions you may have throughout the #30DaysMasterFlutter challenge. Join now and get started on your journey to mastering Dart and Flutter!