AdamsBranch #41
@ -313,8 +313,6 @@ class FormForFeedbackState extends State<FormForFeedback> {
|
|||||||
controlAffinity: ListTileControlAffinity.leading, //lägger checkboxen på vänster sida om texten
|
controlAffinity: ListTileControlAffinity.leading, //lägger checkboxen på vänster sida om texten
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(40.0),
|
padding: const EdgeInsets.all(40.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
@ -377,7 +375,9 @@ class FormForFeedbackState extends State<FormForFeedback> {
|
|||||||
|
|
||||||
|
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Colors.purple,
|
color: Color.fromARGB(255, 151, 92, 115),
|
||||||
|
height: 60,
|
||||||
|
width: 200,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: const <Widget>[
|
children: const <Widget>[
|
||||||
@ -393,7 +393,7 @@ class FormForFeedbackState extends State<FormForFeedback> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: 30),
|
const SizedBox(height: 60),
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
189
lib/Map.dart
189
lib/Map.dart
@ -1,15 +1,16 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_applicationdemo/WebScraper.dart';
|
import 'package:flutter_applicationdemo/WebScraper.dart';
|
||||||
|
import 'package:flutter_applicationdemo/HomePage.dart';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'login/User.dart';
|
||||||
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_api_headers/google_api_headers.dart';
|
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:http/retry.dart';
|
import 'package:http/retry.dart';
|
||||||
import 'package:intl/number_symbols.dart';
|
import 'package:intl/number_symbols.dart';
|
||||||
import 'package:location/location.dart';
|
import 'package:location/location.dart';
|
||||||
|
<<<<<<< HEAD
|
||||||
import 'package:geolocator/geolocator.dart';
|
import 'package:geolocator/geolocator.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:flutter_applicationdemo/login/User.dart';
|
import 'package:flutter_applicationdemo/login/User.dart';
|
||||||
@ -18,6 +19,14 @@ import 'Venue.dart';
|
|||||||
import 'globals.dart' as globals;
|
import 'globals.dart' as globals;
|
||||||
import 'package:syncfusion_flutter_sliders/sliders.dart';
|
import 'package:syncfusion_flutter_sliders/sliders.dart';
|
||||||
import 'globals.dart' as globals;
|
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 {
|
class Map extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
@ -144,13 +153,28 @@ class MapState extends State<Map> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
centerTitle: true,
|
||||||
|
title: const Text("Sun chasers"),
|
||||||
key: homeSacffoldKey,
|
key: homeSacffoldKey,
|
||||||
|
<<<<<<< HEAD
|
||||||
actions: <Widget>[createFilterMenuButton()],
|
actions: <Widget>[createFilterMenuButton()],
|
||||||
backgroundColor: const Color.fromARGB(255, 190, 146, 160),
|
backgroundColor: const Color.fromARGB(255, 190, 146, 160),
|
||||||
),
|
),
|
||||||
body: Stack(
|
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: [
|
children: [
|
||||||
GoogleMap(
|
GoogleMap(
|
||||||
|
|
||||||
mapType: MapType.normal,
|
mapType: MapType.normal,
|
||||||
initialCameraPosition: _kGooglePlex,
|
initialCameraPosition: _kGooglePlex,
|
||||||
markers: markersList.map((e) => e).toSet(),
|
markers: markersList.map((e) => e).toSet(),
|
||||||
@ -165,6 +189,7 @@ class MapState extends State<Map> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
PopupMenuButton<dynamic> createFilterMenuButton() {
|
PopupMenuButton<dynamic> createFilterMenuButton() {
|
||||||
return PopupMenuButton(
|
return PopupMenuButton(
|
||||||
icon: Icon(Icons.filter_list),
|
icon: Icon(Icons.filter_list),
|
||||||
@ -257,6 +282,20 @@ class MapState extends State<Map> {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
],
|
],
|
||||||
|
=======
|
||||||
|
floatingActionButton: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 100.0),
|
||||||
|
child: FloatingActionButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => const SettingsPage()));
|
||||||
|
},
|
||||||
|
backgroundColor: Colors.blueAccent,
|
||||||
|
child: const Icon(Icons.filter_alt),
|
||||||
|
),
|
||||||
|
>>>>>>> master
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -378,3 +417,149 @@ class MapState extends State<Map> {
|
|||||||
googleMapController.animateCamera(CameraUpdate.newLatLngZoom(LatLng(lat,lng), 14.0));
|
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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_applicationdemo/BottomNavPage.dart';
|
import 'package:flutter_applicationdemo/BottomNavPage.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:flutter_applicationdemo/mysql.dart';
|
import 'package:flutter_applicationdemo/mysql.dart';
|
||||||
|
|
||||||
import 'package:flutter_applicationdemo/HomePage.dart';
|
import 'package:flutter_applicationdemo/HomePage.dart';
|
||||||
@ -53,10 +53,12 @@ class _CreateAccountPageState extends State<CreateAccountPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
createTitleText(),
|
createTitleText(),
|
||||||
|
const SizedBox(height: 50),
|
||||||
Text(
|
Text(
|
||||||
"Create Log in:",
|
"Create Log in:",
|
||||||
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
|
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
createUsernameField(),
|
createUsernameField(),
|
||||||
createEmailField(),
|
createEmailField(),
|
||||||
createPasswordField(),
|
createPasswordField(),
|
||||||
@ -64,7 +66,6 @@ class _CreateAccountPageState extends State<CreateAccountPage> {
|
|||||||
padding: const EdgeInsets.only(top: 20),
|
padding: const EdgeInsets.only(top: 20),
|
||||||
child: createCreateAccountButton(),
|
child: createCreateAccountButton(),
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -72,21 +73,14 @@ class _CreateAccountPageState extends State<CreateAccountPage> {
|
|||||||
Text createTitleText() {
|
Text createTitleText() {
|
||||||
return Text(
|
return Text(
|
||||||
'Sun Chasers',
|
'Sun Chasers',
|
||||||
style: TextStyle(
|
style: GoogleFonts.libreBaskerville(
|
||||||
fontSize: 50,
|
fontSize: 35,
|
||||||
color: textColor,
|
color: globals.TEXTCOLOR,
|
||||||
fontFamily: 'Sacramento',
|
|
||||||
shadows: const <Shadow>[
|
|
||||||
Shadow(
|
|
||||||
offset: Offset(2, 2),
|
|
||||||
blurRadius: 10.0,
|
|
||||||
color: Color.fromARGB(255, 0, 0, 0),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InputField createUsernameField() {
|
InputField createUsernameField() {
|
||||||
return InputField(
|
return InputField(
|
||||||
text: "Username:",
|
text: "Username:",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user