Created
October 10, 2020 07:41
-
-
Save Eng-MFQ/a8fe07191ea60262f3d6377e14d61a5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData( | |
// to change your app color change this | |
primarySwatch: Colors.amber, | |
), | |
home: MyHomePage(), | |
); | |
} | |
} | |
/// this is a template to start building a UI | |
/// to start adding any UI you want change what comes after the [ body: ] tag below | |
class MyHomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
backgroundColor: Colors.amber, | |
appBar: AppBar( | |
title: Text( | |
'Flower Shop', | |
style: TextStyle(fontFamily: 'casual'), | |
), | |
/*******************--[focus here 🧐]--*******************/ | |
elevation: 4.0, | |
), | |
body: ListView( | |
children: <Widget>[ | |
/*******************--[focus here 🧐]--*******************/ | |
flowerDetails(context), | |
], | |
)); | |
} | |
} | |
Widget flowerDetails(BuildContext context) { | |
return Container( | |
padding: EdgeInsets.all(20), | |
color: Colors.amber, | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
mainAxisSize: MainAxisSize.max, | |
children: <Widget>[ | |
imageGroup(), | |
titleGroup(), | |
iconGroup(), | |
textGroup(), | |
buttonGroup(), | |
], | |
), | |
); | |
} | |
/// Image URL | |
/// https://newevolutiondesigns.com/images/freebies/yellow-wallpaper-12.jpg | |
Widget imageGroup() { | |
return Text('Replace with image group'); | |
} | |
Widget titleGroup() { | |
return Text('Replace with title group'); | |
} | |
Widget iconGroup() { | |
return Text('Replace with icons group');; | |
} | |
/// here is the text to copy | |
///Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s', | |
Widget textGroup() { | |
return Text('Replace with text group');; | |
} | |
Widget buttonGroup() { | |
return Text('Replace with button group');; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment