Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zy/5 dashboard migrate indi app #234

Merged
merged 43 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8b9528d
add image avatar
zheyxu Mar 3, 2025
8087f2b
add next appointment
zheyxu Mar 3, 2025
f689fca
add avatar image
zheyxu Mar 3, 2025
02e8f14
add next appointment
zheyxu Mar 3, 2025
d020d95
add personal details
zheyxu Mar 4, 2025
5f24e41
add decoration
zheyxu Mar 4, 2025
7fc851d
add number appointments
zheyxu Mar 4, 2025
2e3a0eb
add address link widget
zheyxu Mar 4, 2025
0f290d0
fix warnings in address link
zheyxu Mar 4, 2025
495b5bb
add touch finger oval widget
zheyxu Mar 4, 2025
3bd3134
add audip tooltip
zheyxu Mar 4, 2025
5e90487
add call icon
zheyxu Mar 4, 2025
d891202
reposition text
zheyxu Mar 4, 2025
4b14ea4
fix some warning
zheyxu Mar 4, 2025
f1fb4e6
add desktop design and simplify code
zheyxu Mar 5, 2025
fe9d19e
fix layout
zheyxu Mar 5, 2025
e1a0412
center mobile layout
zheyxu Mar 5, 2025
2adf4cf
Merge remote-tracking branch 'origin/dev' into zy/5_dashboard_migrate…
zheyxu Mar 6, 2025
65c1b8f
add ignore_for_file: use_build_context_synchronously
zheyxu Mar 6, 2025
10e227b
fix unnecessary nullable parameters
zheyxu Mar 6, 2025
d0ec3c9
need to test in linux
zheyxu Mar 6, 2025
8879746
dart fix
zheyxu Mar 6, 2025
a662186
fix warning
zheyxu Mar 6, 2025
206b736
make updates
zheyxu Mar 6, 2025
bba408a
fix linux build
zheyxu Mar 6, 2025
eb48e2b
update Install OS Dependencies
zheyxu Mar 6, 2025
4836e1c
update installers
zheyxu Mar 6, 2025
fabd2d4
update installers
zheyxu Mar 6, 2025
fc964ae
Bump integration test Linux version.
gjwgit Mar 6, 2025
f65a690
Add gstreamer to ci workflow not installer.
gjwgit Mar 6, 2025
49fc4e9
update mp3 audio
zheyxu Mar 6, 2025
6d8aed4
Merge remote-tracking branch 'origin/dev' into zy/5_dashboard_migrate…
zheyxu Mar 7, 2025
ffe379e
Use MarkdownTooltip rather than Tooltip for Functions.
gjwgit Mar 9, 2025
aafd790
Rename dummy to sample.
gjwgit Mar 9, 2025
4126c0b
Merge remote-tracking branch 'origin/dev' into zy/5_dashboard_migrate…
zheyxu Mar 11, 2025
51115c9
Merge remote-tracking branch 'origin/dev' into zy/5_dashboard_migrate…
zheyxu Mar 11, 2025
f3ec697
refactory constants dart file
zheyxu Mar 11, 2025
b5c7388
simplify code
zheyxu Mar 11, 2025
529900e
fix variables
zheyxu Mar 11, 2025
3ec481c
resolve avatar name issue
zheyxu Mar 11, 2025
0458bf0
update manage_plan
zheyxu Mar 11, 2025
d72e7b8
update number_appointment
zheyxu Mar 11, 2025
8a51abe
update personal_details
zheyxu Mar 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ jobs:
channel: 'stable'
flutter-version: ${{env.FLUTTER_VERSION}}
- run: sudo apt update
- run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libsecret-1-dev
- run: sudo apt-get install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libsecret-1-dev
- run: sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
- run: flutter pub get
- run: flutter build linux -v
3 changes: 2 additions & 1 deletion .github/workflows/installers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
if: |
contains(github.event.head_commit.message, 'bump version') ||
contains(github.event.head_commit.message, 'build installers')
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Clone Repository
Expand All @@ -53,6 +53,7 @@ jobs:
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
sudo apt-get install -y clang cmake
sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
- name: Install Flutter Project Dependencies
run: flutter pub get

Expand Down
Binary file added assets/audio/transport_eligibility.mp3
Binary file not shown.
Binary file added assets/images/sample_avatar_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/sample_doctor_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions lib/constants/appointment.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/// Appointment constants.
//
// Time-stamp: <Thursday 2024-12-19 13:33:06 +1100 Graham Williams>
//
/// Copyright (C) 2025, Software Innovation Institute, ANU
///
/// Licensed under the GNU General Public License, Version 3 (the "License");
///
/// License: https://www.gnu.org/licenses/gpl-3.0.en.html
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation, either version 3 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <https://www.gnu.org/licenses/>.
///
/// Authors: Zheyuan Xu

library;

/// Dummy data for the avatar and appointment section in home screen.

final String appointmentDate = 'Monday, 13 March';
final String appointmentTime = '14:30 pm';
final String appointmentLocation = 'Gurriny Yealamucka';
final String patientID = 'p43623';
final String phoneNumber = '(07) 4226 4100';
final String userName = 'Riley Breugel';

final bool clinicBusAvailable = true;

final int notificationCount = 3;
6 changes: 5 additions & 1 deletion lib/constants/colours.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ library;

import 'package:flutter/material.dart';

const titleBackgroundColor = Color(0xFFF0E4D7);
const anuGold = Color(0xFFBE830E);

const iconColor = Colors.white;

const iconGreen = Colors.green;

const titleBackgroundColor = Color(0xFFF0E4D7);
157 changes: 157 additions & 0 deletions lib/features/home/service/components/avatar_name.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/// Avatar image card widget.
//
// Time-stamp: <Sunday 2025-03-09 11:43:18 +1100 Graham Williams>
//
/// Copyright (C) 2025, Software Innovation Institute, ANU
///
/// Licensed under the GNU General Public License, Version 3 (the "License");
///
/// License: https://www.gnu.org/licenses/gpl-3.0.en.html
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation, either version 3 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <https://www.gnu.org/licenses/>.
///
/// Authors: Zheyuan Xu

library;

import 'package:flutter/material.dart';

import 'package:healthpod/constants/appointment.dart';

import 'package:healthpod/constants/colours.dart';

/// A widget that displays the user's avatar, name, patient ID,
/// and a notification bell with the number of notifications.
///
/// This widget is typically used at the top of a user dashboard
/// to provide quick identification and notifications status.

class AvatarName extends StatefulWidget {
const AvatarName({super.key});

@override
State<AvatarName> createState() => _AvatarNameState();
}

class _AvatarNameState extends State<AvatarName> {
@override
Widget build(BuildContext context) {
return Container(
width: 400,
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: titleBackgroundColor,
boxShadow: [
BoxShadow(
color: Colors.grey.withValues(alpha: 0.8),
spreadRadius: 3,
blurRadius: 4,
offset: const Offset(0, 1),
),
],
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// User avatar with lock icon indicator.

Stack(
clipBehavior: Clip.none,
children: [
const CircleAvatar(
radius: 24,
backgroundImage:
AssetImage('assets/images/sample_avatar_image.png'),
),
// Positioned lock icon at bottom-right.

Positioned(
bottom: -2,
right: -2,
child: Container(
padding: const EdgeInsets.all(2),
decoration: const BoxDecoration(
color: Colors.orange,
shape: BoxShape.circle,
),
child: const Icon(
Icons.lock,
color: Colors.white,
size: 16,
),
),
),
],
),

const SizedBox(width: 12),

// User's name and patient ID.
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
userName,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
Text(
'Patient ID: $patientID',
style: TextStyle(color: Colors.grey[700]),
),
],
),

const SizedBox(width: 12),

// Notification bell with notification count badge.

Stack(
clipBehavior: Clip.none,
children: [
const Icon(
Icons.notifications,
size: 28,
color: Colors.black54,
),
// Show notification count badge only if notifications exist.

if (notificationCount > 0)
Positioned(
right: -2,
top: -2,
child: Container(
padding: const EdgeInsets.all(4),
decoration: const BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
child: Text(
'$notificationCount',
style: const TextStyle(
color: Colors.white,
fontSize: 10,
),
),
),
),
],
),
],
),
);
}
}
36 changes: 36 additions & 0 deletions lib/features/home/service/components/components.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/// Components for the home service feature.
///
// Time-stamp: <Friday 2025-02-14 08:40:39 +1100 Graham Williams>
///
/// Copyright (C) 2024-2025, Software Innovation Institute, ANU.
///
/// Licensed under the GNU General Public License, Version 3 (the "License").
///
/// License: https://www.gnu.org/licenses/gpl-3.0.en.html.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation, either version 3 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <https://www.gnu.org/licenses/>.
///
/// Authors: Zheyuan Xu
library;

/// Components for the home service feature.
///
/// This barrel file exports all the components used in the home service feature,
/// making them easily accessible to other parts of the application.

export 'avatar_name.dart';
export 'manage_plan.dart';
export 'next_appointment.dart';
export 'number_appointments.dart';
export 'personal_details.dart';
Loading