Skip to content
Snippets Groups Projects
Commit ad3204e1 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: collapsable quick view box

parent 48339c4b
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ final regTextStyle = GoogleFonts.dmSans(fontSize: 20, color: textColor); ...@@ -23,6 +23,7 @@ final regTextStyle = GoogleFonts.dmSans(fontSize: 20, color: textColor);
final chartTextStyle = GoogleFonts.dmSans(fontSize: 14, color: textColor); final chartTextStyle = GoogleFonts.dmSans(fontSize: 14, color: textColor);
// Colors // Colors
const mediumBlue = Color(0xFF015E8F);
const darkBlue = Color(0xFF00B4D8); const darkBlue = Color(0xFF00B4D8);
const darkestBlue = Color(0xFF03045E); const darkestBlue = Color(0xFF03045E);
const lightBlue = Color(0xFFCAF0F8); const lightBlue = Color(0xFFCAF0F8);
......
...@@ -17,6 +17,7 @@ class MapContainerWidget extends StatefulWidget { ...@@ -17,6 +17,7 @@ class MapContainerWidget extends StatefulWidget {
class _MapContainerWidgetState extends State<MapContainerWidget> { class _MapContainerWidgetState extends State<MapContainerWidget> {
MarkerTemplate? selectedMarker; MarkerTemplate? selectedMarker;
bool isMinimized = true; // Quick view box state tacker
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -77,7 +78,6 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ...@@ -77,7 +78,6 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
); );
}).toList(), }).toList(),
), ),
if (selectedMarker != null) // Quick chart on marker press
Positioned( Positioned(
bottom: 10, bottom: 10,
right: 10, right: 10,
...@@ -85,7 +85,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ...@@ -85,7 +85,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
child: Container( child: Container(
width: (screenWidth * boxWidth) / 2.3, width: (screenWidth * boxWidth) / 2.3,
height: (screenWidth * boxWidth)/2.3, height: isMinimized ? 20 : (screenWidth * boxWidth) / 2.3,
color: darkBlue, color: darkBlue,
child: Stack( child: Stack(
children: [ children: [
...@@ -96,15 +96,16 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ...@@ -96,15 +96,16 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
), ),
), ),
Positioned( Positioned(
top: 5, top: isMinimized ? 0 : 5,
right: 5, left: 5,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
selectedMarker = null; isMinimized = !isMinimized; // Toggle the minimized state
print("IsMinimized?: $isMinimized");
}); });
}, },
child: const Icon(Icons.close), child: Icon(isMinimized ? Icons.arrow_upward : Icons.arrow_downward),
), ),
), ),
], ],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment