|
| 1 | +import 'package:flutter/material.dart'; |
| 2 | +import 'package:movie_app/utils/text.dart'; |
| 3 | + |
| 4 | +class Description extends StatelessWidget { |
| 5 | + final String? movieName, |
| 6 | + description, |
| 7 | + bannerurl, |
| 8 | + posterurl, |
| 9 | + releaseDate, |
| 10 | + votes; |
| 11 | + |
| 12 | + const Description( |
| 13 | + {super.key, |
| 14 | + this.movieName, |
| 15 | + this.description, |
| 16 | + this.bannerurl, |
| 17 | + this.posterurl, |
| 18 | + this.releaseDate, |
| 19 | + this.votes}); |
| 20 | + // const Description({Key? key}) : super(key: key); |
| 21 | + |
| 22 | + @override |
| 23 | + Widget build(BuildContext context) { |
| 24 | + return Scaffold( |
| 25 | + backgroundColor: Colors.black, |
| 26 | + // appBar: AppBar( |
| 27 | + // backgroundColor: Colors.transparent.withOpacity(0.2), |
| 28 | + // elevation:0, |
| 29 | + // leading: IconButton(onPressed: (){ |
| 30 | + // Navigator.of(context).pop(context); |
| 31 | + // }, icon: Icon(Icons.arrow_back_ios)), |
| 32 | + // ), |
| 33 | + body: Container( |
| 34 | + |
| 35 | + child: ListView(children: [ |
| 36 | + Container( |
| 37 | + height: 250, |
| 38 | + child: Stack(children: [ |
| 39 | + Positioned( |
| 40 | + child: Container( |
| 41 | + height: 250, |
| 42 | + width: MediaQuery.of(context).size.width, |
| 43 | + child: Image.network( |
| 44 | + bannerurl!, |
| 45 | + fit: BoxFit.cover, |
| 46 | + ), |
| 47 | + ), |
| 48 | + ), |
| 49 | + Positioned(child: IconButton(onPressed: (){ |
| 50 | + Navigator.of(context).pop(context); |
| 51 | + }, icon: Icon(Icons.arrow_back_ios)),) |
| 52 | + ])), |
| 53 | + // SizedBox(height: 15), |
| 54 | + Row( |
| 55 | + children: [ |
| 56 | + Container( |
| 57 | + padding: EdgeInsets.all(10), |
| 58 | + |
| 59 | + height: 220, |
| 60 | + width: 150, |
| 61 | + decoration: BoxDecoration( |
| 62 | + borderRadius: BorderRadius.circular(30) |
| 63 | + ), |
| 64 | + child: Image.network(posterurl!, |
| 65 | + fit: BoxFit.contain, |
| 66 | + ), |
| 67 | + ), |
| 68 | + Flexible(child: Column( |
| 69 | + children: [ |
| 70 | + Container( |
| 71 | + padding: EdgeInsets.all(10), |
| 72 | + child: Text( |
| 73 | + movieName != null ? movieName! : 'Not Loaded', |
| 74 | + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 24 ), |
| 75 | + )), |
| 76 | + Column( |
| 77 | + |
| 78 | + children: [ |
| 79 | + Container( |
| 80 | + padding: EdgeInsets.only(left: 10), |
| 81 | + child: custom_text( |
| 82 | + text: 'Release Date - ' + releaseDate!, size: 14),alignment: Alignment.topLeft), |
| 83 | + |
| 84 | + SizedBox(height: 10,), |
| 85 | + Container( |
| 86 | + padding: EdgeInsets.only(left: 10), |
| 87 | + child: custom_text(text: 'Average Rating - ' + votes!), alignment: Alignment.topLeft), |
| 88 | + ], |
| 89 | + ), |
| 90 | + |
| 91 | + ], |
| 92 | + ), ) |
| 93 | + ], |
| 94 | + ), |
| 95 | + |
| 96 | + Row( |
| 97 | + children: [ |
| 98 | + // Container( |
| 99 | + // height: 200, |
| 100 | + // width: 100, |
| 101 | + // child: Image.network(posterurl!), |
| 102 | + // ), |
| 103 | + Flexible( |
| 104 | + child: Container( |
| 105 | + padding: EdgeInsets.all(10), |
| 106 | + child: Column( |
| 107 | + children: [ |
| 108 | + Container(child: Text("Overview", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 24, )), alignment: Alignment.topLeft,), |
| 109 | + SizedBox(height:10), |
| 110 | + custom_text(text: description, size: 14), |
| 111 | + ], |
| 112 | + )), |
| 113 | + ), |
| 114 | + ], |
| 115 | + ) |
| 116 | + ]), |
| 117 | + ), |
| 118 | + ); |
| 119 | + } |
| 120 | +} |
0 commit comments