mjamilasfihani

modul-1

Dec 2nd, 2021
631
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/rendering.dart';
  3.  
  4. void main() {
  5.   runApp(MyApp());
  6. }
  7.  
  8. class MyApp extends StatelessWidget {
  9.   @override
  10.   Widget build(BuildContext context) {
  11.     return MaterialApp(
  12.       title: 'Welcome to Flutter',
  13.       home: Scaffold(
  14.         appBar: AppBar(backgroundColor: Colors.blueGrey, title: Center(child: Text('Starwberry Pavlova'))),
  15.         body: Center(
  16.           child: FractionallySizedBox(
  17.             widthFactor: 0.8,
  18.             child: Column(
  19.               children: <Widget>[
  20.                 Container(child: Image.network('https://ichef.bbci.co.uk/food/ic/food_16x9_832/recipes/strawberrypavlova_88895_16x9.jpg')),
  21.                 Padding(
  22.                     padding: EdgeInsets.only(top: 30, bottom: 20),
  23.                     child: Text('Strawberry Pavlova', style: TextStyle(fontSize: 20))
  24.                 ),
  25.                 Container(
  26.                   child: Text("Pavlova is a meringue-based dessert named after the Russian ballerine Anna Pavlova.\nPavlova features a crisp crust and soft, light inside, topped with fruit and whipped cream",
  27.                       textAlign: TextAlign.center, style: TextStyle(fontSize: 14, height: 1.2)),
  28.                 ),
  29.                 Padding(
  30.                     padding: EdgeInsets.only(top: 20, bottom: 20),
  31.                     child: Row(
  32.                         mainAxisAlignment: MainAxisAlignment.center,
  33.                         children: <Widget>[
  34.                           Row(children: <Widget>[for (var i = 0; i < 4; i++) Icon(Icons.star), Icon(Icons.star, color: Colors.yellow)]),
  35.                           Padding(padding: EdgeInsets.only(left: 30), child: Text('170 Reviews'))
  36.                         ])
  37.                 ),
  38.                 Container(
  39.                     margin: EdgeInsets.only(top: 5),
  40.                     child: Row(
  41.                         mainAxisAlignment: MainAxisAlignment.center,
  42.                         children: <Widget>[
  43.                           Column(children: <Widget>[Icon(Icons.bookmark_border), Padding(padding: EdgeInsets.only(top: 5, bottom: 10), child: Text('PREP')), Text('25 min')]),
  44.                           Column(children: <Widget>[Icon(Icons.alarm), Padding(padding: EdgeInsets.only(top: 5, bottom: 10, left: 30, right: 30), child: Text('COOK')), Text('1 hr')]),
  45.                           Column(children: <Widget>[Icon(Icons.local_dining), Padding(padding: EdgeInsets.only(top: 5, bottom: 10), child: Text('FEEDS')), Text('4-6')])
  46.                         ])
  47.                 )
  48.               ],
  49.             ),
  50.           ),
  51.         ),
  52.       ),
  53.     );
  54.   }
  55. }
  56.  
RAW Paste Data