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

add: box on marker press

parent 111587f2
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,7 @@ final chartTextStyle = GoogleFonts.dmSans(fontSize: 14, color: textColor); ...@@ -24,6 +24,7 @@ final chartTextStyle = GoogleFonts.dmSans(fontSize: 14, color: textColor);
// Colors // Colors
const darkBlue = Color(0xFF00B4D8); const darkBlue = Color(0xFF00B4D8);
const darkestBlue = Color(0xFF03045E);
const lightBlue = Color(0xFFCAF0F8); const lightBlue = Color(0xFFCAF0F8);
const superLightBlue = Color(0xFFCAF0F8); const superLightBlue = Color(0xFFCAF0F8);
const barBlue = Color(0xFF0077B6); const barBlue = Color(0xFF0077B6);
\ No newline at end of file
...@@ -73,19 +73,27 @@ class _DefaultPageState extends State<DefaultPage> { ...@@ -73,19 +73,27 @@ class _DefaultPageState extends State<DefaultPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return MaterialApp(
backgroundColor: darkBlue, home: Container(
appBar: AppBar( decoration: const BoxDecoration(
title: Text( gradient: LinearGradient(
'IceMap', begin: Alignment.topCenter,
style: appTitleStyle, end: Alignment.bottomCenter,
colors: [darkBlue, darkestBlue],
),
), ),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
title: Text('IceMap'),
), ),
body: ListView( body: ListView(
children: [ children: [
MapContainerWidget(markerList: markerList), MapContainerWidget(markerList: markerList),
], ],
), ),
),
),
); );
} }
} }
\ No newline at end of file
...@@ -80,6 +80,41 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ...@@ -80,6 +80,41 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
); );
}).toList(), }).toList(),
), ),
if (selectedMarker != null) // Quick chart on marker press
Positioned(
bottom: 10,
right: 10,
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Container(
width: (screenWidth * boxWidth)/2.3,
height: (screenWidth * boxWidth)/2.3,
color: darkBlue,
child: Stack(
children: [
Center(
child: Text(
'Placeholder',
style: textStyle,
),
),
Positioned(
top: 5,
right: 5,
child: GestureDetector(
onTap: () {
setState(() {
selectedMarker = null; // Clear the selected marker
});
},
child: const Icon(Icons.close),
),
),
],
),
),
),
),
], ],
), ),
), ),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment