detail.dart 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. import 'package:flutter/material.dart';
  2. import 'package:date_format/date_format.dart';
  3. var date = formatDate(DateTime.now(), [HH, ':', nn]);
  4. class DetailPage extends StatelessWidget {
  5. final Map<String, dynamic> items;
  6. DetailPage({super.key, required this.items});
  7. @override
  8. Widget build(BuildContext context) {
  9. // print(items);
  10. return Scaffold(
  11. appBar: AppBar(
  12. backgroundColor: Colors.white,
  13. automaticallyImplyLeading: false,
  14. elevation: 0,
  15. toolbarHeight: 44,
  16. title: Text(
  17. date,
  18. style: TextStyle(color: Color(0xff303336), fontSize: 15),
  19. ),
  20. actions: [
  21. Icon(
  22. Icons.signal_cellular_alt,
  23. color: Color(0xff303336),
  24. ),
  25. Icon(
  26. Icons.wifi,
  27. color: Color(0xff303336),
  28. ),
  29. RotatedBox(
  30. quarterTurns: -3,
  31. child: Icon(
  32. Icons.battery_std,
  33. color: Color(0xff303336),
  34. ),
  35. )
  36. ],
  37. ),
  38. body: Column(
  39. children: [
  40. Row(
  41. children: [
  42. BackButton(),
  43. Text(
  44. 'Detail',
  45. style: TextStyle(fontWeight: FontWeight.bold),
  46. ),
  47. Spacer(),
  48. ElevatedButton(
  49. onPressed: () {},
  50. style: ElevatedButton.styleFrom(
  51. backgroundColor: Color(0xff078C84).withOpacity(0.1),
  52. side: BorderSide(color: Color(0xff078C84)),
  53. shape: RoundedRectangleBorder(
  54. borderRadius: BorderRadius.circular(35))),
  55. child: Row(
  56. children: [
  57. Text(
  58. 'Forum',
  59. style: TextStyle(color: Color(0xff078C84)),
  60. ),
  61. SizedBox(
  62. width: 5,
  63. ),
  64. Icon(
  65. Icons.message_outlined,
  66. color: Color(0xff078C84),
  67. )
  68. ],
  69. ),
  70. )
  71. ],
  72. ),
  73. Divider(),
  74. Container(
  75. height: 44,
  76. alignment: Alignment.centerLeft,
  77. padding: EdgeInsets.symmetric(horizontal: 10),
  78. child: Text(
  79. 'Food & Drink',
  80. style: TextStyle(fontWeight: FontWeight.bold),
  81. ),
  82. ),
  83. Row(
  84. children: [
  85. Container(
  86. // decoration: BoxDecoration(),
  87. // width: 100,
  88. // height: 79.17,
  89. // child: gambar(items),
  90. ),
  91. Column(
  92. children: [
  93. Container(
  94. decoration: BoxDecoration(),
  95. child: Text(
  96. 'Fresh smoked tuna with traditional recipe ...',
  97. overflow: TextOverflow.clip,
  98. style: TextStyle(
  99. fontWeight: FontWeight.w400,
  100. color: Color(0xff292D32)),
  101. ),
  102. ),
  103. Container(
  104. width: 272,
  105. decoration: BoxDecoration(),
  106. child: Text(
  107. 'Fresh tuna meat prepared with traditional recipes from Nort Maluku. All recipes mixed together ...',
  108. overflow: TextOverflow.clip,
  109. style: TextStyle(
  110. fontWeight: FontWeight.w300,
  111. color: Color(0xff292D32)),
  112. ),
  113. )
  114. ],
  115. )
  116. ],
  117. ),
  118. ],
  119. ),
  120. );
  121. }
  122. // Container gambar(items) {
  123. // return Container(
  124. // decoration: BoxDecoration(
  125. // border: Border.all(color: items['color']),
  126. // borderRadius: BorderRadius.all(Radius.circular(20)),
  127. // color: items['color'].withOpacity(0.4)),
  128. // padding: const EdgeInsets.all(5.0),
  129. // child: Image.asset(
  130. // items['image'],
  131. // width: 36,
  132. // height: 36,
  133. // fit: BoxFit.cover,
  134. // ),
  135. // );
  136. // }
  137. }