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
5a7366a1
Commit
5a7366a1
authored
11 months ago
by
Sara Savanovic Djordjevic
Browse files
Options
Downloads
Patches
Plain Diff
update: add back AppBar
parent
d80a4c4c
No related branches found
No related tags found
1 merge request
!10
Clhp map
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/lib/consts.dart
+1
-0
1 addition, 0 deletions
app/lib/consts.dart
app/lib/pages/default_page.dart
+29
-0
29 additions, 0 deletions
app/lib/pages/default_page.dart
app/lib/widgets/choropleth_map.dart
+2
-8
2 additions, 8 deletions
app/lib/widgets/choropleth_map.dart
with
32 additions
and
8 deletions
app/lib/consts.dart
+
1
−
0
View file @
5a7366a1
...
@@ -25,6 +25,7 @@ final titleStyle = GoogleFonts.chakraPetch(
...
@@ -25,6 +25,7 @@ final titleStyle = GoogleFonts.chakraPetch(
fontWeight:
FontWeight
.
bold
,
fontWeight:
FontWeight
.
bold
,
);
);
final
regTextStyle
=
GoogleFonts
.
chakraPetch
(
fontSize:
16
,
color:
textColor
);
final
regTextStyle
=
GoogleFonts
.
chakraPetch
(
fontSize:
16
,
color:
textColor
);
final
regTextStyleBig
=
GoogleFonts
.
chakraPetch
(
fontSize:
18
,
color:
textColor
);
final
chartTextStyle
=
GoogleFonts
.
chakraPetch
(
fontSize:
12
,
color:
textColor
);
final
chartTextStyle
=
GoogleFonts
.
chakraPetch
(
fontSize:
12
,
color:
textColor
);
final
subHeadingStyle
=
GoogleFonts
.
chakraPetch
(
fontSize:
18
,
color:
textColor
,
fontWeight:
FontWeight
.
bold
);
final
subHeadingStyle
=
GoogleFonts
.
chakraPetch
(
fontSize:
18
,
color:
textColor
,
fontWeight:
FontWeight
.
bold
);
...
...
This diff is collapsed.
Click to expand it.
app/lib/pages/default_page.dart
+
29
−
0
View file @
5a7366a1
...
@@ -88,6 +88,35 @@ class _DefaultPageState extends State<DefaultPage> {
...
@@ -88,6 +88,35 @@ class _DefaultPageState extends State<DefaultPage> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
return
MaterialApp
(
home:
Scaffold
(
home:
Scaffold
(
appBar:
AppBar
(
backgroundColor:
Colors
.
black87
,
leading:
IconButton
(
icon:
const
Icon
(
Icons
.
menu
,
color:
Colors
.
white54
),
onPressed:
()
{
// Not implemented
},
),
title:
Text
(
'Mjøsa'
,
style:
regTextStyleBig
,
),
actions:
[
IconButton
(
icon:
const
Icon
(
Icons
.
search
,
color:
Colors
.
white54
),
onPressed:
()
{
setState
(()
{
showBar
=
!
showBar
;
});
},
),
],
),
body:
FutureBuilder
(
body:
FutureBuilder
(
future:
Future
.
wait
([
markerListFuture
,
relationFuture
]),
future:
Future
.
wait
([
markerListFuture
,
relationFuture
]),
builder:
(
BuildContext
context
,
AsyncSnapshot
<
List
<
dynamic
>>
snapshot
)
{
builder:
(
BuildContext
context
,
AsyncSnapshot
<
List
<
dynamic
>>
snapshot
)
{
...
...
This diff is collapsed.
Click to expand it.
app/lib/widgets/choropleth_map.dart
+
2
−
8
View file @
5a7366a1
...
@@ -51,12 +51,6 @@ class _ChoroplethMapState extends State<ChoroplethMap> {
...
@@ -51,12 +51,6 @@ class _ChoroplethMapState extends State<ChoroplethMap> {
}
}
};
};
// ?Should the map be pre-divided into groups?
// Parse relation to json
// Make a list of key value pairs (key: groupID, value: appended shapes)
// Parse back to Uint8list
// Initialise data source
// Initialise data source
dataSource
=
MapShapeSource
.
memory
(
dataSource
=
MapShapeSource
.
memory
(
widget
.
relation
,
widget
.
relation
,
...
@@ -98,8 +92,8 @@ class _ChoroplethMapState extends State<ChoroplethMap> {
...
@@ -98,8 +92,8 @@ class _ChoroplethMapState extends State<ChoroplethMap> {
SfMapsTheme
(
SfMapsTheme
(
data:
SfMapsThemeData
(
// Coloring of selected shape
data:
SfMapsThemeData
(
// Coloring of selected shape
selectionColor:
selectedColor
,
selectionColor:
selectedColor
,
selectionStrokeWidth:
3
,
selectionStrokeWidth:
3
.5
,
selectionStrokeColor:
Colors
.
red
[
9
00
],
selectionStrokeColor:
Colors
.
blue
[
6
00
],
),
),
child:
SfMaps
(
child:
SfMaps
(
layers:
[
layers:
[
...
...
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