|
| 1 | +import 'package:domus/config/size_config.dart'; |
| 2 | +import 'package:flutter/material.dart'; |
| 3 | +class Body extends StatefulWidget { |
| 4 | + const Body({Key? key}) : super(key: key); |
| 5 | + |
| 6 | + @override |
| 7 | + _BodyState createState() => _BodyState(); |
| 8 | +} |
| 9 | + |
| 10 | +class _BodyState extends State<Body> { |
| 11 | + @override |
| 12 | + Widget build(BuildContext context) { |
| 13 | + return Container( |
| 14 | + color: Colors.white, |
| 15 | + padding: EdgeInsets.only(left: 10,right: 10), |
| 16 | + width: MediaQuery.of(context).size.width, |
| 17 | + // height: getProportionateScreenHeight(80), |
| 18 | + // decoration: BoxDecoration( |
| 19 | + // color: Colors.yellow, |
| 20 | + // image: DecorationImage( |
| 21 | + // image: AssetImage("assets/images/favourite.png"), |
| 22 | + // ), |
| 23 | + // ), |
| 24 | + child: Column( |
| 25 | + crossAxisAlignment: CrossAxisAlignment.center, |
| 26 | + children: [ |
| 27 | + SizedBox(height:getProportionateScreenHeight(65) ,), |
| 28 | + Container( |
| 29 | + height: getProportionateScreenHeight(170), |
| 30 | + decoration: const BoxDecoration( |
| 31 | + |
| 32 | + image:DecorationImage( |
| 33 | + image: AssetImage("assets/images/favourite.png"), |
| 34 | + ), |
| 35 | + ),), |
| 36 | + SizedBox( |
| 37 | + height: getProportionateScreenHeight(20), |
| 38 | + ), |
| 39 | + const Text( |
| 40 | + "You haven't added anything yet", |
| 41 | + style: TextStyle( |
| 42 | + fontSize: 20, |
| 43 | + fontWeight: FontWeight.bold, |
| 44 | + ), |
| 45 | + ), |
| 46 | + SizedBox( |
| 47 | + height: getProportionateScreenHeight(2), |
| 48 | + ), |
| 49 | + const Text( |
| 50 | + "to favourites", |
| 51 | + style: TextStyle( |
| 52 | + fontSize: 20, |
| 53 | + fontWeight: FontWeight.bold, |
| 54 | + ), |
| 55 | + |
| 56 | + ), |
| 57 | + SizedBox( |
| 58 | + height: getProportionateScreenHeight(10), |
| 59 | + ), |
| 60 | + Container( |
| 61 | + height: getProportionateScreenHeight(43), |
| 62 | + width: getProportionateScreenWidth(230), |
| 63 | + decoration: BoxDecoration( |
| 64 | + color: Colors.black87, |
| 65 | + borderRadius: BorderRadius.circular(20), |
| 66 | + ), |
| 67 | + child: GestureDetector( |
| 68 | + onTap: (){ |
| 69 | + Navigator.pop(context); |
| 70 | + }, |
| 71 | + child: const Center( |
| 72 | + child: Text('Add to favourites', |
| 73 | + style: TextStyle( |
| 74 | + fontSize: 19, |
| 75 | + color: Colors.white, |
| 76 | + fontWeight: FontWeight.bold |
| 77 | + ),) |
| 78 | + ), |
| 79 | + ), |
| 80 | + ), |
| 81 | + ], |
| 82 | + ), |
| 83 | + ); |
| 84 | + } |
| 85 | +} |
0 commit comments