last63

raihan

Aug 13th, 2024
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.85 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. class HomePage extends StatelessWidget {
  4. const HomePage({super.key});
  5.  
  6. @override
  7. Widget build(BuildContext context) {
  8. return MaterialApp(
  9. home: Scaffold(
  10. appBar: AppBar(),
  11. body: SafeArea(
  12. child: SingleChildScrollView(
  13. child: Column(
  14. crossAxisAlignment: CrossAxisAlignment.start,
  15. children: <Widget>[
  16. Padding(
  17. padding: const EdgeInsets.symmetric(
  18. horizontal: 16.0,
  19. ),
  20. child: Text(
  21. 'Explorer Destinations',
  22. style: TextStyle(
  23. fontFamily: "Poppins",
  24. fontWeight: FontWeight.w700,
  25. fontSize: 22.0,
  26. ),
  27. ),
  28. ),
  29. Padding(
  30. padding: const EdgeInsets.symmetric(
  31. vertical: 10.0,
  32. ),
  33. child: SingleChildScrollView(
  34. scrollDirection: Axis.horizontal,
  35. child: Row(
  36. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  37. children: <Widget>[
  38. Padding(
  39. padding: const EdgeInsets.all(8.0),
  40. child: Container(
  41. decoration: BoxDecoration(
  42. color: Colors.blue,
  43. borderRadius: BorderRadius.circular(10.0),
  44. ),
  45. child: Padding(
  46. padding: const EdgeInsets.symmetric(
  47. horizontal: 10,
  48. vertical: 8.0,
  49. ),
  50. child: Text(
  51. 'All',
  52. style: TextStyle(
  53. fontFamily: 'Poppins',
  54. fontWeight: FontWeight.w700,
  55. fontSize: 16.0,
  56. color: Colors.white,
  57. ),
  58. ),
  59. ),
  60. ),
  61. ),
  62. Padding(
  63. padding: const EdgeInsets.all(8.0),
  64. child: Text(
  65. 'Popular',
  66. style: TextStyle(
  67. fontFamily: "Poppins",
  68. fontSize: 16.0,
  69. fontWeight: FontWeight.w500,
  70. ),
  71. ),
  72. ),
  73. Padding(
  74. padding: const EdgeInsets.all(8.0),
  75. child: Text(
  76. 'Favorite',
  77. style: TextStyle(
  78. fontFamily: "Poppins",
  79. fontSize: 16.0,
  80. fontWeight: FontWeight.w500,
  81. ),
  82. ),
  83. ),
  84. Padding(
  85. padding: const EdgeInsets.all(8.0),
  86. child: Text(
  87. 'Recommended',
  88. style: TextStyle(
  89. fontFamily: "Poppins",
  90. fontSize: 16.0,
  91. fontWeight: FontWeight.w500,
  92. ),
  93. ),
  94. ),
  95. Padding(
  96. padding: const EdgeInsets.all(8.0),
  97. child: Text(
  98. 'News',
  99. style: TextStyle(
  100. fontFamily: "Poppins",
  101. fontSize: 16.0,
  102. fontWeight: FontWeight.w500,
  103. ),
  104. ),
  105. ),
  106. Padding(
  107. padding: const EdgeInsets.all(8.0),
  108. child: Text(
  109. 'Promo',
  110. style: TextStyle(
  111. fontFamily: "Poppins",
  112. fontSize: 16.0,
  113. fontWeight: FontWeight.w500,
  114. ),
  115. ),
  116. ),
  117. ],
  118. ),
  119. ),
  120. ),
  121. Padding(
  122. padding: EdgeInsets.symmetric(
  123. horizontal: 16.0,
  124. ),
  125. child: Container(
  126. decoration: BoxDecoration(
  127. color: Colors.white,
  128. borderRadius: BorderRadius.circular(10.0),
  129. ),
  130. child: Column(
  131. crossAxisAlignment: CrossAxisAlignment.start,
  132. children: <Widget>[
  133. Padding(
  134. padding: const EdgeInsets.all(8.0),
  135. child: SizedBox(
  136. child: ClipRRect(
  137. borderRadius: BorderRadius.circular(10.0),
  138. child: Image.asset('assets/images/danau1.jpg'),
  139. ),
  140. ),
  141. ),
  142. Padding(
  143. padding: const EdgeInsets.symmetric(
  144. horizontal: 8.0,
  145. ),
  146. child: Container(
  147. child: Text(
  148. 'Danau Toba',
  149. style: TextStyle(
  150. fontFamily: 'Poppins',
  151. fontSize: 18.0,
  152. fontWeight: FontWeight.w300,
  153. letterSpacing: 1.5,
  154. ),
  155. maxLines: 1,
  156. overflow: TextOverflow.ellipsis,
  157. ),
  158. ),
  159. ),
  160. Padding(
  161. padding: const EdgeInsets.all(8.0),
  162. child: Row(
  163. children: <Widget>[
  164. Expanded(
  165. child: Text(
  166. 'Sumatera Utara',
  167. style: TextStyle(
  168. fontFamily: 'Poppins',
  169. fontSize: 14.0,
  170. fontWeight: FontWeight.w300,
  171. ),
  172. ),
  173. ),
  174. Expanded(
  175. child: Text(
  176. 'Sumatera Utara',
  177. style: TextStyle(
  178. fontFamily: 'Poppins',
  179. fontSize: 14.0,
  180. fontWeight: FontWeight.w300,
  181. ),
  182. ),
  183. ),
  184. ],
  185. ),
  186. ),
  187. ],
  188. ),
  189. ),
  190. ),
  191. ],
  192. ),
  193. ),
  194. ),
  195. ),
  196. );
  197. }
  198. }
  199.  
Advertisement
Add Comment
Please, Sign In to add comment