Skip to content

Commit

Permalink
Merge branch 'master' into LarsRefsgaard/data-page-null-safety
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsRefsgaard authored Jul 20, 2023
2 parents a5e7a19 + 919ed9c commit c53aa54
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 133 deletions.
4 changes: 2 additions & 2 deletions lib/ui/pages/message_details_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MessageDetailsPage extends StatelessWidget {
subTitle: 'Unknown message',
type: MessageType.announcement,
timestamp: DateTime.now(),
image: './assets/images/kids.png');
imagePath: './assets/images/kids.png');
});

return Scaffold(
Expand All @@ -44,7 +44,7 @@ class MessageDetailsPage extends StatelessWidget {
Flexible(
child: CustomScrollView(
slivers: [
DetailsBanner(message.title!, message.image),
DetailsBanner(message.title!, message.imagePath),
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 30),
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/pages/study_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class StudyPageState extends State<StudyPage> {
timeago.setLocaleMessages('da', timeago.DaMessages());
timeago.setLocaleMessages('es', timeago.EsMessages());

Image messageImage = widget.model.getMessageImage(message.image);
Image messageImage = widget.model.getMessageImage(message.imagePath);

return Card(
semanticContainer: true,
Expand All @@ -78,7 +78,7 @@ class StudyPageState extends State<StudyPage> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(children: [
message.image != null
message.imagePath != null
? Expanded(
child: Container(
height: 150.0,
Expand Down
2 changes: 1 addition & 1 deletion lib/view_models/cards/heart_rate_data_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class HeartRateCardViewModel extends SerializableViewModel<HourlyHeartRate> {

heartRateEvents?.listen(
(heartRateDataPoint) {
PolarHRSample? heartRate = heartRateDataPoint.data as PolarHRSample;
PolarHR? heartRate = heartRateDataPoint.data as PolarHR;

double hr = heartRate.hr.toDouble();
if (!(hr > 0)) {
Expand Down
Loading

0 comments on commit c53aa54

Please sign in to comment.