YSSightseeingPlaneDetail.dart 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/cupertino.dart';
  3. import 'package:ysairplane2/code/YSComment.dart';
  4. import 'package:ysairplane2/tools/YSTools.dart';
  5. class YSSightseeingPlaneDetail extends StatefulWidget {
  6. @override
  7. _YSSightseeingPlaneDetailState createState() => _YSSightseeingPlaneDetailState();
  8. }
  9. class _YSSightseeingPlaneDetailState extends State<YSSightseeingPlaneDetail> {
  10. @override
  11. Widget build(BuildContext context) {
  12. return Scaffold(
  13. backgroundColor: Color(0xFFF1F2F3),
  14. body: SingleChildScrollView(
  15. padding: EdgeInsets.all(0),
  16. child: Stack(
  17. children: [
  18. Container(
  19. height: MediaQuery.of(context).padding.top+hsp(370),
  20. width: MediaQuery.of(context).size.width,
  21. color: Colors.lightGreen,
  22. ),
  23. GestureDetector(
  24. onTap: (){
  25. Navigator.pop(context);
  26. },
  27. child: Container(
  28. margin: EdgeInsets.only(left: hsp(30),right: wsp(30),top: MediaQuery.of(context).padding.top+hsp(50)),
  29. child: Icon(Icons.arrow_back_ios,color: Colors.white,size: hsp(50),),
  30. ),
  31. ),
  32. Container(
  33. margin: EdgeInsets.only(left: MediaQuery.of(context).size.width-hsp(150),top: MediaQuery.of(context).padding.top+hsp(50)),
  34. child: Row(
  35. children: [
  36. GestureDetector(
  37. child: Icon(Icons.star_half,size: zsp(50),color: Colors.white,),
  38. onTap: (){
  39. showModalBottomSheet(
  40. backgroundColor: Colors.transparent,
  41. isScrollControlled: true,
  42. context: context,
  43. builder: (context){
  44. return Container(
  45. height: MediaQuery.of(context).size.height,
  46. child: Column(
  47. children: [
  48. Container(
  49. margin: EdgeInsets.only(top: hsp(100),left: hsp(75),right: hsp(75),bottom: hsp(50)),
  50. decoration: BoxDecoration(
  51. color: Colors.lightGreen,
  52. borderRadius: BorderRadius.all(Radius.circular(10))
  53. ),
  54. height: MediaQuery.of(context).size.height-hsp(450),
  55. ),
  56. Container(
  57. height: hsp(300),
  58. decoration: BoxDecoration(
  59. color: Colors.white,
  60. borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
  61. ),
  62. child: Column(
  63. children: [
  64. Container(
  65. height: hsp(100),
  66. padding: EdgeInsets.only(left: 15,right: 15),
  67. child: Row(
  68. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  69. children: [
  70. Container(),
  71. Text('分享到',style: TextStyle(fontSize: 15,color: Color(0xFF000000),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
  72. GestureDetector(child: Icon(Icons.close,size: 20,color: Color(0xFF000000),),onTap: (){Navigator.pop(context);},)
  73. ],
  74. ),
  75. ),
  76. Divider(height: 0.5,thickness: 0.5,color: Color(0x1A000000),),
  77. Container(
  78. height: hsp(200)-0.5,
  79. child: Row(
  80. children: [
  81. GestureDetector(
  82. child: Container(
  83. width: MediaQuery.of(context).size.width/2-0.25,
  84. height: hsp(150),
  85. child: Column(
  86. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  87. children: [
  88. Image(
  89. image: AssetImage('lib/images/wexinLogo.png'),
  90. height: 30,
  91. width: 30
  92. ),
  93. Text('微信好友',style: TextStyle(fontSize: 15,color: Color(0xFF81858C),decoration: TextDecoration.none),),
  94. ],
  95. ),
  96. ),
  97. onTap: (){
  98. Navigator.pop(context);
  99. },
  100. ),
  101. Container(
  102. height: hsp(100),
  103. width: 0.5,
  104. color: Color(0x1A000000)
  105. ),
  106. GestureDetector(
  107. onTap: (){
  108. Navigator.pop(context);
  109. },
  110. child: Container(
  111. width: MediaQuery.of(context).size.width/2-0.25,
  112. height: hsp(150),
  113. child: Column(
  114. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  115. children: [
  116. Image(
  117. image: AssetImage('lib/images/aliLogo.png'),
  118. height: 30,
  119. width: 30
  120. ),
  121. Text('生成海报',style: TextStyle(fontSize: 15,color: Color(0xFF81858C),decoration: TextDecoration.none),),
  122. ],
  123. ),
  124. ),
  125. )
  126. ],
  127. ),
  128. ),
  129. ],
  130. ),
  131. )
  132. ],
  133. ),
  134. );
  135. }
  136. );
  137. },
  138. ),
  139. Icon(Icons.star_half,size: zsp(50),color: Colors.white,),
  140. ],
  141. ),
  142. ),
  143. Container(
  144. margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(350)),
  145. height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-hsp(460),
  146. width: MediaQuery.of(context).size.width,
  147. decoration: BoxDecoration(
  148. color: Color(0xFFF1F2F4),
  149. borderRadius: BorderRadius.only(topRight: Radius.circular(10),topLeft: Radius.circular(10))
  150. ),
  151. child: SingleChildScrollView(
  152. child: Column(
  153. crossAxisAlignment: CrossAxisAlignment.start,
  154. children: [
  155. Container(
  156. padding: EdgeInsets.only(left: hsp(30),top: hsp(30),bottom: hsp(20),right: hsp(30)),
  157. child: Text('周年特惠 | 成都固定翼飞行体验480元/人',style: TextStyle(fontSize: zsp(36),color: Color(0xFF343434),fontWeight: FontWeight.bold),),
  158. color: Colors.white,
  159. width: MediaQuery.of(context).size.width,
  160. ),
  161. Container(
  162. color: Colors.white,
  163. width: MediaQuery.of(context).size.width,
  164. child: Row(
  165. children: [
  166. Container(
  167. width: wsp(70),
  168. height: hsp(40),
  169. margin: EdgeInsets.only(left: hsp(30)),
  170. child: Text('5.0',style: TextStyle(fontSize: zsp(25),color: Colors.white),),
  171. alignment: Alignment.center,
  172. decoration: BoxDecoration(
  173. color: Color(0xFFED5E58),
  174. borderRadius: BorderRadius.only(topLeft: Radius.circular(50),bottomLeft: Radius.circular(50))
  175. ),
  176. ),
  177. GestureDetector(
  178. onTap: (){
  179. Navigator.of(context).push(
  180. CupertinoPageRoute(
  181. builder: (context){
  182. return YSComment();
  183. }
  184. )
  185. );
  186. },
  187. child: Container(
  188. width: wsp(150),
  189. height: hsp(40),
  190. child: Text('99条点评 >',style: TextStyle(fontSize: zsp(20),color: Colors.white),),
  191. alignment: Alignment.center,
  192. decoration: BoxDecoration(
  193. color: Color(0xFFFD8B86),
  194. borderRadius: BorderRadius.only(bottomRight: Radius.circular(50),topRight: Radius.circular(50))
  195. ),
  196. ),
  197. )
  198. ],
  199. ),
  200. ),
  201. Container(
  202. padding: EdgeInsets.only(left: hsp(30),bottom: hsp(20),top: hsp(20)),
  203. color: Colors.white,
  204. width: MediaQuery.of(context).size.width,
  205. child: Row(
  206. children: [
  207. Icon(Icons.location_on,color: Color(0xFF5E5E5E),size: hsp(35),),
  208. Text(' 成都市双流县龙阳山景区',style: TextStyle(fontSize: zsp(23),color: Color(0xFF5E5E5E)),),
  209. ],
  210. ),
  211. ),
  212. Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE4E6E7),indent: hsp(30),endIndent: hsp(30),),
  213. Container(
  214. padding: EdgeInsets.only(left: hsp(30),bottom: hsp(20),top: hsp(20),right: hsp(30)),
  215. color: Colors.white,
  216. width: MediaQuery.of(context).size.width,
  217. height: hsp(80),
  218. child: Row(
  219. children: [
  220. RichText(
  221. text: TextSpan(
  222. text: '明珠航空 ',
  223. style: TextStyle(fontSize: zsp(26),color: Color(0xFF3283D9)),
  224. children: [
  225. TextSpan(
  226. text: '>',
  227. style: TextStyle(color: Color(0xFFC1C1C1)),
  228. )
  229. ]
  230. ),
  231. ),
  232. Container(width: wsp(40),),
  233. RichText(
  234. text: TextSpan(
  235. text: 'R144 ',
  236. style: TextStyle(fontSize: zsp(26),color: Color(0xFF3283D9)),
  237. children: [
  238. TextSpan(
  239. text: '>',
  240. style: TextStyle(color: Color(0xFFC1C1C1)),
  241. )
  242. ]
  243. ),
  244. )
  245. ],
  246. ),
  247. ),
  248. Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE4E6E7),indent: hsp(30),endIndent: hsp(30),),
  249. Container(
  250. padding: EdgeInsets.only(left: hsp(30),bottom: hsp(20),top: hsp(20),right: hsp(30)),
  251. child: Text('选择套餐',style: TextStyle(fontSize: zsp(30),color: Color(0xFF222222)),),
  252. color: Colors.white,
  253. width: MediaQuery.of(context).size.width,
  254. ),
  255. ListView.separated(
  256. itemBuilder: (context,index){
  257. return Container(
  258. padding: EdgeInsets.only(left: hsp(30),bottom: hsp(20),top: hsp(20),right: hsp(30)),
  259. width: MediaQuery.of(context).size.width,
  260. color: Colors.white,
  261. child: Column(
  262. crossAxisAlignment: CrossAxisAlignment.start,
  263. children: [
  264. Text('直升机体验(最大载客3人, 飞行时长3分钟)',style: TextStyle(fontSize: zsp(24),color: Color(0xFF888888)),),
  265. Row(
  266. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  267. children: [
  268. Text('¥599',style: TextStyle(fontSize: zsp(32),color: Color(0xFFEB423B),fontWeight: FontWeight.bold),),
  269. Container(
  270. height: hsp(40),
  271. width: hsp(100),
  272. decoration: BoxDecoration(
  273. color: Color(0xFFEA4D45),
  274. borderRadius: BorderRadius.all(Radius.circular(3))
  275. ),
  276. alignment: Alignment.center,
  277. child: Text('预订',style: TextStyle(fontSize: zsp(20),color: Colors.white),),
  278. )
  279. ],
  280. )
  281. ],
  282. ),
  283. );
  284. },
  285. separatorBuilder: (context,index){
  286. return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE4E6E7),);
  287. },
  288. itemCount: 2,
  289. padding: EdgeInsets.all(0),
  290. physics: NeverScrollableScrollPhysics(),
  291. shrinkWrap: true,
  292. ),
  293. Container(
  294. margin: EdgeInsets.only(top: hsp(10)),
  295. width: MediaQuery.of(context).size.width,
  296. color: Colors.white,
  297. padding: EdgeInsets.only(left: hsp(30),bottom: hsp(20),top: hsp(20),right: hsp(30)),
  298. child: Text('详情',style: TextStyle(fontSize: zsp(30),color: Color(0xFF343434),fontWeight: FontWeight.bold),),
  299. ),
  300. Container(
  301. padding: EdgeInsets.all(hsp(30)),
  302. width: MediaQuery.of(context).size.width,
  303. color: Colors.white,
  304. ),
  305. Container(
  306. margin: EdgeInsets.only(top: hsp(10)),
  307. width: MediaQuery.of(context).size.width,
  308. color: Colors.white,
  309. padding: EdgeInsets.only(left: hsp(30),bottom: hsp(20),top: hsp(20),right: hsp(30)),
  310. child: Text('相关推荐',style: TextStyle(fontSize: zsp(30),color: Color(0xFF343434),fontWeight: FontWeight.bold),),
  311. ),
  312. Container(
  313. padding: EdgeInsets.all(hsp(30)),
  314. width: MediaQuery.of(context).size.width,
  315. color: Colors.white,
  316. )
  317. ],
  318. ),
  319. ),
  320. ),
  321. Container(
  322. margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-hsp(110)),
  323. height: hsp(110),
  324. color: Colors.white,
  325. padding: EdgeInsets.only(left: wsp(40),right: wsp(40)),
  326. alignment: Alignment.center,
  327. child: Row(
  328. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  329. children: [
  330. Column(
  331. mainAxisSize: MainAxisSize.min,
  332. children: [
  333. Icon(Icons.headset,color: Color(0xFF666666),size: zsp(40),),
  334. Text('咨询',style: TextStyle(fontSize: zsp(22),color: Color(0xFF767676)),)
  335. ],
  336. ),
  337. Column(
  338. mainAxisSize: MainAxisSize.min,
  339. children: [
  340. Icon(Icons.star_border,color: Color(0xFF666666),size: zsp(40),),
  341. Text('加入收藏',style: TextStyle(fontSize: zsp(22),color: Color(0xFF767676)),)
  342. ],
  343. ),
  344. Container(
  345. height: hsp(80),
  346. width: MediaQuery.of(context).size.width*0.6,
  347. decoration: BoxDecoration(
  348. color: Color(0xFF007EFF),
  349. borderRadius: BorderRadius.all(Radius.circular(50))
  350. ),
  351. alignment: Alignment.center,
  352. child: Text('立即预订',style: TextStyle(fontSize: zsp(36),color: Colors.white,fontWeight: FontWeight.bold),),
  353. )
  354. ],
  355. ),
  356. )
  357. ],
  358. ),
  359. ),
  360. );
  361. }
  362. }