ManageAccountPage #42
|
@ -583,6 +583,18 @@
|
|||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "syncfusion_flutter_core",
|
||||
"rootUri": "file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_core-20.1.57",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "syncfusion_flutter_sliders",
|
||||
"rootUri": "file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_sliders-20.1.57",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "term_glyph",
|
||||
"rootUri": "file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.0",
|
||||
|
@ -668,7 +680,7 @@
|
|||
"languageVersion": "2.16"
|
||||
}
|
||||
],
|
||||
"generated": "2022-05-25T20:13:28.297521Z",
|
||||
"generated": "2022-05-25T20:14:40.881337Z",
|
||||
"generator": "pub",
|
||||
"generatorVersion": "2.16.2"
|
||||
}
|
||||
|
|
|
@ -374,6 +374,14 @@ string_scanner
|
|||
2.12
|
||||
file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0/
|
||||
file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0/lib/
|
||||
syncfusion_flutter_core
|
||||
2.12
|
||||
file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_core-20.1.57/
|
||||
file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_core-20.1.57/lib/
|
||||
syncfusion_flutter_sliders
|
||||
2.12
|
||||
file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_sliders-20.1.57/
|
||||
file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_sliders-20.1.57/lib/
|
||||
term_glyph
|
||||
2.12
|
||||
file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.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-25 22:13:28.277546.
|
||||
# Generated by pub on 2022-05-25 22:14:40.864538.
|
||||
archive:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/archive-3.3.0/lib/
|
||||
args:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/args-2.3.1/lib/
|
||||
async:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.8.2/lib/
|
||||
|
@ -101,6 +101,8 @@ stack_trace:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org
|
|||
stream_channel:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.1.0/lib/
|
||||
stream_transform:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/stream_transform-2.0.0/lib/
|
||||
string_scanner:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0/lib/
|
||||
syncfusion_flutter_core:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_core-20.1.57/lib/
|
||||
syncfusion_flutter_sliders:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_sliders-20.1.57/lib/
|
||||
term_glyph:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.0/lib/
|
||||
test_api:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.4.8/lib/
|
||||
typed_data:file:///Users/marahzeibak/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.0/lib/
|
||||
|
|
|
@ -4,19 +4,18 @@ import 'Map.dart';
|
|||
import 'FavoritePage.dart';
|
||||
import 'SettingsPage.dart';
|
||||
import 'globals.dart' as globals;
|
||||
|
||||
import 'ListViewPage.dart';
|
||||
|
||||
class BottomNavPage extends StatefulWidget {
|
||||
|
||||
@override
|
||||
State<BottomNavPage> createState() => BottomNavPageState();
|
||||
}
|
||||
|
||||
class BottomNavPageState extends State<BottomNavPage> {
|
||||
|
||||
int currentIndex = 0;
|
||||
final screens =[
|
||||
final screens = [
|
||||
Map(),
|
||||
ListViewPage(),
|
||||
FavoritePage(),
|
||||
SettingsPage(),
|
||||
];
|
||||
|
@ -25,25 +24,29 @@ class BottomNavPageState extends State<BottomNavPage> {
|
|||
return Scaffold(
|
||||
body: screens[currentIndex],
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
backgroundColor: globals.BACKGROUNDCOLOR,
|
||||
selectedItemColor: globals.ITEMCOLOR,
|
||||
currentIndex: currentIndex,
|
||||
onTap: (index) => setState( () => currentIndex = index),
|
||||
items: const[
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.home),
|
||||
label: "Home",
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.favorite),
|
||||
label: "Liked",
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.settings),
|
||||
label: "Settings",
|
||||
),
|
||||
]),
|
||||
type: BottomNavigationBarType.fixed,
|
||||
backgroundColor: globals.BACKGROUNDCOLOR,
|
||||
selectedItemColor: globals.ITEMCOLOR,
|
||||
currentIndex: currentIndex,
|
||||
onTap: (index) => setState(() => currentIndex = index),
|
||||
items: const [
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.map_outlined),
|
||||
label: "Map",
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.list_sharp),
|
||||
label: "List View",
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.favorite),
|
||||
label: "Liked",
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.settings),
|
||||
label: "Settings",
|
||||
),
|
||||
]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -313,8 +313,6 @@ class FormForFeedbackState extends State<FormForFeedback> {
|
|||
controlAffinity: ListTileControlAffinity.leading, //lägger checkboxen på vänster sida om texten
|
||||
),
|
||||
|
||||
const SizedBox(height: 10),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(40.0),
|
||||
child: TextFormField(
|
||||
|
@ -377,7 +375,9 @@ class FormForFeedbackState extends State<FormForFeedback> {
|
|||
|
||||
|
||||
child: Container(
|
||||
color: Colors.purple,
|
||||
color: Color.fromARGB(255, 151, 92, 115),
|
||||
height: 60,
|
||||
width: 200,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: const <Widget>[
|
||||
|
@ -393,7 +393,7 @@ class FormForFeedbackState extends State<FormForFeedback> {
|
|||
],
|
||||
),
|
||||
|
||||
const SizedBox(height: 30),
|
||||
const SizedBox(height: 60),
|
||||
|
||||
],
|
||||
),
|
||||
|
|
10
lib/ListViewPage.dart
Normal file
10
lib/ListViewPage.dart
Normal file
|
@ -0,0 +1,10 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class ListViewPage extends StatefulWidget{
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
// TODO: implement createState
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
}
|
453
lib/Map.dart
453
lib/Map.dart
|
@ -1,23 +1,32 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_applicationdemo/WebScraper.dart';
|
||||
import 'package:flutter_applicationdemo/HomePage.dart';
|
||||
import 'dart:async';
|
||||
import 'login/User.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:flutter_google_places/flutter_google_places.dart';
|
||||
import 'package:google_api_headers/google_api_headers.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:http/retry.dart';
|
||||
import 'package:intl/number_symbols.dart';
|
||||
import 'package:location/location.dart';
|
||||
<<<<<<< HEAD
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:flutter_applicationdemo/login/User.dart';
|
||||
import 'SettingsPage.dart';
|
||||
import 'Venue.dart';
|
||||
import 'globals.dart' as globals;
|
||||
|
||||
|
||||
import 'package:syncfusion_flutter_sliders/sliders.dart';
|
||||
import 'globals.dart' as globals;
|
||||
|
||||
=======
|
||||
import 'SettingsPage.dart';
|
||||
import 'Venue.dart';
|
||||
import 'globals.dart' as globals;
|
||||
import 'FeedbackPage.dart';
|
||||
import 'login/CreateAccountPage.dart';
|
||||
import 'login/signInPage.dart';
|
||||
>>>>>>> master
|
||||
|
||||
class Map extends StatefulWidget {
|
||||
@override
|
||||
|
@ -28,29 +37,26 @@ const kGoogleApiKey = "AIzaSyAUmhd6Xxud8SwgDxJ4LlYlcntm01FGoSk";
|
|||
|
||||
final homeSacffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
|
||||
class MapState extends State<Map> {
|
||||
|
||||
Future getMerkerData() async {
|
||||
var url = Uri.parse('https://openstreetgs.stockholm.se/geoservice/api/b8e20fd7-5654-465e-8976-35b4de902b41/wfs?service=wfs&version=1.1.0&request=GetFeature&typeNames=od_gis:Markupplatelse&srsName=EPSG:4326&outputFormat=json');
|
||||
var url = Uri.parse(
|
||||
'https://openstreetgs.stockholm.se/geoservice/api/b8e20fd7-5654-465e-8976-35b4de902b41/wfs?service=wfs&version=1.1.0&request=GetFeature&typeNames=od_gis:Markupplatelse&srsName=EPSG:4326&outputFormat=json');
|
||||
var response = await http.get(url);
|
||||
|
||||
print('Response status: ${response.statusCode}');
|
||||
// print('Response body: ${response.body.toString()}');
|
||||
// print('Response body: ${response.body.toString()}');
|
||||
var jsonData = jsonDecode(response.body);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
final Completer<GoogleMapController> _controller = Completer();
|
||||
|
||||
bool? _barFilterValue = true;
|
||||
bool? _restaurantFilterValue = true;
|
||||
bool? _cafeFilterValue = true;
|
||||
dynamic _priceFilterValue = 3;
|
||||
LocationData? _currentPosition;
|
||||
|
||||
final TextEditingController _searchController = TextEditingController();
|
||||
|
||||
static const CameraPosition _kGooglePlex = CameraPosition(
|
||||
target: LatLng(59.325027,18.068516),
|
||||
target: LatLng(59.325027, 18.068516),
|
||||
zoom: 14.4746,
|
||||
);
|
||||
|
||||
|
@ -66,46 +72,41 @@ class MapState extends State<Map> {
|
|||
void createBottomSheet(String venueName) async {
|
||||
var webScraper = WebScraper();
|
||||
await webScraper.getWebsiteData(venueName);
|
||||
Scaffold.of(context).showBottomSheet<void>(
|
||||
((context) {
|
||||
return Container(
|
||||
height: 420,
|
||||
color: Colors.white,
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
/*const Text('BottomSheet'),
|
||||
Scaffold.of(context).showBottomSheet<void>(((context) {
|
||||
return Container(
|
||||
height: 420,
|
||||
color: Colors.white,
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
/*const Text('BottomSheet'),
|
||||
ElevatedButton(
|
||||
child: const Text('Close BottomSheet'),
|
||||
onPressed: () {Navigator.pop(context);})*/
|
||||
Container(
|
||||
child: Text(webScraper.openingHoursThisWeek.length.toString()),
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
);
|
||||
})
|
||||
);
|
||||
Container(
|
||||
child: Text(webScraper.openingHoursThisWeek.length.toString()),
|
||||
),
|
||||
],
|
||||
)),
|
||||
);
|
||||
}));
|
||||
}
|
||||
|
||||
initialize() {
|
||||
List<Venue> allVenues = globals.VENUES;
|
||||
for(var venue in allVenues) {
|
||||
for (var venue in allVenues) {
|
||||
Marker marker = Marker(
|
||||
markerId: MarkerId(venue.venueID.toString()),
|
||||
position: venue.position,
|
||||
onTap: () => createBottomSheet(venue.venueName),
|
||||
icon: venue.drawIconColor(),
|
||||
);
|
||||
markerId: MarkerId(venue.venueID.toString()),
|
||||
position: venue.position,
|
||||
onTap: () => createBottomSheet(venue.venueName),
|
||||
icon: venue.drawIconColor(),
|
||||
);
|
||||
markersList.add(marker);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Future<LocationData> _getLocationPermission() async {
|
||||
Location location = Location();
|
||||
|
||||
|
@ -145,44 +146,143 @@ class MapState extends State<Map> {
|
|||
final Mode _mode = Mode.fullscreen;
|
||||
|
||||
int currentIndex = 0;
|
||||
final screens =[
|
||||
final screens = [
|
||||
Map(),
|
||||
];
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: const Text("Sun chasers"),
|
||||
key: homeSacffoldKey,
|
||||
//leading: IconButton(icon: Icon(Icons.search), onPressed:() {},),
|
||||
actions: <Widget>[
|
||||
IconButton(icon: const Icon(Icons.search), onPressed:() {
|
||||
},),
|
||||
],
|
||||
title: TextFormField(
|
||||
controller: _searchController,
|
||||
textCapitalization: TextCapitalization.words,
|
||||
decoration: const InputDecoration(hintText: 'Find your place'),
|
||||
onChanged: (value) {
|
||||
print(value);
|
||||
},
|
||||
),
|
||||
<<<<<<< HEAD
|
||||
actions: <Widget>[createFilterMenuButton()],
|
||||
backgroundColor: const Color.fromARGB(255, 190, 146, 160),
|
||||
),
|
||||
body: Stack(
|
||||
=======
|
||||
backgroundColor: const Color.fromARGB(255, 190, 146, 160),
|
||||
),
|
||||
drawer : Drawer(
|
||||
child: Container(
|
||||
child: globals.LOGGED_IN_USER.userID == 0 ? buildDrawerSignedOut(context) : buildDrawerSignedIn(context),
|
||||
),
|
||||
),
|
||||
|
||||
body: Stack (
|
||||
>>>>>>> master
|
||||
children: [
|
||||
GoogleMap(
|
||||
mapType: MapType.normal,
|
||||
|
||||
mapType: MapType.normal,
|
||||
initialCameraPosition: _kGooglePlex,
|
||||
markers: markersList.map((e) => e).toSet(),
|
||||
onMapCreated: (GoogleMapController controller) {
|
||||
_controller.complete(controller);
|
||||
},
|
||||
_controller.complete(controller);
|
||||
},
|
||||
),
|
||||
// ElevatedButton(onPressed: () {} //_handelPressButton
|
||||
// ,child: const Text("Search Placses"))
|
||||
// ElevatedButton(onPressed: () {} //_handelPressButton
|
||||
// ,child: const Text("Search Placses"))
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
PopupMenuButton<dynamic> createFilterMenuButton() {
|
||||
return PopupMenuButton(
|
||||
icon: Icon(Icons.filter_list),
|
||||
iconSize: 40,
|
||||
itemBuilder: (context) => [
|
||||
const PopupMenuItem(
|
||||
child: Text(
|
||||
"Filters",
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(left: 60),
|
||||
),
|
||||
createCheckBoxes(),
|
||||
createPriceSlider(),
|
||||
PopupMenuItem(
|
||||
child: ButtonBar(
|
||||
alignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
||||
ElevatedButton(
|
||||
onPressed:
|
||||
null, // TODO: Fixa så att kartan filtreras när man klickar på 'Apply Filters'
|
||||
child: Text(
|
||||
"Apply Filters",
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
globals.BUTTONCOLOR)),
|
||||
),
|
||||
],
|
||||
))
|
||||
]);
|
||||
}
|
||||
|
||||
// Creates the checkboxes for the filter menu
|
||||
PopupMenuItem<dynamic> createCheckBoxes() {
|
||||
return PopupMenuItem(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Expanded(
|
||||
child: Column(
|
||||
|
||||
children: [
|
||||
Divider(color: Colors.black,),
|
||||
StatefulBuilder(
|
||||
builder: (BuildContext context, StateSetter setState) {
|
||||
return CheckboxListTile(
|
||||
value: _barFilterValue,
|
||||
onChanged: (bool? newValue) {
|
||||
setState(() {
|
||||
_barFilterValue = newValue;
|
||||
});
|
||||
},
|
||||
title: const Icon(
|
||||
Icons.sports_bar,
|
||||
color: Colors.orange,
|
||||
));
|
||||
}),
|
||||
StatefulBuilder(
|
||||
builder: (BuildContext context, StateSetter setState) {
|
||||
return CheckboxListTile(
|
||||
value: _restaurantFilterValue,
|
||||
onChanged: (bool? newValue) {
|
||||
setState(() {
|
||||
_restaurantFilterValue = newValue;
|
||||
});
|
||||
},
|
||||
title: Icon(
|
||||
Icons.restaurant,
|
||||
color: Colors.blueGrey[200],
|
||||
),
|
||||
);
|
||||
}),
|
||||
//Cafe checkbox
|
||||
|
||||
StatefulBuilder(
|
||||
builder: (BuildContext context, StateSetter setState) {
|
||||
return CheckboxListTile(
|
||||
value: _cafeFilterValue,
|
||||
onChanged: (bool? newValue) {
|
||||
setState(() => _cafeFilterValue = newValue);
|
||||
},
|
||||
title: Icon(
|
||||
Icons.coffee,
|
||||
color: Colors.brown[400],
|
||||
));
|
||||
}),
|
||||
|
||||
],
|
||||
=======
|
||||
floatingActionButton: Padding(
|
||||
padding: const EdgeInsets.only(top: 100.0),
|
||||
child: FloatingActionButton(
|
||||
|
@ -192,31 +292,66 @@ class MapState extends State<Map> {
|
|||
MaterialPageRoute(
|
||||
builder: (context) => const SettingsPage()));
|
||||
},
|
||||
backgroundColor: Colors.purple,
|
||||
backgroundColor: Colors.blueAccent,
|
||||
child: const Icon(Icons.filter_alt),
|
||||
),
|
||||
>>>>>>> master
|
||||
),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.endTop,
|
||||
);
|
||||
}
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
PopupMenuItem<dynamic> createPriceSlider() {
|
||||
return PopupMenuItem(
|
||||
child: StatefulBuilder(
|
||||
builder: (BuildContext context, StateSetter setState) {
|
||||
return SfSlider(
|
||||
value: _priceFilterValue,
|
||||
onChanged: (dynamic newValue) {
|
||||
setState((() => _priceFilterValue = newValue));
|
||||
},
|
||||
min: 1,
|
||||
max: 3,
|
||||
showTicks: true,
|
||||
interval: 1,
|
||||
activeColor: Colors.blue,
|
||||
showLabels: true,
|
||||
stepSize: 1.0,
|
||||
labelFormatterCallback: (dynamic value, String formattedText) {
|
||||
switch (value) {
|
||||
case 1:
|
||||
return '\$';
|
||||
case 2:
|
||||
return '\$\$';
|
||||
case 3:
|
||||
return '\$\$\$';
|
||||
}
|
||||
return value.toString();
|
||||
});
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _gotoLocation(double lat, double lng) async {
|
||||
final GoogleMapController controller = await _controller.future;
|
||||
controller.animateCamera(CameraUpdate.newCameraPosition(CameraPosition(target: LatLng(lat,lng), zoom: 15)));
|
||||
controller.animateCamera(CameraUpdate.newCameraPosition(
|
||||
CameraPosition(target: LatLng(lat, lng), zoom: 15)));
|
||||
}
|
||||
|
||||
Widget _boxes(double lat, double lng, String resturantName) {
|
||||
return GestureDetector(
|
||||
onTap: () { _gotoLocation(lat, lng);},
|
||||
onTap: () {
|
||||
_gotoLocation(lat, lng);
|
||||
},
|
||||
child: Container(
|
||||
child: FittedBox(
|
||||
child: Material(
|
||||
color: Colors.white,
|
||||
elevation: 14.0,
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shadowColor: Color(0x802196F3),
|
||||
child: Row(
|
||||
child: Material(
|
||||
color: Colors.white,
|
||||
elevation: 14.0,
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shadowColor: Color(0x802196F3),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
|
@ -225,21 +360,12 @@ class MapState extends State<Map> {
|
|||
child: ClipRRect(
|
||||
borderRadius: new BorderRadius.circular(24.0),
|
||||
child: 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),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
]),
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -252,7 +378,7 @@ class MapState extends State<Map> {
|
|||
zoom: 14.4746)));
|
||||
}
|
||||
|
||||
/* Future<void> _handelPressButton() async {
|
||||
/* Future<void> _handelPressButton() async {
|
||||
|
||||
Prediction? p = await PlacesAutocomplete.show(
|
||||
context: context,
|
||||
|
@ -291,4 +417,149 @@ class MapState extends State<Map> {
|
|||
googleMapController.animateCamera(CameraUpdate.newLatLngZoom(LatLng(lat,lng), 14.0));
|
||||
}*/
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
Widget buildDrawerSignedIn(BuildContext context){
|
||||
return Drawer(
|
||||
child: ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
children: [
|
||||
DrawerHeader(
|
||||
decoration: const BoxDecoration(color: Color.fromARGB(255, 190, 146, 160)),
|
||||
child: Column(children: const <Widget>[
|
||||
Text('Sun Chaser',
|
||||
style :TextStyle(fontSize: 32),
|
||||
),
|
||||
|
||||
SizedBox(height: 30),
|
||||
Icon(Icons.account_box_rounded),
|
||||
|
||||
],
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
ListTile(
|
||||
leading: Icon(Icons.logout),
|
||||
title: Text('Sign out'),
|
||||
onTap:(){
|
||||
globals.LOGGED_IN_USER = User(0, "", "");
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => HomePage()), //Replace Container() with call to Map-page.
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.thumb_up_alt),
|
||||
title: Text('Give feedback'),
|
||||
onTap:(){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => FormForFeedback(),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.settings),
|
||||
title: Text('Settings'),
|
||||
onTap:(){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => SettingsPage(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildDrawerSignedOut(BuildContext context){
|
||||
return Drawer(
|
||||
child: ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
children: [
|
||||
DrawerHeader(
|
||||
decoration: const BoxDecoration(color: Color.fromARGB(255, 190, 146, 160)),
|
||||
child: Column(children: const <Widget>[
|
||||
Text('Sun Chaser',
|
||||
style :TextStyle(fontSize: 32),
|
||||
),
|
||||
|
||||
SizedBox(height: 30),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
ListTile(
|
||||
leading: Icon(Icons.account_box_rounded),
|
||||
title: Text('Create account'),
|
||||
onTap:(){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => CreateAccountPage(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.login),
|
||||
title: Text('Sign in'),
|
||||
onTap:(){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => SignInPage(),
|
||||
),
|
||||
);
|
||||
},),
|
||||
ListTile(
|
||||
leading: Icon(Icons.thumb_up_alt),
|
||||
title: Text('Give feedback'),
|
||||
onTap:(){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => FormForFeedback(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.settings),
|
||||
title: Text('Settings'),
|
||||
onTap:(){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => SettingsPage(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
class _Marker {
|
||||
|
||||
var Plats_1;
|
||||
var Gatunr_1;
|
||||
var coordinates;
|
||||
|
||||
_Marker(this.Plats_1, this.Gatunr_1, this.coordinates);
|
||||
|
||||
}
|
||||
>>>>>>> master
|
||||
|
|
|
@ -50,7 +50,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
'Settings',
|
||||
style: TextStyle(
|
||||
fontSize: 30,
|
||||
color: Colors.grey,
|
||||
color: Colors.white,
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(2, 2),
|
||||
|
@ -104,7 +104,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
title: const Text('Restaurant'),
|
||||
),
|
||||
SettingsTile(
|
||||
title: const Text(""),
|
||||
title: const Text("Price"),
|
||||
value: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
|
@ -119,17 +119,17 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
duration: Duration(milliseconds: 1000),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
content: Text('Selected £'),
|
||||
));
|
||||
),);
|
||||
}else{
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
||||
duration: Duration(milliseconds: 1000),
|
||||
content: Text('Unselected £'),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
));
|
||||
),);
|
||||
}
|
||||
|
||||
});
|
||||
print("Tapped single dollarSign");
|
||||
|
||||
},
|
||||
child: Container(
|
||||
color: _colorContainerLow,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_applicationdemo/BottomNavPage.dart';
|
||||
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:flutter_applicationdemo/mysql.dart';
|
||||
|
||||
import 'package:flutter_applicationdemo/HomePage.dart';
|
||||
|
@ -53,10 +53,12 @@ class _CreateAccountPageState extends State<CreateAccountPage> {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
createTitleText(),
|
||||
const SizedBox(height: 50),
|
||||
Text(
|
||||
"Create Log in:",
|
||||
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
createUsernameField(),
|
||||
createEmailField(),
|
||||
createPasswordField(),
|
||||
|
@ -64,7 +66,6 @@ class _CreateAccountPageState extends State<CreateAccountPage> {
|
|||
padding: const EdgeInsets.only(top: 20),
|
||||
child: createCreateAccountButton(),
|
||||
),
|
||||
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -72,21 +73,14 @@ class _CreateAccountPageState extends State<CreateAccountPage> {
|
|||
Text createTitleText() {
|
||||
return Text(
|
||||
'Sun Chasers',
|
||||
style: TextStyle(
|
||||
fontSize: 50,
|
||||
color: textColor,
|
||||
fontFamily: 'Sacramento',
|
||||
shadows: const <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(2, 2),
|
||||
blurRadius: 10.0,
|
||||
color: Color.fromARGB(255, 0, 0, 0),
|
||||
),
|
||||
],
|
||||
style: GoogleFonts.libreBaskerville(
|
||||
fontSize: 35,
|
||||
color: globals.TEXTCOLOR,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
InputField createUsernameField() {
|
||||
return InputField(
|
||||
text: "Username:",
|
||||
|
|
16
pubspec.lock
16
pubspec.lock
|
@ -374,7 +374,7 @@ packages:
|
|||
source: hosted
|
||||
version: "3.1.3"
|
||||
intl:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: intl
|
||||
url: "https://pub.dartlang.org"
|
||||
|
@ -672,6 +672,20 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
syncfusion_flutter_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: syncfusion_flutter_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "20.1.57"
|
||||
syncfusion_flutter_sliders:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: syncfusion_flutter_sliders
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "20.1.57"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -48,13 +48,15 @@ dependencies:
|
|||
font_awesome_flutter: ^9.2.0
|
||||
provider: ^5.0.0
|
||||
webview_flutter: ^3.0.0
|
||||
|
||||
syncfusion_flutter_sliders: ^20.1.57
|
||||
intl: ^0.17.0
|
||||
#Google Sign-in
|
||||
firebase_auth: ^1.1.4
|
||||
google_sign_in: ^5.0.3
|
||||
get: ^4.6.1
|
||||
mysql1: ^0.19.0
|
||||
html: ^0.15.0
|
||||
|
||||
|
||||
flutter_native_splash:
|
||||
background_image: assets/images/outdoor.png
|
||||
|
|
Loading…
Reference in New Issue
Block a user