detailpage:
import 'package:flutter/[Link]';
import '../misc/[Link]';
import '../widgets/app_buttons.dart';
import '../widgets/app_large_text.dart';
import '../widgets/app_text.dart';
import '../widgets/responsive_button.dart';
import 'navpages/main_page.dart';
class DetailPage extends StatefulWidget {
final String name;
final String img;
final String location;
final int stars;
final int price;
final String description;
const DetailPage({
[Link],
required [Link],
required [Link],
required [Link],
required [Link],
required [Link],
required [Link],});
@override
State<DetailPage> createState() => _DetailPageState();
}
class _DetailPageState extends State<DetailPage> {
int gottenStars = 4;
int selectedIndex = -1;
@override
Widget build(BuildContext context) {
return Scaffold(
body: SizedBox(
width: [Link],
height: [Link],
child: Stack(
children: [
Positioned(
child: Container(
width: [Link],
height: 350,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("img/heritage/[Link]"),
fit: [Link]),
))),
Positioned(
left: 10,
top: 40,
child: Row(
children: [
IconButton(
onPressed: () {
[Link](context).pushReplacement(MaterialPageRoute(
builder: (context) => const MainPage()));
},
icon: const Icon(Icons.arrow_back),
color: [Link],
iconSize: 30,
)
],
)),
Positioned(
top: 320,
child: Container(
padding: const [Link](left: 20, right: 20, top: 30),
width: [Link](context).[Link],
height: 500,
decoration: const BoxDecoration(
color: [Link],
borderRadius: [Link](
topLeft: [Link](20),
topRight: [Link](20))),
child: Column(
crossAxisAlignment: [Link],
children: [
Row(
mainAxisAlignment: [Link],
children: [
AppLargeText(
text: "Patan-Durbar",
color: [Link](0.8)),
AppLargeText(
text: "\$200",
color: [Link],
)
],
),
const SizedBox(
height: 10,
),
Row(
children: [
const Icon(
Icons.location_on,
color: [Link],
),
const SizedBox(
width: 5,
),
AppText(
text: "Nepal, Kathmandu",
color: AppColors.texColor1,
)
],
),
const SizedBox(
height: 20,
),
Row(
children: [
Wrap(
children: [Link](5, (index) {
return Icon([Link],
color: index < gottenStars
? [Link]
: AppColors.textColor2);
}),
),
const SizedBox(
width: 10,
),
AppText(
text: "(4.0)",
color: AppColors.textColor2,
)
],
),
const SizedBox(
height: 25,
),
AppLargeText(
text: "People",
color: [Link](0.8),
size: 20,
),
const SizedBox(
height: 5,
),
AppText(
text: "Number of people in your group",
color: [Link],
),
const SizedBox(
height: 10,
),
Wrap(
children: [Link](5, (index) {
return InkWell(
onTap: () {
setState(() {
selectedIndex = index;
});
},
child: Container(
margin: const [Link](right: 10),
child: AppButtons(
size: 50,
color: selectedIndex == index
? [Link]
: [Link],
backgroundColor: selectedIndex == index
? [Link]
: [Link],
borderColor: selectedIndex == index
? [Link]
: [Link],
text: (index + 1).toString(),
),
),
);
})),
const SizedBox(
height: 10,
),
AppLargeText(
text: "Description",
color: [Link](0.8),
size: 20,
),
const SizedBox(
height: 10,
),
AppText(
text:
" Patan-Durbar is the oldest Hindu temple in Kathmandu."
" Patan-Durbar is considered as the protector of the
universe and the patron deity of Hindu people."
" Hundreds of throusands of Hindu devotees from across
the world come to Nepal to visit the temple.",
color: [Link],
),
],
),
)),
Positioned(
bottom: 20,
left: 20,
right: 20,
child: Row(
children: [
AppButtons(
size: 60,
color: AppColors.textColor2,
backgroundColor: [Link],
borderColor: AppColors.textColor2,
isIcon: true,
icon: Icons.favorite_border,
),
const SizedBox(
width: 20,
),
ResponsiveButton(
isResponsive: true,
)
],
))
],
),
));
}
}