business details offer slide finished
This commit is contained in:
parent
4741190db6
commit
88ba07bf5a
@ -1,6 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_switch/flutter_switch.dart';
|
||||
|
||||
class PageViewModel {
|
||||
String title;
|
||||
String body;
|
||||
String image;
|
||||
|
||||
PageViewModel({required this.title, required this.body, required this.image});
|
||||
}
|
||||
|
||||
class businessdetail extends StatefulWidget {
|
||||
const businessdetail({Key? key}) : super(key: key);
|
||||
|
||||
@ -10,6 +18,26 @@ class businessdetail extends StatefulWidget {
|
||||
|
||||
class _businessdetailState extends State<businessdetail> {
|
||||
bool status = true;
|
||||
int pageIndex = 0;
|
||||
PageController pageController = PageController();
|
||||
|
||||
final List<PageViewModel> pages = [
|
||||
PageViewModel(
|
||||
title: '',
|
||||
body: 'Best Hotels and Restaurants around you...',
|
||||
image: 'assets/images/onboarding_image_1.png',
|
||||
),
|
||||
PageViewModel(
|
||||
title: '',
|
||||
body: 'Best Medicals, Clinics and Hospitals around you...',
|
||||
image: 'assets/images/onboarding_image_2.png',
|
||||
),
|
||||
PageViewModel(
|
||||
title: '',
|
||||
body: 'Best Grocery and all Other Shops around you...',
|
||||
image: "assets/images/onboarding_image_3.png",
|
||||
)
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -88,8 +116,8 @@ class _businessdetailState extends State<businessdetail> {
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: 20, left: 20, top: 60),
|
||||
padding: EdgeInsets.all(15),
|
||||
height: 300,
|
||||
padding: EdgeInsets.all(12),
|
||||
height: 270,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(
|
||||
@ -241,7 +269,7 @@ class _businessdetailState extends State<businessdetail> {
|
||||
fontFamily: 'Manrope',
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 13,
|
||||
fontSize: 12,
|
||||
color: Color(0xFF5C5C5C),
|
||||
),
|
||||
),
|
||||
@ -270,7 +298,7 @@ class _businessdetailState extends State<businessdetail> {
|
||||
fontFamily: 'Manrope',
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 13,
|
||||
fontSize: 12,
|
||||
color: Color(0xFF5C5C5C),
|
||||
),
|
||||
),
|
||||
@ -296,7 +324,7 @@ class _businessdetailState extends State<businessdetail> {
|
||||
fontFamily: 'Manrope',
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 13,
|
||||
fontSize: 12,
|
||||
color: Color(0xFF5C5C5C),
|
||||
),
|
||||
),
|
||||
@ -323,7 +351,7 @@ class _businessdetailState extends State<businessdetail> {
|
||||
fontFamily: 'Manrope',
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 13,
|
||||
fontSize: 12,
|
||||
color: Color(0xFF5C5C5C),
|
||||
),
|
||||
),
|
||||
@ -349,7 +377,7 @@ class _businessdetailState extends State<businessdetail> {
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 22),
|
||||
padding: const EdgeInsets.only(left: 22, right: 10),
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
@ -399,6 +427,7 @@ class _businessdetailState extends State<businessdetail> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 22),
|
||||
child: InkWell(
|
||||
@ -453,6 +482,75 @@ class _businessdetailState extends State<businessdetail> {
|
||||
],
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
for (int i = 0; i < pages.length; i++)
|
||||
Container(
|
||||
height: 8,
|
||||
width: (pageIndex == i) ? 20 : 8,
|
||||
margin: EdgeInsets.only(right: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: (pageIndex == i)
|
||||
? Colors.green
|
||||
: Colors.green.shade100,
|
||||
borderRadius: BorderRadius.circular(8)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 24),
|
||||
child: Text(
|
||||
'Photos',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Manrope',
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10),
|
||||
child: IconButton(
|
||||
icon: Icon(
|
||||
Icons.arrow_forward,
|
||||
size: 25,
|
||||
color: Color(0xFF5C5C5C),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
Container(
|
||||
height: 50,
|
||||
child: ListView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: [
|
||||
Container(
|
||||
width: 150,
|
||||
decoration: BoxDecoration(
|
||||
image: const DecorationImage(
|
||||
alignment: Alignment.centerLeft,
|
||||
image: AssetImage(
|
||||
'assets/images/offer.png',
|
||||
),
|
||||
scale: 2,
|
||||
),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user