Venue-Page #1

Merged
maze6343 merged 3 commits from venue-page into master 2022-05-05 15:07:13 +02:00
2 changed files with 154 additions and 6 deletions
Showing only changes of commit 9e0bb82511 - Show all commits

View File

@ -1,19 +1,166 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
Color _backgroundColor = const Color.fromARGB(255, 190, 146, 160); // Color _backgroundColor = const Color(0xffac7b84);
class VenuePage extends StatelessWidget { class VenuePage extends StatelessWidget {
final String imageLink = '';
const VenuePage({Key? key}) : super(key: key);
validateAndGetImageLink() {
if (imageLink == '') {
return 'https://live.staticflickr.com/6205/6081773215_19444220b6_b.jpg';
} else {
return imageLink;
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: const Color(0xfffceff9),
appBar: AppBar( appBar: AppBar(
title: const Text('My Venue'), title: const Text('My Venue'),
backgroundColor: const Color(0xffac7b84),
),
body: Center(
child: Container(
alignment: Alignment.center,
child: Column(children: <Widget>[
Row(
children: const [
ShareButton(),
SavePlaceButton(),
],
),
Row(children: [
Expanded(
child: Image.network(validateAndGetImageLink()),
),
]),
Row(
children: const [
Text(
'Placeholder for image',
),
],
),
const AboutTheSpotTable(),
GridView.count(
crossAxisCount: 2,
children: [],
)
]),
),
),
);
}
}
//Just an example table
class AboutTheSpotTable extends StatelessWidget {
const AboutTheSpotTable({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return DataTable(
headingRowHeight: 30,
columnSpacing: 100,
dataRowHeight: 30,
dataTextStyle: GoogleFonts.robotoCondensed(
color: const Color(0xff4F6272),
),
columns: [
DataColumn(
label: Text('About the spot',
style: GoogleFonts.roboto(
textStyle: const TextStyle(
fontSize: 18,
)))),
const DataColumn(label: Text('', style: TextStyle())),
],
rows: const [
DataRow(cells: [
DataCell(Text('Type of venue')),
DataCell(Text('Saloon')),
]),
DataRow(cells: [
DataCell(Text('Pricing')),
DataCell(Text('\$\$\$')),
]),
DataRow(cells: [
DataCell(Text('Rating')),
DataCell(Text('4.2/5')),
]),
DataRow(cells: [
DataCell(Text('Current activity')),
DataCell(Text('Moderate')),
]),
DataRow(cells: [
DataCell(Text('Opening hours')),
DataCell(Text('11:00-23:00')),
]),
],
);
}
}
// @override
// Widget build(BuildContext context) {
// return Scaffold(
// backgroundColor: const Color(0xfffceff9),
// appBar: AppBar(
// title: const Text('My Venue'),
// backgroundColor: _backgroundColor,
// ),
// body: Row(
// children: const <Widget>[
// ShareButton(),
// SavePlaceButton(),
// ],
// ));
// }
// }
class SavePlaceButton extends StatelessWidget {
const SavePlaceButton({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Expanded(
child: TextButton.icon(
onPressed: () {},
icon: const Icon(
Icons.favorite,
color: Colors.red,
),
label: const Text('Save place'),
style: TextButton.styleFrom(
primary: Color(0xff4f6272),
),
),
);
}
}
class ShareButton extends StatelessWidget {
const ShareButton({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Expanded(
child: TextButton.icon(
onPressed: () {},
icon: const Icon(Icons.share),
label: const Text('Share'),
), ),
body: const Center(
child: Text(
'Name of the Venue',
style: TextStyle(fontSize: 60),
)),
); );
} }
} }

View File

@ -39,6 +39,7 @@ dependencies:
google_maps_flutter: ^2.1.3 google_maps_flutter: ^2.1.3
flutter_native_splash: ^2.1.6 flutter_native_splash: ^2.1.6
settings_ui: ^2.0.2 settings_ui: ^2.0.2
google_fonts: ^2.3.2
flutter_native_splash: flutter_native_splash:
background_image: assets/images/outdoor.png background_image: assets/images/outdoor.png