forked from yaso_meth/mih-project
Update actiopn button
This commit is contained in:
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
||||
class MIHAction extends StatefulWidget {
|
||||
final void Function()? onTap;
|
||||
final double iconSize;
|
||||
final IconData icon;
|
||||
final Widget icon;
|
||||
const MIHAction({
|
||||
super.key,
|
||||
required this.icon,
|
||||
@@ -35,12 +35,10 @@ class _MIHActionState extends State<MIHAction> {
|
||||
height: 50,
|
||||
child: Builder(
|
||||
builder: (context) => IconButton(
|
||||
iconSize: widget.iconSize,
|
||||
padding: const EdgeInsets.all(0),
|
||||
onPressed: widget.onTap,
|
||||
icon: Icon(
|
||||
widget.icon,
|
||||
size: widget.iconSize,
|
||||
),
|
||||
icon: widget.icon,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -21,7 +21,7 @@ class MIHAbout extends StatefulWidget {
|
||||
class _MIHAboutState extends State<MIHAbout> {
|
||||
MIHAction getActionButton() {
|
||||
return MIHAction(
|
||||
icon: Icons.arrow_back,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamedAndRemoveUntil('/', (route) => false);
|
||||
|
||||
@@ -218,7 +218,7 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
|
||||
|
||||
MIHAction getActionButton() {
|
||||
return MIHAction(
|
||||
icon: Icons.arrow_back,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -284,7 +284,7 @@ class _ManageBusinessProfileState extends State<ManageBusinessProfile> {
|
||||
|
||||
MIHAction getActionButton() {
|
||||
return MIHAction(
|
||||
icon: Icons.arrow_back,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -203,7 +203,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
|
||||
MIHAction getActionButton() {
|
||||
return MIHAction(
|
||||
icon: Icons.arrow_back,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -286,7 +286,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
||||
|
||||
MIHAction getActionButton() {
|
||||
return MIHAction(
|
||||
icon: Icons.arrow_back,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -318,7 +318,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
|
||||
MIHAction getActionButton() {
|
||||
return MIHAction(
|
||||
icon: Icons.arrow_back,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -556,7 +556,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
|
||||
MIHAction getActionButton() {
|
||||
return MIHAction(
|
||||
icon: Icons.arrow_back,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -344,7 +344,7 @@ class _PatientManagerState extends State<PatientManager> {
|
||||
|
||||
MIHAction getActionButton() {
|
||||
return MIHAction(
|
||||
icon: Icons.arrow_back,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -106,7 +106,7 @@ class _PatientViewState extends State<PatientView> {
|
||||
|
||||
MIHAction getActionButton() {
|
||||
return MIHAction(
|
||||
icon: Icons.arrow_back,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
Reference in New Issue
Block a user