FylleKak2/lib/screens/InformationScreen.dart

245 lines
9.7 KiB
Dart

// ignore_for_file: prefer_const_constructors
// ignore_for_file: prefer_const_literals_to_create_immutables
import 'package:flutter/material.dart';
import 'package:flutter/src/foundation/key.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:pvt_v1/screens/Map_screen.dart';
class InformationScreen extends StatefulWidget {
const InformationScreen({Key? key}) : super(key: key);
@override
State<InformationScreen> createState() => _InformationScreenState();
}
class _InformationScreenState extends State<InformationScreen> {
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 2,
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/blueBackground.png"),
fit: BoxFit.cover,
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0, // tar bort skuggan från appbar
centerTitle: true,
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: const Icon(Icons.menu),
onPressed: () {
Scaffold.of(context).openDrawer();
},
tooltip: MaterialLocalizations.of(context).openAppDrawerTooltip,
);
},
),
title: Container(
child: Text(
'FylleKäk',
style: TextStyle(fontSize: 28),
),
),
//backgroundColor: Colors.transparent,
bottom: TabBar(
indicatorColor: Colors.white,
labelStyle: TextStyle(
fontSize: 16.0, fontFamily: 'AlfaSlabOne'), //For Selected tab
unselectedLabelStyle: TextStyle(
fontSize: 16.0, fontFamily: 'AlfaSlabOne'), //For Un-selec
tabs: [
Container(
height: 40,
child: new Tab(text: "Info"),
),
Tab(
height: 40,
child: new Tab(text: "Recensioner"),
),
],
),
),
body: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
Center(
child: Container(
// INFO
decoration: BoxDecoration(
color: Colors.white,
),
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
"Södergrillen",
style: TextStyle(
fontFamily: 'AlfaSlabOne',
color:Color.fromRGBO(0, 160, 227, 1),
fontSize: 22,
),
),
Padding(
padding: const EdgeInsets.all(4.0),
child: Text(
"Betyg: 4.0 av 5",
style: TextStyle(
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color:Color.fromRGBO(0, 160, 227, 1),
fontSize: 14,
),
),
),
Padding(
padding: const EdgeInsets.all(4.0),
child: Text(
"Öppettider:\n Mån-Tors, 11:00-04:00\n Fre-Lör, 11:00-05:00\n Sön, 11:00-04:00",
style: TextStyle(
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color:Color.fromRGBO(0, 160, 227, 1),
fontSize: 14,
),
),
),
Padding(
padding: const EdgeInsets.all(4.0),
child: Text(
"Prisklass: \$",
style: TextStyle(
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color:Color.fromRGBO(0, 160, 227, 1),
fontSize: 14,
),
),
),
Padding(
padding: const EdgeInsets.all(4.0),
child: Text(
"Telefonnummer: 08-6699505",
style: TextStyle(
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color:Color.fromRGBO(0, 160, 227, 1),
fontSize: 14,
),
),
),
Padding(
padding: const EdgeInsets.all(4.0),
child: Text(
"Adress: Hornsgatan 76",
style: TextStyle(
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color:Color.fromRGBO(0, 160, 227, 1),
fontSize: 14,
),
),
),
Padding(
padding: const EdgeInsets.all(4.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Matkategorier:",
style: TextStyle(
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color:Color.fromRGBO(0, 160, 227, 1),
fontSize: 14,
),
),
Row(
children: [
Image.asset('assets/NotPressedIcons/burgerNotPressed.png', height: 65, width: 65),
Image.asset('assets/NotPressedIcons/korvNotPressed.png', height: 65, width: 65),
],
)
]
),
),
Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: SizedBox(
height: 50,
width: 350,
child: ElevatedButton(
onPressed: () async {
/*
markerLatLng = LatLng(latitude, longitude);
setTargetLatLng(markerLatLng);
PolylineResult pointsBetweenUserAndTarget =
await createPointsBetweenUserAndTarget(markerLatLng);
addPointsToRouteList(pointsBetweenUserAndTarget);
createPolyLine();
setState(() {});
*/
},
child: Text("Hitta hit",
style:
TextStyle(fontSize: 25, fontFamily: 'AlfaSlabOne')
),
style: ButtonStyle(
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
side: BorderSide(color: Color.fromRGBO(0, 160, 227, 1))
)
),
),
),
),
),
),
],
),
),
),
),
Center(
child: SingleChildScrollView(
child: Column(
children: <Widget>[
//Divider(height: 50, thickness: 3,color: Colors.white,),
SizedBox(height: 20),
Container(
alignment: Alignment.center,
//margin: const EdgeInsets.all(110) ,
child: Container(
child: Column(
mainAxisSize: MainAxisSize.max,
// Skriv ut reviewsen här om vi vill
// Annars endast så användaren kan lämna
),
),
),
],
),
),
),
],
),
),
),
);
}
}