Update actiopn button

This commit is contained in:
2024-09-30 15:19:09 +02:00
parent fdbcf1b119
commit 412e0e8f59
10 changed files with 12 additions and 14 deletions

View File

@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
class MIHAction extends StatefulWidget { class MIHAction extends StatefulWidget {
final void Function()? onTap; final void Function()? onTap;
final double iconSize; final double iconSize;
final IconData icon; final Widget icon;
const MIHAction({ const MIHAction({
super.key, super.key,
required this.icon, required this.icon,
@@ -35,12 +35,10 @@ class _MIHActionState extends State<MIHAction> {
height: 50, height: 50,
child: Builder( child: Builder(
builder: (context) => IconButton( builder: (context) => IconButton(
iconSize: widget.iconSize,
padding: const EdgeInsets.all(0), padding: const EdgeInsets.all(0),
onPressed: widget.onTap, onPressed: widget.onTap,
icon: Icon( icon: widget.icon,
widget.icon,
size: widget.iconSize,
),
), ),
), ),
); );

View File

@@ -21,7 +21,7 @@ class MIHAbout extends StatefulWidget {
class _MIHAboutState extends State<MIHAbout> { class _MIHAboutState extends State<MIHAbout> {
MIHAction getActionButton() { MIHAction getActionButton() {
return MIHAction( return MIHAction(
icon: Icons.arrow_back, icon: const Icon(Icons.arrow_back),
iconSize: 35, iconSize: 35,
onTap: () { onTap: () {
Navigator.of(context).pushNamedAndRemoveUntil('/', (route) => false); Navigator.of(context).pushNamedAndRemoveUntil('/', (route) => false);

View File

@@ -218,7 +218,7 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
MIHAction getActionButton() { MIHAction getActionButton() {
return MIHAction( return MIHAction(
icon: Icons.arrow_back, icon: const Icon(Icons.arrow_back),
iconSize: 35, iconSize: 35,
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();

View File

@@ -284,7 +284,7 @@ class _ManageBusinessProfileState extends State<ManageBusinessProfile> {
MIHAction getActionButton() { MIHAction getActionButton() {
return MIHAction( return MIHAction(
icon: Icons.arrow_back, icon: const Icon(Icons.arrow_back),
iconSize: 35, iconSize: 35,
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();

View File

@@ -203,7 +203,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
MIHAction getActionButton() { MIHAction getActionButton() {
return MIHAction( return MIHAction(
icon: Icons.arrow_back, icon: const Icon(Icons.arrow_back),
iconSize: 35, iconSize: 35,
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();

View File

@@ -286,7 +286,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
MIHAction getActionButton() { MIHAction getActionButton() {
return MIHAction( return MIHAction(
icon: Icons.arrow_back, icon: const Icon(Icons.arrow_back),
iconSize: 35, iconSize: 35,
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();

View File

@@ -318,7 +318,7 @@ class _AddPatientState extends State<AddPatient> {
MIHAction getActionButton() { MIHAction getActionButton() {
return MIHAction( return MIHAction(
icon: Icons.arrow_back, icon: const Icon(Icons.arrow_back),
iconSize: 35, iconSize: 35,
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();

View File

@@ -556,7 +556,7 @@ class _EditPatientState extends State<EditPatient> {
MIHAction getActionButton() { MIHAction getActionButton() {
return MIHAction( return MIHAction(
icon: Icons.arrow_back, icon: const Icon(Icons.arrow_back),
iconSize: 35, iconSize: 35,
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();

View File

@@ -344,7 +344,7 @@ class _PatientManagerState extends State<PatientManager> {
MIHAction getActionButton() { MIHAction getActionButton() {
return MIHAction( return MIHAction(
icon: Icons.arrow_back, icon: const Icon(Icons.arrow_back),
iconSize: 35, iconSize: 35,
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();

View File

@@ -106,7 +106,7 @@ class _PatientViewState extends State<PatientView> {
MIHAction getActionButton() { MIHAction getActionButton() {
return MIHAction( return MIHAction(
icon: Icons.arrow_back, icon: const Icon(Icons.arrow_back),
iconSize: 35, iconSize: 35,
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();