BottomModalSheet & Venue details #53
@ -426,7 +426,8 @@ class MapState extends State<Map> {
|
||||
|
||||
createBottomDrawer(Venue venue) async {
|
||||
_bottomSheetIsOpen = true;
|
||||
Scaffold.of(context).showBottomSheet<void>(((context) {
|
||||
// Scaffold.of(context).showBottomSheet<void>(((context) {
|
||||
showModalBottomSheet(context: context, builder: (BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -446,7 +447,7 @@ class MapState extends State<Map> {
|
||||
),
|
||||
),
|
||||
);
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
Container bottomSheetWidgetContainer(Venue venue, BuildContext context) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:flutter_applicationdemo/Venue.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -29,13 +30,12 @@ class _VenuePageState extends State<VenuePage> {
|
||||
@override
|
||||
void initState() {
|
||||
refreshWeather();
|
||||
gatherVenueInfo();
|
||||
}
|
||||
|
||||
Future gatherVenueInfo() async {
|
||||
VenueInfo vu = VenueInfo();
|
||||
venueInfo = vu;
|
||||
venueInfo = await vu.getVenueInfo(venue.venueName);
|
||||
venueInfo = await vu.getVenueInfo(venue);
|
||||
}
|
||||
|
||||
Future refreshWeather() async {
|
||||
@ -74,12 +74,14 @@ class _VenuePageState extends State<VenuePage> {
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
return SingleChildScrollView(
|
||||
child: Expanded(
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
alignment: Alignment.center,
|
||||
child: buildPageContentColumn(),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return const CircularProgressIndicator();
|
||||
@ -102,6 +104,7 @@ class _VenuePageState extends State<VenuePage> {
|
||||
]),
|
||||
Row(children: [buildNameAndAddress(), buildWeatherInfo()]),
|
||||
AboutTheSpotTable(venueInfo: venueInfo),
|
||||
//Expanded(child: AboutTheSpotTable(venueInfo: venueInfo)),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -239,21 +242,14 @@ class ShareButton extends StatelessWidget {
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
/* Future<void> share() async {
|
||||
await FlutterShare.share(
|
||||
title: 'Share this place',
|
||||
text: 'Share this place',
|
||||
linkUrl: 'https://flutter.dev/',
|
||||
chooserTitle: 'Example Chooser Title');
|
||||
}
|
||||
*/
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
TextButton.icon(
|
||||
onPressed: () {},
|
||||
onPressed: () {shareVenue();},
|
||||
icon: const Icon(Icons.share),
|
||||
label: const Text('Share'),
|
||||
),
|
||||
@ -262,4 +258,10 @@ class ShareButton extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
void shareVenue() {
|
||||
|
||||
Share.share('Share this venue', subject: 'Subject venue');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ dependencies:
|
||||
webview_flutter: ^3.0.0
|
||||
syncfusion_flutter_sliders: ^20.1.57
|
||||
intl: ^0.17.0
|
||||
share_plus: ^4.0.4
|
||||
#Google Sign-in
|
||||
firebase_auth: ^1.1.4
|
||||
google_sign_in: ^5.0.3
|
||||
|
Loading…
x
Reference in New Issue
Block a user