AdamsBranch #41
Binary file not shown.
Binary file not shown.
173
ios/Podfile.lock
173
ios/Podfile.lock
@@ -1,173 +0,0 @@
|
|||||||
PODS:
|
|
||||||
- AppAuth (1.5.0):
|
|
||||||
- AppAuth/Core (= 1.5.0)
|
|
||||||
- AppAuth/ExternalUserAgent (= 1.5.0)
|
|
||||||
- AppAuth/Core (1.5.0)
|
|
||||||
- AppAuth/ExternalUserAgent (1.5.0):
|
|
||||||
- AppAuth/Core
|
|
||||||
- Firebase/Auth (8.15.0):
|
|
||||||
- Firebase/CoreOnly
|
|
||||||
- FirebaseAuth (~> 8.15.0)
|
|
||||||
- Firebase/CoreOnly (8.15.0):
|
|
||||||
- FirebaseCore (= 8.15.0)
|
|
||||||
- firebase_auth (1.4.1):
|
|
||||||
- Firebase/Auth (= 8.15.0)
|
|
||||||
- firebase_core
|
|
||||||
- Flutter
|
|
||||||
- firebase_core (1.17.0):
|
|
||||||
- Firebase/CoreOnly (= 8.15.0)
|
|
||||||
- Flutter
|
|
||||||
- FirebaseAuth (8.15.0):
|
|
||||||
- FirebaseCore (~> 8.0)
|
|
||||||
- GoogleUtilities/AppDelegateSwizzler (~> 7.7)
|
|
||||||
- GoogleUtilities/Environment (~> 7.7)
|
|
||||||
- GTMSessionFetcher/Core (~> 1.5)
|
|
||||||
- FirebaseCore (8.15.0):
|
|
||||||
- FirebaseCoreDiagnostics (~> 8.0)
|
|
||||||
- GoogleUtilities/Environment (~> 7.7)
|
|
||||||
- GoogleUtilities/Logger (~> 7.7)
|
|
||||||
- FirebaseCoreDiagnostics (8.15.0):
|
|
||||||
- GoogleDataTransport (~> 9.1)
|
|
||||||
- GoogleUtilities/Environment (~> 7.7)
|
|
||||||
- GoogleUtilities/Logger (~> 7.7)
|
|
||||||
- nanopb (~> 2.30908.0)
|
|
||||||
- Flutter (1.0.0)
|
|
||||||
- flutter_native_splash (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- geocoding (1.0.5):
|
|
||||||
- Flutter
|
|
||||||
- geolocator_apple (1.2.0):
|
|
||||||
- Flutter
|
|
||||||
- google_maps_flutter (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- GoogleMaps
|
|
||||||
- google_sign_in_ios (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- GoogleSignIn (~> 5.0)
|
|
||||||
- GoogleDataTransport (9.1.4):
|
|
||||||
- GoogleUtilities/Environment (~> 7.7)
|
|
||||||
- nanopb (< 2.30910.0, >= 2.30908.0)
|
|
||||||
- PromisesObjC (< 3.0, >= 1.2)
|
|
||||||
- GoogleMaps (4.1.0):
|
|
||||||
- GoogleMaps/Maps (= 4.1.0)
|
|
||||||
- GoogleMaps/Base (4.1.0)
|
|
||||||
- GoogleMaps/Maps (4.1.0):
|
|
||||||
- GoogleMaps/Base
|
|
||||||
- GoogleSignIn (5.0.2):
|
|
||||||
- AppAuth (~> 1.2)
|
|
||||||
- GTMAppAuth (~> 1.0)
|
|
||||||
- GTMSessionFetcher/Core (~> 1.1)
|
|
||||||
- GoogleUtilities/AppDelegateSwizzler (7.7.0):
|
|
||||||
- GoogleUtilities/Environment
|
|
||||||
- GoogleUtilities/Logger
|
|
||||||
- GoogleUtilities/Network
|
|
||||||
- GoogleUtilities/Environment (7.7.0):
|
|
||||||
- PromisesObjC (< 3.0, >= 1.2)
|
|
||||||
- GoogleUtilities/Logger (7.7.0):
|
|
||||||
- GoogleUtilities/Environment
|
|
||||||
- GoogleUtilities/Network (7.7.0):
|
|
||||||
- GoogleUtilities/Logger
|
|
||||||
- "GoogleUtilities/NSData+zlib"
|
|
||||||
- GoogleUtilities/Reachability
|
|
||||||
- "GoogleUtilities/NSData+zlib (7.7.0)"
|
|
||||||
- GoogleUtilities/Reachability (7.7.0):
|
|
||||||
- GoogleUtilities/Logger
|
|
||||||
- GTMAppAuth (1.3.0):
|
|
||||||
- AppAuth/Core (~> 1.4)
|
|
||||||
- GTMSessionFetcher/Core (~> 1.5)
|
|
||||||
- GTMSessionFetcher/Core (1.7.2)
|
|
||||||
- location (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- nanopb (2.30908.0):
|
|
||||||
- nanopb/decode (= 2.30908.0)
|
|
||||||
- nanopb/encode (= 2.30908.0)
|
|
||||||
- nanopb/decode (2.30908.0)
|
|
||||||
- nanopb/encode (2.30908.0)
|
|
||||||
- package_info_plus (0.4.5):
|
|
||||||
- Flutter
|
|
||||||
- path_provider_ios (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- PromisesObjC (2.1.0)
|
|
||||||
|
|
||||||
DEPENDENCIES:
|
|
||||||
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
|
|
||||||
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
|
||||||
- Flutter (from `Flutter`)
|
|
||||||
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
|
||||||
- geocoding (from `.symlinks/plugins/geocoding/ios`)
|
|
||||||
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
|
|
||||||
- google_maps_flutter (from `.symlinks/plugins/google_maps_flutter/ios`)
|
|
||||||
- google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/ios`)
|
|
||||||
- location (from `.symlinks/plugins/location/ios`)
|
|
||||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
|
||||||
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
|
|
||||||
|
|
||||||
SPEC REPOS:
|
|
||||||
trunk:
|
|
||||||
- AppAuth
|
|
||||||
- Firebase
|
|
||||||
- FirebaseAuth
|
|
||||||
- FirebaseCore
|
|
||||||
- FirebaseCoreDiagnostics
|
|
||||||
- GoogleDataTransport
|
|
||||||
- GoogleMaps
|
|
||||||
- GoogleSignIn
|
|
||||||
- GoogleUtilities
|
|
||||||
- GTMAppAuth
|
|
||||||
- GTMSessionFetcher
|
|
||||||
- nanopb
|
|
||||||
- PromisesObjC
|
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
|
||||||
firebase_auth:
|
|
||||||
:path: ".symlinks/plugins/firebase_auth/ios"
|
|
||||||
firebase_core:
|
|
||||||
:path: ".symlinks/plugins/firebase_core/ios"
|
|
||||||
Flutter:
|
|
||||||
:path: Flutter
|
|
||||||
flutter_native_splash:
|
|
||||||
:path: ".symlinks/plugins/flutter_native_splash/ios"
|
|
||||||
geocoding:
|
|
||||||
:path: ".symlinks/plugins/geocoding/ios"
|
|
||||||
geolocator_apple:
|
|
||||||
:path: ".symlinks/plugins/geolocator_apple/ios"
|
|
||||||
google_maps_flutter:
|
|
||||||
:path: ".symlinks/plugins/google_maps_flutter/ios"
|
|
||||||
google_sign_in_ios:
|
|
||||||
:path: ".symlinks/plugins/google_sign_in_ios/ios"
|
|
||||||
location:
|
|
||||||
:path: ".symlinks/plugins/location/ios"
|
|
||||||
package_info_plus:
|
|
||||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
|
||||||
path_provider_ios:
|
|
||||||
:path: ".symlinks/plugins/path_provider_ios/ios"
|
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
|
||||||
AppAuth: 80317d99ac7ff2801a2f18ff86b48cd315ed465d
|
|
||||||
Firebase: 5f8193dff4b5b7c5d5ef72ae54bb76c08e2b841d
|
|
||||||
firebase_auth: 09005c587c0b450a3adcaad285129f1e32713142
|
|
||||||
firebase_core: aa1b92020533f5c23955e388c347c58fd64f8627
|
|
||||||
FirebaseAuth: 3e73bf8abf4fbb40f8b421f361f4cc48ee57388c
|
|
||||||
FirebaseCore: 5743c5785c074a794d35f2fff7ecc254a91e08b1
|
|
||||||
FirebaseCoreDiagnostics: 92e07a649aeb66352b319d43bdd2ee3942af84cb
|
|
||||||
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
|
||||||
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
|
|
||||||
geocoding: 32cfcdb16d38d907caaba65e2e42ad10d38bee58
|
|
||||||
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
|
|
||||||
google_maps_flutter: c59fc576c0d0c7f4dc4bd63832c862d22d5a7c6d
|
|
||||||
google_sign_in_ios: ed71c0dbddfba8b1ea9aa210dbda695f46bf51bd
|
|
||||||
GoogleDataTransport: 5fffe35792f8b96ec8d6775f5eccd83c998d5a3b
|
|
||||||
GoogleMaps: 008e2c80e38605b56b560e8deb73d4194ff30bef
|
|
||||||
GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213
|
|
||||||
GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1
|
|
||||||
GTMAppAuth: 4d8f864896f3646f0c33baf38a28362f4c601e15
|
|
||||||
GTMSessionFetcher: 5595ec75acf5be50814f81e9189490412bad82ba
|
|
||||||
location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740
|
|
||||||
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
|
|
||||||
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
|
||||||
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
|
|
||||||
PromisesObjC: 99b6f43f9e1044bd87a95a60beff28c2c44ddb72
|
|
||||||
|
|
||||||
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
|
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
|
||||||
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_applicationdemo/BottomNavPage.dart';
|
import 'package:flutter_applicationdemo/BottomNavPage.dart';
|
||||||
import 'package:flutter_applicationdemo/login/GoogleSignInProvider.dart';
|
import 'package:flutter_applicationdemo/login/GoogleSignInProvider.dart';
|
||||||
import 'package:flutter_applicationdemo/Map.dart';
|
import 'package:flutter_applicationdemo/Map.dart';
|
||||||
|
import 'package:flutter_applicationdemo/venuePage.dart';
|
||||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
@@ -14,8 +15,11 @@ import 'package:provider/provider.dart';
|
|||||||
import 'Venue.dart';
|
import 'Venue.dart';
|
||||||
import 'globals.dart' as globals;
|
import 'globals.dart' as globals;
|
||||||
import 'Map.dart';
|
import 'Map.dart';
|
||||||
import 'package:flutter_applicationdemo/login/user.dart';
|
import 'package:flutter_applicationdemo/login/User.dart';
|
||||||
import 'HomePage.dart';
|
import 'HomePage.dart';
|
||||||
|
import 'Venue.dart';
|
||||||
|
import 'mysql.dart';
|
||||||
|
import 'globals.dart' as globals;
|
||||||
|
|
||||||
// Standard color of app
|
// Standard color of app
|
||||||
Color _backgroundColor = const Color.fromARGB(255, 190, 146, 160);
|
Color _backgroundColor = const Color.fromARGB(255, 190, 146, 160);
|
||||||
@@ -33,69 +37,119 @@ class FavoritePage extends StatefulWidget {
|
|||||||
@override
|
@override
|
||||||
_FavoritePageState createState() => _FavoritePageState();
|
_FavoritePageState createState() => _FavoritePageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FavoritePageState extends State<FavoritePage> {
|
class _FavoritePageState extends State<FavoritePage> {
|
||||||
List likedVenuesList = globals.LOGGED_IN_USER.likedVenuesList;
|
List<Venue> likedVenuesList = globals.LOGGED_IN_USER.likedVenuesList;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return DefaultTabController(
|
||||||
home: Scaffold(
|
length: 2,
|
||||||
// No appbar provided to the Scaffold, only a body with a
|
child: Scaffold(
|
||||||
// CustomScrollView.
|
appBar: AppBar(
|
||||||
body: CustomScrollView(
|
title: Text("Liked"),
|
||||||
slivers: [
|
backgroundColor: globals.BACKGROUNDCOLOR,
|
||||||
// Add the app bar to the CustomScrollView.
|
),
|
||||||
SliverAppBar(
|
body: ListView.builder(
|
||||||
// Provide a standard title.
|
itemCount: likedVenuesList.length,
|
||||||
title: Text("Liked places"),
|
itemBuilder: (BuildContext context, int index) {
|
||||||
// Allows the user to reveal the app bar if they begin scrolling
|
return Dismissible(
|
||||||
// back up the list of items.
|
key: UniqueKey(),
|
||||||
pinned: true,
|
background: buildDeleteBackground(MainAxisAlignment.start, true),
|
||||||
floating: true,
|
secondaryBackground: buildDeleteBackground(MainAxisAlignment.end, false),
|
||||||
// Make the initial height of the SliverAppBar larger than normal.
|
confirmDismiss: (DismissDirection direction) async{
|
||||||
expandedHeight: 50,
|
return await showDialog(
|
||||||
backgroundColor: const Color.fromARGB(255, 190, 146, 160),
|
context: context,
|
||||||
leading: IconButton(
|
builder: (BuildContext context){
|
||||||
icon: Icon(Icons.arrow_back),
|
return buildUnlikeConfirmation(index, context);
|
||||||
onPressed: () {
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
onDismissed: (DismissDirection direction){
|
||||||
|
removeVenueAsFavorite(likedVenuesList[index]);
|
||||||
|
setState(() {
|
||||||
|
likedVenuesList.removeAt(index);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Card(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
),
|
||||||
|
child: InkWell(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(20.0),
|
||||||
|
child: Text(likedVenuesList[index].venueName),
|
||||||
|
),
|
||||||
|
onTap: (){
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) => HomePage()),
|
MaterialPageRoute(builder: (context) => VenuePage(likedVenuesList[index])),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
// Next, create a SliverList
|
|
||||||
SliverList(
|
|
||||||
// Use a delegate to build items as they're scrolled on screen.
|
|
||||||
delegate: SliverChildBuilderDelegate(
|
|
||||||
// The builder function returns a ListTile with a title that
|
|
||||||
// displays the index of the current item.
|
|
||||||
(context, index) => ListTile(
|
|
||||||
title: Text(globals.getVenueByID(likedVenuesList[index])!.venueName.toString()),
|
|
||||||
trailing: IconButton(icon: Icon(Icons.favorite, color: Colors.red),
|
|
||||||
onPressed: (){
|
|
||||||
setState(() {
|
|
||||||
});
|
|
||||||
print("tabort");
|
|
||||||
},), onTap: (){
|
|
||||||
setState(() {
|
|
||||||
});
|
|
||||||
print("gå till venue");
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(builder: (context) => Map())
|
|
||||||
);
|
);
|
||||||
},),
|
}
|
||||||
// Builds 1000 ListTiles
|
|
||||||
childCount: likedVenuesList.length,
|
AlertDialog buildUnlikeConfirmation(int index, BuildContext context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: Text("Delete confirmation"),
|
||||||
|
content: Text("Are you sure you want to unlike ${likedVenuesList[index].venueName}?"),
|
||||||
|
actions: <Widget>[
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(true),
|
||||||
|
child: const Text("Delete")
|
||||||
),
|
),
|
||||||
|
TextButton(onPressed: () => Navigator.of(context).pop(false),
|
||||||
|
child: const Text("Cancel")
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Container buildDeleteBackground(MainAxisAlignment maa, bool heartAtStart) {
|
||||||
|
return Container(
|
||||||
|
color: Colors.red,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(15),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: maa,
|
||||||
|
children: setHeartAtBeginning(heartAtStart),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<Widget> setHeartAtBeginning(bool heartAtStart) {
|
||||||
|
if(heartAtStart){
|
||||||
|
return <Widget>[
|
||||||
|
const Icon(Icons.heart_broken, color: Colors.white),
|
||||||
|
Text("Remove liked venue", style: TextStyle(color: Colors.white)),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return <Widget>[
|
||||||
|
const Text("Remove liked venue", style: TextStyle(color: Colors.white)),
|
||||||
|
Icon(Icons.heart_broken, color: Colors.white),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
void removeVenueAsFavorite(Venue likedVenue) {
|
||||||
|
var db = mysql();
|
||||||
|
db.getConnection().then((conn){
|
||||||
|
String sql =
|
||||||
|
"DELETE from maen0574.userFavorites where user_id = '${globals.LOGGED_IN_USER.userID}' and venue_id = '${likedVenue.venueID}'";
|
||||||
|
conn.query(sql).then((results) {
|
||||||
|
for (var row in results) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ Color _colorContainerHappy = _backgroundColor;
|
|||||||
Color _colorContainerMediumHappy = _backgroundColor;
|
Color _colorContainerMediumHappy = _backgroundColor;
|
||||||
Color _colorContainerUpset = _backgroundColor;
|
Color _colorContainerUpset = _backgroundColor;
|
||||||
|
|
||||||
var timestamp;
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, bool> _satisfactionBoolean = {
|
Map<String, bool> _satisfactionBoolean = {
|
||||||
"VeryHappy": false,
|
"VeryHappy": false,
|
||||||
@@ -54,14 +52,13 @@ class FormForFeedbackState extends State<FormForFeedback> {
|
|||||||
var dataBase = mysql();
|
var dataBase = mysql();
|
||||||
|
|
||||||
|
|
||||||
Future<void> feedbackVerification(String satisfaction, String typeOfFeedback, String writtenFeedback, String timestamp ) async {
|
Future<void> feedbackVerification(String satisfaction, String typeOfFeedback, String writtenFeedback) async {
|
||||||
await dataBase.getConnection().then((conn) async {
|
await dataBase.getConnection().then((conn) async {
|
||||||
String sql = "INSERT INTO maen0574.User_feedback (id, Satisfaction, Type_of_feedback, Written_feedback, timestamp) VALUES (null, '$satisfaction', '$typeOfFeedback', '$writtenFeedback', '$timestamp);";
|
String sql = "INSERT INTO maen0574.User_feedback (Satisfaction, Type_of_feedback, Written_feedback) VALUES ('$satisfaction', '$typeOfFeedback', '$writtenFeedback');";
|
||||||
await conn.query(sql).then((results) {
|
await conn.query(sql).then((results) {
|
||||||
for(var row in results) {
|
for(var row in results) {
|
||||||
print(row[0].toString());
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
form(row[0].toString(), row[1].toString(), row[2].toString(), row[3]);
|
form(row[0].toString(), row[1].toString(), row[2].toString(), row[3].toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -339,31 +336,48 @@ class FormForFeedbackState extends State<FormForFeedback> {
|
|||||||
InkWell(
|
InkWell(
|
||||||
|
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
print(writtenFeedback.text);
|
||||||
if(writtenFeedback.text.contains("'")) {
|
if (writtenFeedback.text.contains("'")) {
|
||||||
print('not allowed to use atrophies');
|
print('not allowed to use atrophies');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
timestamp = DateTime.now().millisecondsSinceEpoch.toString();
|
await feedbackVerification(satisfaction.text, typeOfFeedback.text, writtenFeedback.text);
|
||||||
await feedbackVerification(satisfaction.text, typeOfFeedback.text, writtenFeedback.text, timestamp);
|
|
||||||
if (_formKey.currentState!.validate()) {
|
|
||||||
|
|
||||||
print(satisfaction.text);
|
print(satisfaction.text);
|
||||||
print(typeOfFeedback.text);
|
print(typeOfFeedback.text);
|
||||||
print(writtenFeedback.text);
|
print(writtenFeedback.text);
|
||||||
print(timestamp);
|
|
||||||
|
|
||||||
|
//pop-up thank you for answering
|
||||||
|
|
||||||
|
showDialog<String>(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) =>
|
||||||
|
AlertDialog(
|
||||||
|
title: const Text('Thank you'),
|
||||||
|
content: const Text('Thank you for your feedback, '
|
||||||
|
'you will now be sent back to the map'),
|
||||||
|
actions: <Widget>[
|
||||||
|
TextButton(
|
||||||
|
child: const Text('Ok'),
|
||||||
|
onPressed: () =>
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) =>
|
MaterialPageRoute(builder: (context) =>
|
||||||
BottomNavPage()), //Replace Container() with call to account-page.
|
BottomNavPage()),
|
||||||
|
//Replace Container() with call to account-page.
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
pressedEmojiColor("clear");
|
||||||
|
pressedTypeOfFeedback("clear");
|
||||||
|
writtenFeedback.text = '';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
child: Container(
|
child: Container(
|
||||||
color: _colorContainerHappy,
|
color: Colors.purple,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: const <Widget>[
|
children: const <Widget>[
|
||||||
@@ -383,13 +397,9 @@ class FormForFeedbackState extends State<FormForFeedback> {
|
|||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -441,6 +451,17 @@ void pressedEmojiColor (String s) {
|
|||||||
_satisfactionBoolean["Upset"] == false;
|
_satisfactionBoolean["Upset"] == false;
|
||||||
_colorContainerUpset = _backgroundColor;
|
_colorContainerUpset = _backgroundColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(s == "clear"){
|
||||||
|
_satisfactionBoolean["VeryHappy"] = false;
|
||||||
|
_colorContainerVeryHappy = _backgroundColor;
|
||||||
|
_satisfactionBoolean["MediumHappy"] == false;
|
||||||
|
_colorContainerMediumHappy = _backgroundColor;
|
||||||
|
_satisfactionBoolean["Happy"] == false;
|
||||||
|
_colorContainerHappy = _backgroundColor;
|
||||||
|
_satisfactionBoolean["Upset"] == false;
|
||||||
|
_colorContainerUpset = _backgroundColor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void pressedTypeOfFeedback(String s) {
|
void pressedTypeOfFeedback(String s) {
|
||||||
@@ -487,4 +508,15 @@ void pressedTypeOfFeedback(String s) {
|
|||||||
_typeOfFeedback["Compliment"] == false;
|
_typeOfFeedback["Compliment"] == false;
|
||||||
check1 = false;
|
check1 = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s == "clear") {
|
||||||
|
_typeOfFeedback["Mistake in sun accuracy"] == false;
|
||||||
|
check4 = false;
|
||||||
|
_typeOfFeedback["Complaint"] == false;
|
||||||
|
check2 = false;
|
||||||
|
_typeOfFeedback["Bug"] == false;
|
||||||
|
check3 = false;
|
||||||
|
_typeOfFeedback["Compliment"] == false;
|
||||||
|
check1 = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,10 @@ class form {
|
|||||||
late String satisfaction;
|
late String satisfaction;
|
||||||
late String typeOfFeedback;
|
late String typeOfFeedback;
|
||||||
late String writtenFeedback;
|
late String writtenFeedback;
|
||||||
late String timestamp;
|
|
||||||
|
|
||||||
form(String satisfaction, String typeOfFeedback, String writtenFeedback, String timestamp){
|
form(String satisfaction, String typeOfFeedback, String writtenFeedback, String timestamp){
|
||||||
this.satisfaction = satisfaction;
|
this.satisfaction = satisfaction;
|
||||||
this.typeOfFeedback = typeOfFeedback;
|
this.typeOfFeedback = typeOfFeedback;
|
||||||
this.writtenFeedback = writtenFeedback;
|
this.writtenFeedback = writtenFeedback;
|
||||||
this.timestamp = timestamp;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,11 @@ import 'package:google_fonts/google_fonts.dart';
|
|||||||
import 'BottomNavPage.dart';
|
import 'BottomNavPage.dart';
|
||||||
import 'login/CreateAccountPage.dart';
|
import 'login/CreateAccountPage.dart';
|
||||||
import 'globals.dart';
|
import 'globals.dart';
|
||||||
|
import 'login/User.dart';
|
||||||
import 'login/signInPage.dart';
|
import 'login/signInPage.dart';
|
||||||
|
import '../login/User.dart';
|
||||||
|
import 'mysql.dart';
|
||||||
|
import 'package:flutter_applicationdemo/login/User.dart' as User;
|
||||||
import 'login/user.dart';
|
import 'login/user.dart';
|
||||||
import 'globals.dart' as globals;
|
import 'globals.dart' as globals;
|
||||||
|
|
||||||
@@ -45,7 +49,6 @@ class _HomePageState extends State<HomePage> {
|
|||||||
color: globals.TEXTCOLOR,
|
color: globals.TEXTCOLOR,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.fromLTRB(80, 40, 80, 80),
|
padding: EdgeInsets.fromLTRB(80, 40, 80, 80),
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
@@ -156,7 +159,7 @@ class _HomePageState extends State<HomePage> {
|
|||||||
elevation: 100,
|
elevation: 100,
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
globals.LOGGED_IN_USER = user(0, "", "");
|
globals.LOGGED_IN_USER = User.User(0, "", "");
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) => HomePage()), //Replace Container() with call to Map-page.
|
MaterialPageRoute(builder: (context) => HomePage()), //Replace Container() with call to Map-page.
|
||||||
|
|||||||
276
lib/Map.dart
276
lib/Map.dart
@@ -1,15 +1,21 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_applicationdemo/WebScraper.dart';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
import 'package:flutter_google_places/flutter_google_places.dart';
|
import 'package:flutter_google_places/flutter_google_places.dart';
|
||||||
//import 'package:google_maps_webservice/places.dart';
|
|
||||||
import 'package:google_api_headers/google_api_headers.dart';
|
import 'package:google_api_headers/google_api_headers.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:location/location.dart';
|
import 'package:location/location.dart';
|
||||||
import 'package:geolocator/geolocator.dart';
|
import 'package:geolocator/geolocator.dart';
|
||||||
|
|
||||||
|
import 'package:flutter_applicationdemo/login/User.dart';
|
||||||
import 'SettingsPage.dart';
|
import 'SettingsPage.dart';
|
||||||
|
import 'Venue.dart';
|
||||||
|
import 'globals.dart' as globals;
|
||||||
|
|
||||||
|
import 'globals.dart' as globals;
|
||||||
|
|
||||||
class Map extends StatefulWidget {
|
class Map extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
@@ -20,8 +26,6 @@ const kGoogleApiKey = "AIzaSyAUmhd6Xxud8SwgDxJ4LlYlcntm01FGoSk";
|
|||||||
|
|
||||||
final homeSacffoldKey = GlobalKey<ScaffoldState>();
|
final homeSacffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
List<_Marker> markers = [];
|
|
||||||
|
|
||||||
class MapState extends State<Map> {
|
class MapState extends State<Map> {
|
||||||
Future getMerkerData() async {
|
Future getMerkerData() async {
|
||||||
var url = Uri.parse(
|
var url = Uri.parse(
|
||||||
@@ -31,52 +35,6 @@ class MapState extends State<Map> {
|
|||||||
print('Response status: ${response.statusCode}');
|
print('Response status: ${response.statusCode}');
|
||||||
// print('Response body: ${response.body.toString()}');
|
// print('Response body: ${response.body.toString()}');
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
|
|
||||||
/* print(jsonData['features'][0]);
|
|
||||||
|
|
||||||
print(jsonData['features'][1]['properties']['Plats_1']);
|
|
||||||
|
|
||||||
print(jsonData['features'][0]['properties']['Gatunr_1']);
|
|
||||||
|
|
||||||
print(jsonData['features'][0]['properties']['Kategorityp']);
|
|
||||||
|
|
||||||
/*String data = jsonData['features'][0]['properties']['Kategorityp'];
|
|
||||||
print(data.contains('Tillfälliga bostäder'));*/
|
|
||||||
|
|
||||||
|
|
||||||
print(jsonData['features'][1]['geometry']['coordinates']);*/
|
|
||||||
|
|
||||||
//print(jsonData['features'][0]['properties']['MAIN_ATTRIBUTE_VALUE']);
|
|
||||||
|
|
||||||
// List<_Marker> markers = [];
|
|
||||||
|
|
||||||
for (var m in jsonData['features']) {
|
|
||||||
String data = m['properties']['Kategorityp'];
|
|
||||||
String typ = m['properties']['MAIN_ATTRIBUTE_VALUE'];
|
|
||||||
if (m['properties']['Kategorityp'] == "1.400I, Uteservering A-läge") {
|
|
||||||
print(m['properties']['Kategorityp']);
|
|
||||||
_Marker marker = _Marker(m['properties']['Plats_1'],
|
|
||||||
m['properties']['Gatunr_1'], m['geometry']['coordinates']);
|
|
||||||
markers.add(marker);
|
|
||||||
}
|
|
||||||
|
|
||||||
print(markers.length);
|
|
||||||
|
|
||||||
int count = 0;
|
|
||||||
for (var mar in markers) {
|
|
||||||
print(mar.Plats_1);
|
|
||||||
print(mar.Gatunr_1);
|
|
||||||
print(mar.coordinates[1]);
|
|
||||||
print(mar.coordinates[0]);
|
|
||||||
count++;
|
|
||||||
print(count);
|
|
||||||
if (count == 100) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//print(m['properties']['Kategorityp']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final Completer<GoogleMapController> _controller = Completer();
|
final Completer<GoogleMapController> _controller = Completer();
|
||||||
@@ -92,12 +50,14 @@ class MapState extends State<Map> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
intilize();
|
initialize();
|
||||||
_getUserLocation();
|
//_getUserLocation();
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
void createBottomSheet() {
|
void createBottomSheet(String venueName) async {
|
||||||
|
var webScraper = WebScraper();
|
||||||
|
await webScraper.getWebsiteData(venueName);
|
||||||
Scaffold.of(context).showBottomSheet<void>(((context) {
|
Scaffold.of(context).showBottomSheet<void>(((context) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 420,
|
height: 420,
|
||||||
@@ -106,146 +66,31 @@ class MapState extends State<Map> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: const <Widget>[
|
children: <Widget>[
|
||||||
/*const Text('BottomSheet'),
|
/*const Text('BottomSheet'),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
child: const Text('Close BottomSheet'),
|
child: const Text('Close BottomSheet'),
|
||||||
onPressed: () {Navigator.pop(context);})*/
|
onPressed: () {Navigator.pop(context);})*/
|
||||||
Image(image: AssetImage('assets/images/bild.png'))
|
Container(
|
||||||
|
child: Text(webScraper.openingHoursThisWeek.length.toString()),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
intilize() {
|
initialize() {
|
||||||
Marker marker_1;
|
List<Venue> allVenues = globals.VENUES;
|
||||||
//for(var marker in markers) {
|
for (var venue in allVenues) {
|
||||||
marker_1 = Marker(
|
Marker marker = Marker(
|
||||||
markerId: const MarkerId('id_1'),
|
markerId: MarkerId(venue.venueID.toString()),
|
||||||
onTap: createBottomSheet,
|
position: venue.position,
|
||||||
position: const LatLng(59.320671571444514, 18.055854162299937),
|
onTap: () => createBottomSheet(venue.venueName),
|
||||||
infoWindow: const InfoWindow(
|
icon: venue.drawIconColor(),
|
||||||
title: 'Münchenbryggeriet Beer Garden',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
),
|
|
||||||
icon: BitmapDescriptor.defaultMarkerWithHue(
|
|
||||||
BitmapDescriptor.hueGreen,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
markersList.add(marker);
|
||||||
Marker marker_2 = Marker(
|
}
|
||||||
markerId: const MarkerId('id_2'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.33115735285231, 18.074432570090742),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'Le Hibou',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
Marker marker_3 = Marker(
|
|
||||||
markerId: const MarkerId('id_3'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.3315552932853, 18.092751076985277),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'Strandbryggan',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
Marker marker_4 = Marker(
|
|
||||||
markerId: const MarkerId('id_4'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.33632582609118, 18.072980646196587),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'Stureplan 1',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
Marker marker_5 = Marker(
|
|
||||||
markerId: const MarkerId('id_5'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.3240158318325, 18.070690101341437),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'Bågspännaren Bar & Cafe',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
Marker marker_6 = Marker(
|
|
||||||
markerId: const MarkerId('id_6'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.31905195030728, 18.075349015415547),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'Mosebacketerrassen',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
Marker marker_7 = Marker(
|
|
||||||
markerId: const MarkerId('id_7'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.31583756143469, 18.072591381467536),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'Snaps Bar & Bistro',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
Marker marker_8 = Marker(
|
|
||||||
markerId: const MarkerId('id_8'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.315129508641505, 18.074243159987006),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'Kvarnen',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
Marker marker_9 = Marker(
|
|
||||||
markerId: const MarkerId('id_9'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.31533181094423, 18.070972638518455),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'Neverland Pub & Restaurang',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
Marker marker_10 = Marker(
|
|
||||||
markerId: const MarkerId('id_10'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.31578389646754, 18.071146819010995),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'Baras Imperium',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
Marker marker_11 = Marker(
|
|
||||||
markerId: const MarkerId('id_11'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.31549103673382, 18.035425964557245),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'YUC Tanto',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
Marker marker_12 = Marker(
|
|
||||||
markerId: const MarkerId('id_12'),
|
|
||||||
onTap: createBottomSheet,
|
|
||||||
position: const LatLng(59.314826329005506, 18.03317611771755),
|
|
||||||
infoWindow: const InfoWindow(
|
|
||||||
title: 'Loopen',
|
|
||||||
snippet: 'Uteservering',
|
|
||||||
));
|
|
||||||
|
|
||||||
markersList.add(marker_1);
|
|
||||||
markersList.add(marker_2);
|
|
||||||
markersList.add(marker_3);
|
|
||||||
markersList.add(marker_4);
|
|
||||||
markersList.add(marker_5);
|
|
||||||
markersList.add(marker_6);
|
|
||||||
markersList.add(marker_7);
|
|
||||||
markersList.add(marker_8);
|
|
||||||
markersList.add(marker_9);
|
|
||||||
markersList.add(marker_10);
|
|
||||||
markersList.add(marker_11);
|
|
||||||
markersList.add(marker_12);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<LocationData> _getLocationPermission() async {
|
Future<LocationData> _getLocationPermission() async {
|
||||||
@@ -328,8 +173,6 @@ class MapState extends State<Map> {
|
|||||||
Icons.attach_money_outlined,
|
Icons.attach_money_outlined,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -356,48 +199,6 @@ class MapState extends State<Map> {
|
|||||||
_controller.complete(controller);
|
_controller.complete(controller);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Align(
|
|
||||||
alignment: Alignment.bottomLeft,
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 20.0),
|
|
||||||
height: 250.0,
|
|
||||||
child: ListView(
|
|
||||||
scrollDirection: Axis.horizontal,
|
|
||||||
children: <Widget>[
|
|
||||||
SizedBox(width: 10.0),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: _boxes(59.320671571444514, 18.055854162299937,
|
|
||||||
'Münchenbryggeriet Beer Garden'),
|
|
||||||
),
|
|
||||||
SizedBox(width: 10.0),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: _boxes(
|
|
||||||
59.33115735285231, 18.074432570090742, 'Le Hibou'),
|
|
||||||
),
|
|
||||||
SizedBox(width: 10.0),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: _boxes(
|
|
||||||
59.3315552932853, 18.092751076985277, 'Strandbryggan'),
|
|
||||||
),
|
|
||||||
SizedBox(width: 10.0),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: _boxes(
|
|
||||||
59.33632582609118, 18.072980646196587, 'Stureplan 1'),
|
|
||||||
),
|
|
||||||
SizedBox(width: 10.0),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: _boxes(59.3240158318325, 18.070690101341437,
|
|
||||||
'Bågspännaren Bar & Cafe'),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
// ElevatedButton(onPressed: () {} //_handelPressButton
|
// ElevatedButton(onPressed: () {} //_handelPressButton
|
||||||
// ,child: const Text("Search Placses"))
|
// ,child: const Text("Search Placses"))
|
||||||
],
|
],
|
||||||
@@ -446,27 +247,20 @@ class MapState extends State<Map> {
|
|||||||
height: 200,
|
height: 200,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: new BorderRadius.circular(24.0),
|
borderRadius: new BorderRadius.circular(24.0),
|
||||||
child:
|
child: const Image(
|
||||||
const Image(image: AssetImage('assets/images/bild.png')),
|
image: AssetImage('assets/images/bild.png')),
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Text(resturantName),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
]),
|
||||||
)),
|
)),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _goToCurrentPosition(LatLng latlng) async {
|
Future<void> _goToCurrentPosition(LatLng latlng) async {
|
||||||
final GoogleMapController controller = await _controller.future;
|
final GoogleMapController controller = await _controller.future;
|
||||||
controller.animateCamera(CameraUpdate.newCameraPosition(CameraPosition(
|
controller.animateCamera(CameraUpdate.newCameraPosition(CameraPosition(
|
||||||
bearing: 192.8334901395799,
|
bearing: 0,
|
||||||
target: LatLng(latlng.latitude, latlng.longitude),
|
target: LatLng(latlng.latitude, latlng.longitude),
|
||||||
//tilt: 59.440717697143555,
|
//tilt: 59.440717697143555,
|
||||||
zoom: 14.4746)));
|
zoom: 14.4746)));
|
||||||
@@ -511,11 +305,3 @@ class MapState extends State<Map> {
|
|||||||
googleMapController.animateCamera(CameraUpdate.newLatLngZoom(LatLng(lat,lng), 14.0));
|
googleMapController.animateCamera(CameraUpdate.newLatLngZoom(LatLng(lat,lng), 14.0));
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
class _Marker {
|
|
||||||
var Plats_1;
|
|
||||||
var Gatunr_1;
|
|
||||||
var coordinates;
|
|
||||||
|
|
||||||
_Marker(this.Plats_1, this.Gatunr_1, this.coordinates);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -9,15 +9,15 @@ class ShadowDetector {
|
|||||||
|
|
||||||
List<Venue> venuesInShade = [];
|
List<Venue> venuesInShade = [];
|
||||||
|
|
||||||
ShadowDetector(Venue venue) {
|
ShadowDetector() {
|
||||||
evaluateShadowsForOneVenue(venue);
|
|
||||||
}
|
}
|
||||||
//Called like "new ShadowDetector.fromShadowDetector(List of venues here);"
|
//Called like "new ShadowDetector.fromShadowDetector(List of venues here);"
|
||||||
ShadowDetector.fromShadowDetector(venues) {
|
ShadowDetector.fromShadowDetector(venues) {
|
||||||
evaluateShadowsForAllVenues(venues);
|
evaluateShadowsForAllVenues(venues);
|
||||||
}
|
}
|
||||||
|
|
||||||
void evaluateShadowsForAllVenues (List<Venue> venues) async {
|
Future evaluateShadowsForAllVenues (List<Venue> venues) async {
|
||||||
final dateInMilliseconds = DateTime.now().millisecondsSinceEpoch.toString() + 't';
|
final dateInMilliseconds = DateTime.now().millisecondsSinceEpoch.toString() + 't';
|
||||||
for(var venue in venues) {
|
for(var venue in venues) {
|
||||||
LatLng pos = venue.position;
|
LatLng pos = venue.position;
|
||||||
@@ -50,5 +50,8 @@ class ShadowDetector {
|
|||||||
if(responseAsString[responseAsString.length - 2] == 1) {
|
if(responseAsString[responseAsString.length - 2] == 1) {
|
||||||
venue.inShade = true;
|
venue.inShade = true;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
venue.inShade = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,8 +11,21 @@ class Venue {
|
|||||||
|
|
||||||
Venue(this.venueName,
|
Venue(this.venueName,
|
||||||
this.venueID, this.typeOfVenue, this.position);
|
this.venueID, this.typeOfVenue, this.position);
|
||||||
|
|
||||||
|
BitmapDescriptor drawIconColor() {
|
||||||
|
if(inShade) {
|
||||||
|
return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueAzure);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueYellow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum VenueType{
|
enum VenueType{
|
||||||
cafe, restaurant, bar
|
cafe, restaurant, bar
|
||||||
}
|
}
|
||||||
@@ -7,14 +7,15 @@ class WebScraper {
|
|||||||
late List<String> openingHoursThisWeek;
|
late List<String> openingHoursThisWeek;
|
||||||
late String openingHoursToday;
|
late String openingHoursToday;
|
||||||
late String reviewScore;
|
late String reviewScore;
|
||||||
late String priceClass;
|
//late String priceClass;
|
||||||
|
|
||||||
|
WebScraper() { //Must provide an URL from bing search engine.
|
||||||
|
|
||||||
WebScraper(String bingURL) { //Must provide an URL from bing search engine.
|
|
||||||
getWebsiteData(bingURL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future getWebsiteData(String bingURL) async {
|
Future getWebsiteData(String venueName) async {
|
||||||
final bingResponse = await http.get(Uri.parse(bingURL));
|
final bingURL = Uri.parse('https://www.bing.com/search?q=$venueName');
|
||||||
|
final bingResponse = await http.get(bingURL);
|
||||||
dom.Document htmlBing = dom.Document.html(bingResponse.body);
|
dom.Document htmlBing = dom.Document.html(bingResponse.body);
|
||||||
|
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ class WebScraper {
|
|||||||
.toList()[0]
|
.toList()[0]
|
||||||
.toString();
|
.toString();
|
||||||
|
|
||||||
final tripAdvisorURL = htmlBing.querySelectorAll('div.infoModule.b_divsec.topBleed.noSeparator > div > a')
|
/* final tripAdvisorURL = htmlBing.querySelectorAll('div.infoModule.b_divsec.topBleed.noSeparator > div > a')
|
||||||
.map((e) => e.attributes['href'])
|
.map((e) => e.attributes['href'])
|
||||||
.toList()[0]
|
.toList()[0]
|
||||||
.toString();
|
.toString();
|
||||||
@@ -46,7 +47,7 @@ class WebScraper {
|
|||||||
.getElementsByClassName('drUyy')
|
.getElementsByClassName('drUyy')
|
||||||
.map((e) => e.text)
|
.map((e) => e.text)
|
||||||
.toList()[0]
|
.toList()[0]
|
||||||
.toString();
|
.toString();*/
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> get getOpeningHoursThisWeek => openingHoursThisWeek; //First item is monday, last item is sunday.
|
List<String> get getOpeningHoursThisWeek => openingHoursThisWeek; //First item is monday, last item is sunday.
|
||||||
@@ -54,6 +55,6 @@ class WebScraper {
|
|||||||
|
|
||||||
String get getOpeningHoursToday => openingHoursToday; //Output example: "Open · Closes 01:00" (Gets automatically updated).
|
String get getOpeningHoursToday => openingHoursToday; //Output example: "Open · Closes 01:00" (Gets automatically updated).
|
||||||
String get getReviewScore => reviewScore; // Output example: "Star Rating: 4 out of 5.".
|
String get getReviewScore => reviewScore; // Output example: "Star Rating: 4 out of 5.".
|
||||||
String get getPriceClass => priceClass; // Output example: "$$ - $$$".
|
//String get getPriceClass => priceClass; // Output example: "$$ - $$$".
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,16 @@
|
|||||||
import 'Venue.dart';
|
import 'Venue.dart';
|
||||||
import 'package:flutter_applicationdemo/login/user.dart';
|
import 'package:flutter_applicationdemo/login/User.dart';
|
||||||
import '../login/user.dart';
|
import '../login/User.dart';
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'HomePage.dart';
|
import 'HomePage.dart';
|
||||||
|
import 'Venue.dart';
|
||||||
|
import 'Venue.dart';
|
||||||
import 'main.dart';
|
import 'main.dart';
|
||||||
|
|
||||||
user LOGGED_IN_USER = user(0, "", "");
|
User LOGGED_IN_USER = User(0, "", "");
|
||||||
Color BACKGROUNDCOLOR = const Color.fromARGB(255, 190, 146, 160);
|
Color BACKGROUNDCOLOR = const Color.fromARGB(255, 190, 146, 160);
|
||||||
Color ITEMCOLOR = const Color.fromARGB(255, 0, 0, 0);
|
Color ITEMCOLOR = const Color.fromARGB(255, 0, 0, 0);
|
||||||
Color BUTTONCOLOR = const Color.fromARGB(204, 172, 123, 132);
|
Color BUTTONCOLOR = const Color.fromARGB(204, 172, 123, 132);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import 'package:flutter_applicationdemo/mysql.dart';
|
|||||||
import 'package:flutter_applicationdemo/HomePage.dart';
|
import 'package:flutter_applicationdemo/HomePage.dart';
|
||||||
import '../globals.dart' as globals;
|
import '../globals.dart' as globals;
|
||||||
import '../reusables/InputField.dart';
|
import '../reusables/InputField.dart';
|
||||||
import 'user.dart';
|
import 'User.dart';
|
||||||
import '../reusables/returnButton.dart';
|
import '../reusables/returnButton.dart';
|
||||||
|
|
||||||
class CreateAccountPage extends StatefulWidget {
|
class CreateAccountPage extends StatefulWidget {
|
||||||
@@ -22,7 +22,7 @@ class _CreateAccountPageState extends State<CreateAccountPage> {
|
|||||||
TextEditingController passwordController = TextEditingController();
|
TextEditingController passwordController = TextEditingController();
|
||||||
TextEditingController userNameController = TextEditingController();
|
TextEditingController userNameController = TextEditingController();
|
||||||
var db = mysql();
|
var db = mysql();
|
||||||
late user loggedInUser;
|
late User loggedInUser;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -150,7 +150,7 @@ class _CreateAccountPageState extends State<CreateAccountPage> {
|
|||||||
await conn.query(sql).then((results) {
|
await conn.query(sql).then((results) {
|
||||||
for (var row in results) {
|
for (var row in results) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
loggedInUser = new user(row[0], row[1], row[2]);
|
loggedInUser = new User(row[0], row[1], row[2]);
|
||||||
globals.LOGGED_IN_USER.userID = loggedInUser.userID;
|
globals.LOGGED_IN_USER.userID = loggedInUser.userID;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,23 +1,21 @@
|
|||||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
|
||||||
import 'package:flutter_applicationdemo/Venue.dart';
|
import 'package:flutter_applicationdemo/Venue.dart';
|
||||||
import 'package:flutter_applicationdemo/mysql.dart';
|
import 'package:flutter_applicationdemo/mysql.dart';
|
||||||
|
import 'package:flutter_applicationdemo/globals.dart' as globals;
|
||||||
|
|
||||||
class user{
|
|
||||||
|
class User{
|
||||||
late int userID;
|
late int userID;
|
||||||
late String username;
|
late String username;
|
||||||
late String email;
|
late String email;
|
||||||
late List<int> likedVenuesList;
|
late List<Venue> likedVenuesList;
|
||||||
|
|
||||||
user(int userID, String username, String email){
|
User(this.userID, this.username, this.email){
|
||||||
this.userID = userID;
|
|
||||||
this.username = username;
|
|
||||||
this.email = email;
|
|
||||||
likedVenuesList = List.empty(growable: true);
|
likedVenuesList = List.empty(growable: true);
|
||||||
getFavoriteVenues();
|
getFavoriteVenues();
|
||||||
}
|
}
|
||||||
|
|
||||||
user emptyUser(){
|
User emptyUser(){
|
||||||
return user(0, "", "");
|
return User(0, "", "");
|
||||||
}
|
}
|
||||||
int getID(){
|
int getID(){
|
||||||
return userID;
|
return userID;
|
||||||
@@ -29,9 +27,15 @@ class user{
|
|||||||
String sql = "select venue_id from maen0574.userFavorites where user_id = '$userID'";
|
String sql = "select venue_id from maen0574.userFavorites where user_id = '$userID'";
|
||||||
await conn.query(sql).then((results){
|
await conn.query(sql).then((results){
|
||||||
for(var row in results){
|
for(var row in results){
|
||||||
likedVenuesList.add(row[0]);
|
Venue? venue = globals.getVenueByID(row[0]);
|
||||||
|
if(venue != null){
|
||||||
|
likedVenuesList.add(venue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
for(Venue venue in likedVenuesList){
|
||||||
|
print(venue.venueName);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
import '../mysql.dart';
|
import '../mysql.dart';
|
||||||
import '../HomePage.dart';
|
import '../HomePage.dart';
|
||||||
import '../main.dart';
|
import '../main.dart';
|
||||||
import 'user.dart';
|
import 'User.dart';
|
||||||
import '../reusables/InputField.dart';
|
import '../reusables/InputField.dart';
|
||||||
import '../reusables/returnButton.dart';
|
import '../reusables/returnButton.dart';
|
||||||
import 'package:flutter_signin_button/flutter_signin_button.dart';
|
import 'package:flutter_signin_button/flutter_signin_button.dart';
|
||||||
@@ -20,8 +20,7 @@ class SignInPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _SignInPageState extends State<SignInPage> {
|
class _SignInPageState extends State<SignInPage> {
|
||||||
var db = mysql();
|
var db = mysql();
|
||||||
int loggedInID = 0;
|
late User loggedInUser;
|
||||||
late user loggedInUser;
|
|
||||||
TextEditingController emailController = TextEditingController();
|
TextEditingController emailController = TextEditingController();
|
||||||
TextEditingController passwordController = TextEditingController();
|
TextEditingController passwordController = TextEditingController();
|
||||||
|
|
||||||
@@ -32,8 +31,8 @@ class _SignInPageState extends State<SignInPage> {
|
|||||||
await conn.query(sql).then((results) {
|
await conn.query(sql).then((results) {
|
||||||
for (var row in results) {
|
for (var row in results) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
loggedInUser = new user(row[0], row[1], row[2]);
|
loggedInUser = new User(row[0], row[1], row[2]);
|
||||||
loggedInID = loggedInUser.getID();
|
globals.LOGGED_IN_USER = loggedInUser;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -141,11 +140,12 @@ class _SignInPageState extends State<SignInPage> {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (emailController.text.contains("'") ||
|
if (emailController.text.contains("'") ||
|
||||||
passwordController.text.contains("'")) {
|
passwordController.text.contains("'")) {
|
||||||
|
print("1");
|
||||||
loginError();
|
loginError();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await loginVerification(emailController.text, passwordController.text);
|
await loginVerification(emailController.text, passwordController.text);
|
||||||
if (loggedInID != 0) {
|
if (globals.LOGGED_IN_USER.userID != 0) {
|
||||||
globals.LOGGED_IN_USER = loggedInUser;
|
globals.LOGGED_IN_USER = loggedInUser;
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -154,6 +154,7 @@ class _SignInPageState extends State<SignInPage> {
|
|||||||
HomePage()), //Replace Container() with call to account-page.
|
HomePage()), //Replace Container() with call to account-page.
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
print(globals.LOGGED_IN_USER.userID);
|
||||||
loginError();
|
loginError();
|
||||||
}
|
}
|
||||||
//print(loggedInUser.email + " " + loggedInUser.userID.toString());
|
//print(loggedInUser.email + " " + loggedInUser.userID.toString());
|
||||||
@@ -183,6 +184,8 @@ class _SignInPageState extends State<SignInPage> {
|
|||||||
CreateAccountPage()), //Replace Container() with call to Map-page.
|
CreateAccountPage()), //Replace Container() with call to Map-page.
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
var email = provider.user?.email.toString();
|
||||||
|
await loginVerificationGmail(email!);
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
@@ -192,4 +195,32 @@ class _SignInPageState extends State<SignInPage> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> loginVerificationGmail(String email) async{
|
||||||
|
await db.getConnection().then((conn) async {
|
||||||
|
String sql =
|
||||||
|
"select id, email, password from maen0574.user where email = '$email'";
|
||||||
|
await conn.query(sql).then((results) {
|
||||||
|
for (var row in results) {
|
||||||
|
setState(() {});
|
||||||
|
loggedInUser = new User(row[0], row[1], row[2]);
|
||||||
|
globals.LOGGED_IN_USER = loggedInUser;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
if(globals.LOGGED_IN_USER.userID == 0){
|
||||||
|
await db.getConnection().then((conn) async{
|
||||||
|
String sql = "INSERT INTO maen0574.user (id, email, password, username) VALUES (null, '$email', '', '');";
|
||||||
|
await conn.query(sql);
|
||||||
|
sql = "Select id, email, username from maen0574.user where email = '$email'";
|
||||||
|
await conn.query(sql).then((results) {
|
||||||
|
for (var row in results) {
|
||||||
|
setState(() {});
|
||||||
|
loggedInUser = new User(row[0], row[1], row[2]);
|
||||||
|
globals.LOGGED_IN_USER.userID = loggedInUser.userID;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'dart:async';
|
|||||||
import 'package:firebase_auth/firebase_auth.dart';
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:firebase_core/firebase_core.dart';
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
|
import 'package:flutter_applicationdemo/ShadowDetector.dart';
|
||||||
import 'package:flutter_applicationdemo/login/GoogleSignInProvider.dart';
|
import 'package:flutter_applicationdemo/login/GoogleSignInProvider.dart';
|
||||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
import 'package:flutter_applicationdemo/login/GoogleSignInProvider.dart';
|
import 'package:flutter_applicationdemo/login/GoogleSignInProvider.dart';
|
||||||
@@ -12,8 +13,8 @@ import 'Map.dart';
|
|||||||
import 'HomePage.dart';
|
import 'HomePage.dart';
|
||||||
import 'Venue.dart';
|
import 'Venue.dart';
|
||||||
import 'mysql.dart';
|
import 'mysql.dart';
|
||||||
import 'package:flutter_applicationdemo/login/user.dart';
|
import 'package:flutter_applicationdemo/login/User.dart';
|
||||||
import 'login/user.dart';
|
import 'login/User.dart';
|
||||||
import 'globals.dart' as globals;
|
import 'globals.dart' as globals;
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
@@ -41,6 +42,7 @@ class MyApp extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Future<void> loadAllVenues() async{
|
Future<void> loadAllVenues() async{
|
||||||
|
globals.VENUES = [];
|
||||||
var db = mysql();
|
var db = mysql();
|
||||||
await db.getConnection().then((conn) async {
|
await db.getConnection().then((conn) async {
|
||||||
String sql = "select venueName, venueID, latitude, longitude from maen0574.venue";
|
String sql = "select venueName, venueID, latitude, longitude from maen0574.venue";
|
||||||
@@ -50,4 +52,8 @@ Future<void> loadAllVenues() async{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var sd = ShadowDetector();
|
||||||
|
await sd.evaluateShadowsForAllVenues(globals.VENUES);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
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';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
@@ -149,15 +150,19 @@ class WeatherData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class VenuePage extends StatefulWidget {
|
class VenuePage extends StatefulWidget {
|
||||||
const VenuePage({Key? key}) : super(key: key);
|
const VenuePage(this.venue, {Key? key}) : super(key: key);
|
||||||
|
final Venue venue;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<VenuePage> createState() => _VenuePageState();
|
State<VenuePage> createState() => _VenuePageState(venue);
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VenuePageState extends State<VenuePage> {
|
class _VenuePageState extends State<VenuePage> {
|
||||||
late WeatherData currentWeather;
|
late WeatherData currentWeather;
|
||||||
final String imageLink = '';
|
final String imageLink = '';
|
||||||
|
late final Venue venue;
|
||||||
|
|
||||||
|
_VenuePageState(this.venue);
|
||||||
|
|
||||||
validateAndGetImageLink() {
|
validateAndGetImageLink() {
|
||||||
if (imageLink == '') {
|
if (imageLink == '') {
|
||||||
@@ -200,10 +205,10 @@ class _VenuePageState extends State<VenuePage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: const Color(0xfffceff9),
|
backgroundColor: const Color(0xfffceff9),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('My Venue'),
|
title: Text(venue.venueName),
|
||||||
backgroundColor: const Color(0xffac7b84),
|
backgroundColor: const Color(0xffac7b84),
|
||||||
),
|
),
|
||||||
body: Center(
|
body: Center(child: SingleChildScrollView(
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Column(children: <Widget>[
|
child: Column(children: <Widget>[
|
||||||
@@ -228,8 +233,8 @@ class _VenuePageState extends State<VenuePage> {
|
|||||||
Row(children: [
|
Row(children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: const [
|
children: [
|
||||||
Text('This is the name'),
|
Text(venue.venueName),
|
||||||
Text('This is the address'),
|
Text('This is the address'),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
@@ -271,14 +276,14 @@ class _VenuePageState extends State<VenuePage> {
|
|||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
const AboutTheSpotTable(),
|
const AboutTheSpotTable(),
|
||||||
GridView.count(
|
/*GridView.count(
|
||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
children: [],
|
children: [],
|
||||||
)
|
)*/
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user