usew new icon frame

This commit is contained in:
2025-04-09 13:38:01 +02:00
parent a6f370ccf5
commit a6caf4aa6a
6 changed files with 27 additions and 8 deletions

View File

@@ -15,7 +15,9 @@ class MIHProfilePicture extends StatefulWidget {
final double radius;
final bool drawerMode;
final bool editable;
final Color frameColor;
final onChange;
MIHProfilePicture({
super.key,
required this.profilePictureFile,
@@ -26,6 +28,7 @@ class MIHProfilePicture extends StatefulWidget {
required this.drawerMode,
required this.editable,
required this.onChange,
required this.frameColor,
});
@override
@@ -50,9 +53,12 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
),
SizedBox(
width: widget.width,
child: Icon(
MihIcons.mihCircleFrame,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
child: FittedBox(
fit: BoxFit.fill,
child: Icon(
MihIcons.mihCircleFrame,
color: widget.frameColor,
),
),
),
Visibility(

View File

@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_objects/arguments.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@@ -292,8 +293,12 @@ class _SignInState extends State<SignIn> {
padding: const EdgeInsets.all(10.0),
child: SizedBox(
height: 50,
child: Image.asset(
'lib/mih_components/mih_package_components/assets/images/logo_light.png'),
child: FittedBox(
child: Icon(
MihIcons.mihLogo,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
),
),
),
iconSize: 35,

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import '../../../main.dart';
import '../../../mih_objects/app_user.dart';
import '../../../mih_objects/arguments.dart';
@@ -60,6 +61,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
radius: 27,
drawerMode: true,
editable: false,
frameColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
onChange: (newProPic) {},
),
@@ -107,8 +109,6 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
Widget build(BuildContext context) {
// precacheImage(
// MzanziInnovationHub.of(context)!.theme.logoImage().image, context);
ImageProvider logoThemeSwitch =
MzanziInnovationHub.of(context)!.theme.logoImage();
return SafeArea(
child: Drawer(
//backgroundColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
@@ -328,7 +328,11 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
// Navigator.of(context).popAndPushNamed('/',);
});
},
child: Image(image: logoThemeSwitch),
child: Icon(
MihIcons.mihLogo,
color:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
),
// IconButton(
// onPressed: () {

View File

@@ -1,3 +1,4 @@
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_app.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_app_action.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_app_tools.dart';
@@ -108,6 +109,7 @@ class _MihHomeState extends State<MihHome> {
radius: 21,
drawerMode: false,
editable: false,
frameColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
onChange: (newProPic) {},
),
),

View File

@@ -994,6 +994,7 @@ class _MIHHomeLegacyState extends State<MIHHomeLegacy> {
radius: 21,
drawerMode: false,
editable: false,
frameColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
onChange: (newProPic) {},
),
),

View File

@@ -266,6 +266,7 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
radius: 70,
drawerMode: false,
editable: true,
frameColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
onChange: (newProPic) {
setState(() {
proPic = newProPic;