Added bottom bar

This commit is contained in:
2020-12-29 20:43:37 +01:00
parent fa15a161ae
commit b42d60c683
4 changed files with 447 additions and 151 deletions

View File

@@ -46,15 +46,77 @@ class HomePage extends StatelessWidget {
), ),
), ),
), ),
floatingActionButton: FloatingActionButton( floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: Container(
decoration: BoxDecoration(color: Colors.grey[850]),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding: EdgeInsets.all(8),
onPressed: () { onPressed: () {
showSettings(context); showSettings(context);
}, },
child: Icon( child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.note_rounded,
color: Colors.orange,
),
Text(
'Zamówienie',
style: TextStyle(color: Colors.grey[200], fontSize: 12),
)
],
),
),
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding: EdgeInsets.all(8),
onPressed: () {
showSettings(context);
},
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.favorite_rounded,
color: Colors.orange,
),
Text(
'Ulubione',
style: TextStyle(color: Colors.grey[200], fontSize: 12),
)
],
),
),
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding: EdgeInsets.all(8),
onPressed: () {
showSettings(context);
},
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.settings, Icons.settings,
color: Colors.orange, color: Colors.orange,
), ),
backgroundColor: Colors.grey[850], Text(
'Ustawienia',
style: TextStyle(color: Colors.grey[200], fontSize: 12),
)
],
),
)
],
),
), ),
); );
} }

View File

@@ -58,13 +58,164 @@ class MapViewState extends State<MapView> {
target: data.coordinates, target: data.coordinates,
zoom: 14, zoom: 14,
); );
child = GoogleMap( child = Column(
children: <Widget>[
Container(
height: 70,
decoration: BoxDecoration(color: Colors.grey[850]),
child: Column(
children: [
SizedBox(
height: 40,
),
Container(
height: 30,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.search_rounded,
color: Colors.orange,
),
SizedBox(
width: 8,
),
Text(
'Znaleziono: ${data.markers.length}',
style: TextStyle(color: Colors.white),
),
],
),
)
],
),
),
Expanded(
child: GoogleMap(
mapType: MapType.normal, mapType: MapType.normal,
initialCameraPosition: _initialPosition, initialCameraPosition: _initialPosition,
onMapCreated: (GoogleMapController controller) { onMapCreated: (GoogleMapController controller) {
_controller.complete(controller); _controller.complete(controller);
}, },
markers: Set<Marker>.of(data.markers.values), markers: Set<Marker>.of(data.markers.values),
),
),
Container(
decoration: BoxDecoration(color: Colors.grey[850]),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding:
EdgeInsets.symmetric(vertical: 12, horizontal: 4),
onPressed: () {
Navigator.pop(context);
},
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.arrow_back,
color: Colors.orange,
),
Text(
'Cofnij',
style: TextStyle(
color: Colors.grey[200], fontSize: 12),
)
],
),
),
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding:
EdgeInsets.symmetric(vertical: 12, horizontal: 4),
onPressed: () {
Navigator.pop(context);
},
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.location_pin,
color: Colors.orange,
),
Text(
'Promień',
style: TextStyle(
color: Colors.grey[200], fontSize: 12),
),
Text(
'600m',
style:
TextStyle(color: Colors.grey, fontSize: 10),
)
],
),
),
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding:
EdgeInsets.symmetric(vertical: 12, horizontal: 4),
onPressed: () {
Navigator.pop(context);
},
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.map_rounded,
color: Colors.orange,
),
Text(
'Kuchnia',
style: TextStyle(
color: Colors.grey[200], fontSize: 12),
),
Text(
'Wszystkie',
style:
TextStyle(color: Colors.grey, fontSize: 10),
)
],
),
),
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding:
EdgeInsets.symmetric(vertical: 12, horizontal: 4),
onPressed: () {
Navigator.pop(context);
},
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.filter_list_alt,
color: Colors.orange,
),
Text(
'Filtry',
style: TextStyle(
color: Colors.grey[200], fontSize: 12),
),
Text(
'Brak',
style:
TextStyle(color: Colors.grey, fontSize: 10),
)
],
),
),
],
),
),
],
); );
} else if (snapshot.hasError) { } else if (snapshot.hasError) {
child = Center( child = Center(
@@ -75,41 +226,34 @@ class MapViewState extends State<MapView> {
), ),
); );
} else { } else {
child = Center( child = Container(
decoration: BoxDecoration(color: Colors.grey[850]),
child: Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
child: CircularProgressIndicator(), child: CircularProgressIndicator(
backgroundColor: Colors.white,
),
width: 60, width: 60,
height: 60, height: 60,
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 16), padding: EdgeInsets.only(top: 16),
child: Text('Szukam restauracji...'), child: Text(
'Szukam restauracji...',
style: TextStyle(color: Colors.grey[200]),
),
) )
], ],
), ),
); ));
} }
return child; return child;
}, },
), ),
floatingActionButton: Padding(
padding: EdgeInsets.only(bottom: 20),
child: FloatingActionButton(
backgroundColor: Colors.grey[800],
onPressed: () {
Navigator.pop(context);
},
child: Icon(
Icons.arrow_back_outlined,
color: Colors.orange,
),
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.startDocked,
); );
} }
} }

View File

@@ -11,7 +11,9 @@ class RestaurantCard extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String _openHours = _services.getTodayHours(restaurant.workingHours); String _openHours = _services.getTodayHours(restaurant.workingHours);
return Card( return Padding(
padding: EdgeInsets.only(bottom: 8),
child: Card(
child: InkWell( child: InkWell(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@@ -122,6 +124,7 @@ class RestaurantCard extends StatelessWidget {
color: Color.fromRGBO(50, 50, 50, 0.8), color: Color.fromRGBO(50, 50, 50, 0.8),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
margin: EdgeInsets.symmetric(horizontal: 12), margin: EdgeInsets.symmetric(horizontal: 12),
),
); );
} }
} }

View File

@@ -49,6 +49,93 @@ class SearchResults extends StatelessWidget {
), ),
), ),
), ),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: Container(
decoration: BoxDecoration(color: Colors.grey[850]),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding: EdgeInsets.symmetric(vertical: 12, horizontal: 4),
onPressed: () {
Navigator.pop(context);
},
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.arrow_back_rounded,
color: Colors.orange,
),
Text(
'Cofnij',
style: TextStyle(color: Colors.grey[200], fontSize: 12),
)
],
),
),
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding: EdgeInsets.all(8),
onPressed: () {},
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.note_rounded,
color: Colors.orange,
),
Text(
'Zamówienie',
style: TextStyle(color: Colors.grey[200], fontSize: 12),
)
],
),
),
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding: EdgeInsets.all(8),
onPressed: () {},
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.favorite_rounded,
color: Colors.orange,
),
Text(
'Ulubione',
style: TextStyle(color: Colors.grey[200], fontSize: 12),
)
],
),
),
RaisedButton(
color: Colors.grey[850],
elevation: 0,
padding: EdgeInsets.all(8),
onPressed: () {},
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.settings,
color: Colors.orange,
),
Text(
'Ustawienia',
style: TextStyle(color: Colors.grey[200], fontSize: 12),
)
],
),
)
],
),
),
); );
} }
} }