preload user profile picture

This commit is contained in:
2024-08-29 11:30:10 +02:00
parent c7c1132447
commit aba7bbce27
11 changed files with 77 additions and 15 deletions

View File

@@ -21,11 +21,13 @@ class HomeTileGrid extends StatefulWidget {
final AppUser signedInUser;
final BusinessUser? businessUser;
final Business? business;
final ImageProvider<Object>? propicFile;
const HomeTileGrid({
super.key,
required this.signedInUser,
required this.businessUser,
required this.business,
required this.propicFile,
});
@override
@@ -401,7 +403,10 @@ class _HomeTileGridState extends State<HomeTileGrid> {
return PopScope(
canPop: false,
child: Scaffold(
appBar: const MIHAppBar(barTitle: "Mzansi Innovation\nHub"),
appBar: MIHAppBar(
barTitle: "Mzansi Innovation\nHub",
propicFile: widget.propicFile,
),
drawer: MIHAppDrawer(
signedInUser: widget.signedInUser,
),

View File

@@ -3,8 +3,12 @@ import 'package:patient_manager/main.dart';
class MIHAppBar extends StatefulWidget implements PreferredSizeWidget {
final String barTitle;
const MIHAppBar({super.key, required this.barTitle});
final ImageProvider<Object>? propicFile;
const MIHAppBar({
super.key,
required this.barTitle,
required this.propicFile,
});
@override
State<MIHAppBar> createState() => _MIHAppBarState();