business details UI completed

This commit is contained in:
vignesh 2022-05-23 01:04:45 +05:30
parent 88ba07bf5a
commit 0a6467afc9
10 changed files with 790 additions and 488 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

View File

@ -1,13 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_switch/flutter_switch.dart'; import 'package:flutter_switch/flutter_switch.dart';
import 'package:openclosenew/thankyou.dart';
class PageViewModel { import 'package:smooth_page_indicator/smooth_page_indicator.dart';
String title;
String body;
String image;
PageViewModel({required this.title, required this.body, required this.image});
}
class businessdetail extends StatefulWidget { class businessdetail extends StatefulWidget {
const businessdetail({Key? key}) : super(key: key); const businessdetail({Key? key}) : super(key: key);
@ -16,37 +10,22 @@ class businessdetail extends StatefulWidget {
State<businessdetail> createState() => _businessdetailState(); State<businessdetail> createState() => _businessdetailState();
} }
class _businessdetailState extends State<businessdetail> { class _businessdetailState extends State<businessdetail>
with TickerProviderStateMixin {
bool status = true; bool status = true;
int pageIndex = 0; int pageIndex = 0;
PageController pageController = PageController(); final _Controller = 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
TabController _tabController = TabController(length: 4, vsync: this);
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
body: Column( body: SafeArea(
child: SingleChildScrollView(
child: Column(
children: [ children: [
SafeArea( Container(
child: Container(
height: 500, height: 500,
child: Stack( child: Stack(
children: [ children: [
@ -147,7 +126,8 @@ class _businessdetailState extends State<businessdetail> {
padding: padding:
const EdgeInsets.only(top: 10, left: 5), const EdgeInsets.only(top: 10, left: 5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
RichText( RichText(
text: TextSpan( text: TextSpan(
@ -251,7 +231,8 @@ class _businessdetailState extends State<businessdetail> {
Row( Row(
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.only(top: 10), padding:
const EdgeInsets.only(top: 10),
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
children: [ children: [
@ -370,7 +351,6 @@ class _businessdetailState extends State<businessdetail> {
], ],
), ),
), ),
),
Container( Container(
height: 100, height: 100,
child: ListView( child: ListView(
@ -482,69 +462,381 @@ class _businessdetailState extends State<businessdetail> {
], ],
), ),
), ),
Spacer(), SmoothPageIndicator(
Row( controller: _Controller, // PageController
count: 3,
effect: ExpandingDotsEffect(
activeDotColor: Color(0xFF2AB17F),
dotColor: Colors.greenAccent,
dotWidth: 5,
dotHeight: 5),
// your preferred effect
onDotClicked: (index) {},
),
Padding(
padding: const EdgeInsets.only(
left: 15, right: 15, top: 5, bottom: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
for (int i = 0; i < pages.length; i++) Text(
Container( "Food Items",
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( style: TextStyle(
fontSize: 16,
fontFamily: 'Manrope', fontFamily: 'Manrope',
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), fontSize: 20,
color: Color(0xFF3D3D3D),
), ),
), ),
Spacer(), Spacer(),
Padding( IconButton(
padding: const EdgeInsets.only(right: 10), icon: Image.asset('assets/images/arrow-right.png'),
child: IconButton( onPressed: () {
icon: Icon( Navigator.pop(context);
Icons.arrow_forward, },
size: 25,
color: Color(0xFF5C5C5C),
),
onPressed: () {},
),
), ),
], ],
), ),
Spacer(), ),
Container( Container(
height: 50, height: 150,
child: ListView( child: ListView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
children: [ children: [
Container( Spacer(),
width: 150, Column(
children: [
Padding(
padding: const EdgeInsets.only(left: 15, right: 15),
child: Container(
width: 130,
height: 100,
decoration: BoxDecoration( decoration: BoxDecoration(
image: const DecorationImage( image: const DecorationImage(
alignment: Alignment.centerLeft, fit: BoxFit.cover,
image: AssetImage( image: AssetImage(
'assets/images/offer.png', 'assets/images/food1.png',
), ),
scale: 2,
), ),
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(10), BorderRadius.all(Radius.circular(5)),
),
),
),
Padding(
padding: const EdgeInsets.only(right: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Chicken Briyani",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: 15,
color: Color(0xFF3D3D3D),
),
),
Text(
"₹ 180.00",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: 15,
color: Color(0xFF3D3D3D),
),
),
],
),
),
],
),
Spacer(),
Column(
children: [
Padding(
padding: const EdgeInsets.only(left: 15, right: 15),
child: Container(
width: 130,
height: 100,
decoration: BoxDecoration(
image: const DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/images/food2.png',
),
),
borderRadius:
BorderRadius.all(Radius.circular(5)),
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Chicken Pepper...",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: 15,
color: Color(0xFF3D3D3D),
),
),
Text(
"₹ 360.00",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: 15,
color: Color(0xFF3D3D3D),
),
),
],
),
],
),
Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 15, right: 15),
child: Container(
width: 130,
height: 100,
decoration: BoxDecoration(
image: const DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/images/food3.png',
),
),
borderRadius:
BorderRadius.all(Radius.circular(5)),
),
),
),
Padding(
padding: const EdgeInsets.only(left: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Malai Kofta",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: 15,
color: Color(0xFF3D3D3D),
),
),
Text(
"₹ 280.00",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: 15,
color: Color(0xFF3D3D3D),
),
),
],
),
),
],
),
],
),
),
Padding(
padding: const EdgeInsets.only(left: 15, right: 15, top: 5),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Photos",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: 20,
color: Color(0xFF3D3D3D),
),
),
Spacer(),
IconButton(
icon: Image.asset('assets/images/arrow-right.png'),
onPressed: () {
Navigator.pop(context);
},
),
],
),
),
Container(
height: 150,
child: ListView(
scrollDirection: Axis.horizontal,
children: [
Spacer(),
Column(
children: [
Padding(
padding: const EdgeInsets.only(left: 15, right: 15),
child: Container(
width: 130,
height: 100,
decoration: BoxDecoration(
image: const DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/images/room1.png',
),
),
borderRadius:
BorderRadius.all(Radius.circular(5)),
),
),
),
],
),
Spacer(),
Column(
children: [
Padding(
padding: const EdgeInsets.only(left: 15, right: 15),
child: Container(
width: 130,
height: 100,
decoration: BoxDecoration(
image: const DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/images/room2.png',
),
),
borderRadius:
BorderRadius.all(Radius.circular(5)),
),
),
),
],
),
Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 15, right: 15),
child: Container(
width: 130,
height: 100,
decoration: BoxDecoration(
image: const DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/images/room3.png',
),
),
borderRadius:
BorderRadius.all(Radius.circular(5)),
),
),
),
],
),
],
),
),
Padding(
padding: const EdgeInsets.only(left: 15, right: 15, top: 5),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Services",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: 20,
color: Color(0xFF3D3D3D),
),
),
Spacer(),
IconButton(
icon: Image.asset('assets/images/arrow-right.png'),
onPressed: () {
Navigator.pop(context);
},
),
],
),
),
Align(
alignment: Alignment.centerLeft,
child: TabBar(
controller: _tabController,
labelColor: Color(0xFF3D3D3D),
isScrollable: true,
labelPadding: EdgeInsets.symmetric(horizontal: 25),
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: Color(0xFFE4E4E4),
),
tabs: [
Tab(
child: Text(
"Buffet",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: 15,
color: Color(0xFF3D3D3D),
),
),
),
Tab(
child: Text(
"Bar",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: 15,
color: Color(0xFF3D3D3D),
),
),
),
Tab(
child: Text(
"Car Parking",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: 15,
color: Color(0xFF3D3D3D),
),
),
),
Tab(
child: Text(
"Family Room",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: 15,
color: Color(0xFF3D3D3D),
), ),
), ),
), ),
@ -553,6 +845,8 @@ class _businessdetailState extends State<businessdetail> {
), ),
], ],
), ),
),
),
); );
} }
} }

View File

@ -56,7 +56,7 @@ packages:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.15.0" version: "1.16.0"
cross_file: cross_file:
dependency: transitive dependency: transitive
description: description:
@ -98,7 +98,7 @@ packages:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.3.0"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
@ -239,7 +239,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.3" version: "0.6.4"
libphonenumber: libphonenumber:
dependency: transitive dependency: transitive
description: description:
@ -288,7 +288,7 @@ packages:
name: material_color_utilities name: material_color_utilities
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.3" version: "0.1.4"
meta: meta:
dependency: transitive dependency: transitive
description: description:
@ -302,7 +302,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.0" version: "1.8.1"
path_drawing: path_drawing:
dependency: transitive dependency: transitive
description: description:
@ -455,6 +455,13 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.99" version: "0.0.99"
smooth_page_indicator:
dependency: "direct main"
description:
name: smooth_page_indicator
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0+2"
snippet_coder_utils: snippet_coder_utils:
dependency: "direct main" dependency: "direct main"
description: description:
@ -468,7 +475,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.8.2"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -503,7 +510,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.8" version: "0.4.9"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -524,7 +531,7 @@ packages:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
win32: win32:
dependency: transitive dependency: transitive
description: description:
@ -554,5 +561,5 @@ packages:
source: hosted source: hosted
version: "3.1.0" version: "3.1.0"
sdks: sdks:
dart: ">=2.16.2 <3.0.0" dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.10.0-0" flutter: ">=2.10.0-0"

View File

@ -40,6 +40,7 @@ dependencies:
shared_preferences: ^2.0.11 shared_preferences: ^2.0.11
intl_phone_number_input: ^0.7.0+2 intl_phone_number_input: ^0.7.0+2
get: ^4.5.1 get: ^4.5.1
smooth_page_indicator: ^1.0.0+2