Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- class HomePage extends StatelessWidget {
- const HomePage({super.key});
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- home: Scaffold(
- appBar: AppBar(),
- body: SafeArea(
- child: SingleChildScrollView(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: 16.0,
- ),
- child: Text(
- 'Explorer Destinations',
- style: TextStyle(
- fontFamily: "Poppins",
- fontWeight: FontWeight.w700,
- fontSize: 22.0,
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.symmetric(
- vertical: 10.0,
- ),
- child: SingleChildScrollView(
- scrollDirection: Axis.horizontal,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: <Widget>[
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Container(
- decoration: BoxDecoration(
- color: Colors.blue,
- borderRadius: BorderRadius.circular(10.0),
- ),
- child: Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: 10,
- vertical: 8.0,
- ),
- child: Text(
- 'All',
- style: TextStyle(
- fontFamily: 'Poppins',
- fontWeight: FontWeight.w700,
- fontSize: 16.0,
- color: Colors.white,
- ),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Text(
- 'Popular',
- style: TextStyle(
- fontFamily: "Poppins",
- fontSize: 16.0,
- fontWeight: FontWeight.w500,
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Text(
- 'Favorite',
- style: TextStyle(
- fontFamily: "Poppins",
- fontSize: 16.0,
- fontWeight: FontWeight.w500,
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Text(
- 'Recommended',
- style: TextStyle(
- fontFamily: "Poppins",
- fontSize: 16.0,
- fontWeight: FontWeight.w500,
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Text(
- 'News',
- style: TextStyle(
- fontFamily: "Poppins",
- fontSize: 16.0,
- fontWeight: FontWeight.w500,
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Text(
- 'Promo',
- style: TextStyle(
- fontFamily: "Poppins",
- fontSize: 16.0,
- fontWeight: FontWeight.w500,
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- Padding(
- padding: EdgeInsets.symmetric(
- horizontal: 16.0,
- ),
- child: Container(
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.circular(10.0),
- ),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: SizedBox(
- child: ClipRRect(
- borderRadius: BorderRadius.circular(10.0),
- child: Image.asset('assets/images/danau1.jpg'),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: 8.0,
- ),
- child: Container(
- child: Text(
- 'Danau Toba',
- style: TextStyle(
- fontFamily: 'Poppins',
- fontSize: 18.0,
- fontWeight: FontWeight.w300,
- letterSpacing: 1.5,
- ),
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Row(
- children: <Widget>[
- Expanded(
- child: Text(
- 'Sumatera Utara',
- style: TextStyle(
- fontFamily: 'Poppins',
- fontSize: 14.0,
- fontWeight: FontWeight.w300,
- ),
- ),
- ),
- Expanded(
- child: Text(
- 'Sumatera Utara',
- style: TextStyle(
- fontFamily: 'Poppins',
- fontSize: 14.0,
- fontWeight: FontWeight.w300,
- ),
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment