AdamsBranch #41
|
@ -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),
|
||||
|
||||
],
|
||||
),
|
||||
|
|
191
lib/Map.dart
191
lib/Map.dart
|
@ -1,15 +1,16 @@
|
|||
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';
|
||||
|
@ -18,6 +19,14 @@ 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
|
||||
|
@ -144,14 +153,29 @@ class MapState extends State<Map> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: const Text("Sun chasers"),
|
||||
key: homeSacffoldKey,
|
||||
<<<<<<< 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) {
|
||||
|
@ -165,6 +189,7 @@ class MapState extends State<Map> {
|
|||
);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
PopupMenuButton<dynamic> createFilterMenuButton() {
|
||||
return PopupMenuButton(
|
||||
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));
|
||||
}*/
|
||||
}
|
||||
<<<<<<< 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_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:",
|
||||
|
|
Loading…
Reference in New Issue
Block a user