shas6395 #24
|
@ -181,6 +181,18 @@
|
|||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "geocoding",
|
||||
"rootUri": "file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.4",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "geocoding_platform_interface",
|
||||
"rootUri": "file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding_platform_interface-2.0.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "geolocator",
|
||||
"rootUri": "file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-8.2.1",
|
||||
|
@ -291,7 +303,7 @@
|
|||
},
|
||||
{
|
||||
"name": "http_parser",
|
||||
"rootUri": "file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.0",
|
||||
"rootUri": "file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
|
@ -331,6 +343,24 @@
|
|||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "location",
|
||||
"rootUri": "file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.4.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "location_platform_interface",
|
||||
"rootUri": "file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location_platform_interface-2.3.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "location_web",
|
||||
"rootUri": "file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location_web-3.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "logging",
|
||||
"rootUri": "file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/logging-1.0.2",
|
||||
|
@ -626,7 +656,7 @@
|
|||
"languageVersion": "2.16"
|
||||
}
|
||||
],
|
||||
"generated": "2022-05-19T09:19:56.525181Z",
|
||||
"generated": "2022-05-19T10:32:37.909471Z",
|
||||
"generator": "pub",
|
||||
"generatorVersion": "2.16.2"
|
||||
}
|
||||
|
|
|
@ -110,6 +110,14 @@ font_awesome_flutter
|
|||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/font_awesome_flutter-9.2.0/
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/font_awesome_flutter-9.2.0/lib/
|
||||
geocoding
|
||||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.4/
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.4/lib/
|
||||
geocoding_platform_interface
|
||||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding_platform_interface-2.0.1/
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding_platform_interface-2.0.1/lib/
|
||||
geolocator
|
||||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-8.2.1/
|
||||
|
@ -184,8 +192,8 @@ file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang
|
|||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.4/lib/
|
||||
http_parser
|
||||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.0/
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.0/lib/
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.1/
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.1/lib/
|
||||
image
|
||||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image-3.1.3/
|
||||
|
@ -210,6 +218,18 @@ lints
|
|||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/lints-1.0.1/
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/lints-1.0.1/lib/
|
||||
location
|
||||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.4.0/
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.4.0/lib/
|
||||
location_platform_interface
|
||||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location_platform_interface-2.3.0/
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location_platform_interface-2.3.0/lib/
|
||||
location_web
|
||||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location_web-3.1.1/
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location_web-3.1.1/lib/
|
||||
logging
|
||||
2.12
|
||||
file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/logging-1.0.2/
|
||||
|
|
|
@ -5,6 +5,7 @@ firebase_core=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted
|
|||
firebase_core_web=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_core_web-1.6.4\\
|
||||
flutter_native_splash=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_native_splash-2.1.6\\
|
||||
flutter_plugin_android_lifecycle=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_plugin_android_lifecycle-2.0.6\\
|
||||
geocoding=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\geocoding-2.0.4\\
|
||||
geolocator=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\geolocator-8.2.1\\
|
||||
geolocator_android=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\geolocator_android-3.1.8\\
|
||||
geolocator_apple=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\geolocator_apple-2.1.3\\
|
||||
|
@ -16,6 +17,8 @@ google_sign_in=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hoste
|
|||
google_sign_in_android=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\google_sign_in_android-5.2.7\\
|
||||
google_sign_in_ios=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\google_sign_in_ios-5.2.7\\
|
||||
google_sign_in_web=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\google_sign_in_web-0.10.1+2\\
|
||||
location=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\location-4.4.0\\
|
||||
location_web=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\location_web-3.1.1\\
|
||||
package_info_plus=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\package_info_plus-1.4.2\\
|
||||
package_info_plus_linux=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\package_info_plus_linux-1.0.5\\
|
||||
package_info_plus_macos=C:\\Users\\morte\\OneDrive\\Documents\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\package_info_plus_macos-1.3.0\\
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# For more info see: https://dart.dev/go/dot-packages-deprecation
|
||||
#
|
||||
# Generated by pub on 2022-05-19 11:19:56.493264.
|
||||
# Generated by pub on 2022-05-19 12:32:37.865590.
|
||||
archive:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/archive-3.3.0/lib/
|
||||
args:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/args-2.3.1/lib/
|
||||
async:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.8.2/lib/
|
||||
|
@ -34,6 +34,8 @@ flutter_signin_button:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cac
|
|||
flutter_test:file:///C:/Users/morte/OneDrive/Documents/flutter/packages/flutter_test/lib/
|
||||
flutter_web_plugins:file:///C:/Users/morte/OneDrive/Documents/flutter/packages/flutter_web_plugins/lib/
|
||||
font_awesome_flutter:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/font_awesome_flutter-9.2.0/lib/
|
||||
geocoding:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.4/lib/
|
||||
geocoding_platform_interface:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding_platform_interface-2.0.1/lib/
|
||||
geolocator:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-8.2.1/lib/
|
||||
geolocator_android:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_android-3.1.8/lib/
|
||||
geolocator_apple:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_apple-2.1.3/lib/
|
||||
|
@ -52,13 +54,16 @@ google_sign_in_ios:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/
|
|||
google_sign_in_platform_interface:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in_platform_interface-2.1.3/lib/
|
||||
google_sign_in_web:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in_web-0.10.1+2/lib/
|
||||
http:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.4/lib/
|
||||
http_parser:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.0/lib/
|
||||
http_parser:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.1/lib/
|
||||
image:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image-3.1.3/lib/
|
||||
intl:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.17.0/lib/
|
||||
js:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.3/lib/
|
||||
json_annotation:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/json_annotation-4.5.0/lib/
|
||||
lint:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/lint-1.8.2/lib/
|
||||
lints:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/lints-1.0.1/lib/
|
||||
location:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.4.0/lib/
|
||||
location_platform_interface:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location_platform_interface-2.3.0/lib/
|
||||
location_web:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location_web-3.1.1/lib/
|
||||
logging:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/logging-1.0.2/lib/
|
||||
matcher:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.11/lib/
|
||||
material_color_utilities:file:///C:/Users/morte/OneDrive/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/material_color_utilities-0.1.3/lib/
|
||||
|
|
|
@ -12,7 +12,7 @@ import 'package:settings_ui/settings_ui.dart';
|
|||
import 'ManageAccountPage.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'Venue.dart';
|
||||
import 'globals.dart';
|
||||
import 'globals.dart' as globals;
|
||||
import 'Map.dart';
|
||||
import 'package:flutter_applicationdemo/login/user.dart';
|
||||
import 'HomePage.dart';
|
||||
|
@ -35,7 +35,7 @@ class FavoritePage extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _FavoritePageState extends State<FavoritePage> {
|
||||
List likedVenuesList = LOGGED_IN_USER.likedVenuesList;
|
||||
List likedVenuesList = globals.LOGGED_IN_USER.likedVenuesList;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -72,7 +72,10 @@ class _FavoritePageState extends State<FavoritePage> {
|
|||
delegate: SliverChildBuilderDelegate(
|
||||
// The builder function returns a ListTile with a title that
|
||||
// displays the index of the current item.
|
||||
(context, index) => ListTile(title: Text('Item #$index'), trailing: IconButton(icon: Icon(Icons.favorite, color: Colors.red), onPressed: (){
|
||||
(context, index) => ListTile(
|
||||
title: Text(globals.getVenueByID(likedVenuesList[index])!.venueName.toString()),
|
||||
trailing: IconButton(icon: Icon(Icons.favorite, color: Colors.red),
|
||||
onPressed: (){
|
||||
setState(() {
|
||||
});
|
||||
print("tabort");
|
||||
|
@ -80,9 +83,13 @@ class _FavoritePageState extends State<FavoritePage> {
|
|||
setState(() {
|
||||
});
|
||||
print("gå till venue");
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => Map())
|
||||
);
|
||||
},),
|
||||
// Builds 1000 ListTiles
|
||||
childCount: 20,
|
||||
childCount: likedVenuesList.length,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -19,6 +19,7 @@ import 'Venue.dart';
|
|||
class Map extends StatefulWidget {
|
||||
@override
|
||||
State<Map> createState() => MapState();
|
||||
|
||||
}
|
||||
|
||||
const kGoogleApiKey = "AIzaSyAUmhd6Xxud8SwgDxJ4LlYlcntm01FGoSk";
|
||||
|
@ -337,6 +338,8 @@ class MapState extends State<Map> {
|
|||
zoom: 14.4746)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Future<void> _handelPressButton() async {
|
||||
|
||||
Prediction? p = await PlacesAutocomplete.show(
|
||||
|
|
|
@ -17,3 +17,11 @@ Color TEXTCOLOR = const Color.fromARGB(255, 79, 98, 114);
|
|||
Color SHADOWCOLOR = const Color.fromARGB(255, 0, 0, 0);
|
||||
Color TEXTWHITE = const Color.fromARGB(0, 0, 0, 0);
|
||||
late List<Venue> VENUES;
|
||||
|
||||
Venue? getVenueByID(int searchedVenueID){
|
||||
for(var V in VENUES){
|
||||
if(V.venueID == searchedVenueID){
|
||||
return V;
|
||||
}
|
||||
}return null;
|
||||
}
|
|
@ -14,7 +14,7 @@ import 'Venue.dart';
|
|||
import 'mysql.dart';
|
||||
import 'package:flutter_applicationdemo/login/user.dart';
|
||||
import 'login/user.dart';
|
||||
import 'globals.dart';
|
||||
import 'globals.dart' as globals;
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
@ -41,13 +41,12 @@ class MyApp extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
Future<void> loadAllVenues() async{
|
||||
VENUES = [];
|
||||
var db = mysql();
|
||||
await db.getConnection().then((conn) async {
|
||||
String sql = "select venueName, venueID, latitude, longitude from maen0574.venue";
|
||||
await conn.query(sql).then((results){
|
||||
for(var row in results){
|
||||
VENUES.add(Venue(row[0], row[1], VenueType.restaurant, LatLng(row[2], row[3])));
|
||||
globals.VENUES.add(Venue(row[0], row[1], VenueType.restaurant, LatLng(row[2], row[3])));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user