Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PROG2900
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sara Savanovic Djordjevic
PROG2900
Commits
9dd2a309
Commit
9dd2a309
authored
1 year ago
by
Sara Savanovic Djordjevic
Browse files
Options
Downloads
Patches
Plain Diff
add: chart w/sample data to quick view
parent
242ee6f2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/lib/pages/widgets/map_widget.dart
+3
-6
3 additions, 6 deletions
app/lib/pages/widgets/map_widget.dart
app/lib/pages/widgets/quick_view_chart.dart
+37
-0
37 additions, 0 deletions
app/lib/pages/widgets/quick_view_chart.dart
with
40 additions
and
6 deletions
app/lib/pages/widgets/map_widget.dart
+
3
−
6
View file @
9dd2a309
...
...
@@ -4,6 +4,7 @@ import '../consts.dart';
import
'package:flutter_map/flutter_map.dart'
;
import
'package:latlong2/latlong.dart'
;
import
'package:fl_chart/fl_chart.dart'
;
import
'quick_view_chart.dart'
;
class
MapContainerWidget
extends
StatefulWidget
{
final
List
<
MarkerTemplate
>
markerList
;
...
...
@@ -90,16 +91,12 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
child:
Stack
(
children:
[
Visibility
(
// Content only visible when box is maximized
visible:
!
isMinimized
,
visible:
!
isMinimized
&&
selectedMarker
!=
null
,
child:
Center
(
child:
SizedBox
(
width:
(
screenWidth
*
boxWidth
)
/
2.3
,
height:
(
screenWidth
*
boxWidth
)
/
2.3
,
child:
Text
(
'Placeholder'
,
style:
regTextStyle
,
),
//child: YourChartWidget(), // Replace YourChartWidget with your actual chart widget
child:
const
QuickViewChart
(),
),
),
),
...
...
This diff is collapsed.
Click to expand it.
app/lib/pages/widgets/quick_view_chart.dart
+
37
−
0
View file @
9dd2a309
import
'package:flutter/material.dart'
;
import
'package:fl_chart/fl_chart.dart'
;
class
QuickViewChart
extends
StatelessWidget
{
const
QuickViewChart
({
super
.
key
});
@override
Widget
build
(
BuildContext
context
)
{
return
LineChart
(
LineChartData
(
titlesData:
FlTitlesData
(
leftTitles:
SideTitles
(
showTitles:
true
),
bottomTitles:
SideTitles
(
showTitles:
true
),
),
borderData:
FlBorderData
(
show:
true
,
),
minX:
0
,
// Test data
maxX:
4
,
minY:
0
,
maxY:
50
,
lineBarsData:
[
LineChartBarData
(
spots:
[
FlSpot
(
0
,
10
),
// Test data
FlSpot
(
1
,
20
),
FlSpot
(
2
,
30
),
FlSpot
(
3
,
40
),
],
isCurved:
true
,
colors:
[
Colors
.
blue
],
),
],
),
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment