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

update: text in info widget & add scroll gradient

parent c2163e40
No related branches found
No related tags found
1 merge request!20Clhp map, fix unit tests
...@@ -60,46 +60,74 @@ class InfoLayerState extends State<InfoLayer> { ...@@ -60,46 +60,74 @@ class InfoLayerState extends State<InfoLayer> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SingleChildScrollView( return Stack(
child: Container( children: [
padding: const EdgeInsets.all(45), SingleChildScrollView(
color: Colors.black.withOpacity(0.8), child: Container(
child: Column( padding: const EdgeInsets.all(45),
mainAxisAlignment: MainAxisAlignment.center, // Align contents vertically centered color: Colors.black.withOpacity(0.8),
children: [ child: Column(
Text( mainAxisAlignment: MainAxisAlignment.center, // Align contents vertically centered
'Color categorization', children: [
style: subHeadingStyle, Text(
'Color categorization',
style: subHeadingStyle,
),
const SizedBox(height: 10),
Text(
'Each category shows the likelihood of the ice breaking '
'under the weight of a single person.',
style: regTextStyle,
textAlign: TextAlign.center,
),
const SizedBox(height: 30),
_buildLegend(),
const SizedBox(height: 30),
Text(
'Data accuracy',
style: subHeadingStyle,
textAlign: TextAlign.center,
),
const SizedBox(height: 10),
Text(
'The higher the accuracy, the more likely it is that the displayed ice thickness'
'is correct. The accuracy depends on'
'which data sources are used to calculate the thickness. ',
style: regTextStyle,
textAlign: TextAlign.center,
),
const SizedBox(height: 20),
Text('• 1/4: only API data. \n'
'• 2/4: only sensor data.\n'
'• 3/4: both API and sensor data. \n'
'• 4/4: both API and sensor data, with a discrepancy of <1.0cm',
style: regTextStyle,
),
],
), ),
const SizedBox(height: 20), ),
Text( ),
'Each category shows the likelihood of the ice breaking ' Positioned( // Gradient at the bottom of the box
'under the weight of a single person.', bottom: 0,
style: regTextStyle, left: 0,
textAlign: TextAlign.center, right: 0,
), child: IgnorePointer(
const SizedBox(height: 30), child: Container(
_buildLegend(), height: 50,
const SizedBox(height: 30), decoration: BoxDecoration(
Text( gradient: LinearGradient(
'Data accuracy', begin: Alignment.topCenter,
style: subHeadingStyle, end: Alignment.bottomCenter,
textAlign: TextAlign.center, colors: [
), Colors.black.withOpacity(0.0),
const SizedBox(height: 20), Colors.black.withOpacity(0.8),
Text( ],
'The higher the accuracy, the more likely it is that the displayed ice thickness' ),
'is correct. The accuracy depends on' ),
'which data sources are used to calculate the thickness.\n\n '
'- 1/4: only API data. \n'
'- 2/4: only sensor data.'
'- 3/4: both API and sensor data. \n'
'- 4/4: both API and sensor data, with a discrepancy of <1.0cm',
style: regTextStyle,
textAlign: TextAlign.center,
), ),
], ),
), ), ),
],
); );
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment