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