Update mybutton widget to take in buttonColor & TextColour. Add Success message pop up message.
Update all buttons to include button color and text colors.
This commit is contained in:
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/homeTileGrid.dart';
|
||||
import 'package:patient_manager/components/myAppBar.dart';
|
||||
import 'package:patient_manager/components/homeAppDrawer.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class Home extends StatefulWidget {
|
||||
@@ -54,8 +54,10 @@ class _HomeState extends State<Home> {
|
||||
// .pushNamed('/patient-manager/add', arguments: widget.userEmail);
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => const MyErrorMessage(
|
||||
errorType: "Internet Connection",
|
||||
builder: (context) => const MySuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage:
|
||||
"This is the message when something successful happened.",
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -284,6 +284,8 @@ class _AddPatientState extends State<AddPatient> {
|
||||
}
|
||||
},
|
||||
buttonText: "Add",
|
||||
buttonColor: Colors.blueAccent,
|
||||
textColor: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -226,7 +226,11 @@ class _EditPatientState extends State<EditPatient> {
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MyButton(
|
||||
onTap: deletePatientApiCall, buttonText: "Delete"))
|
||||
onTap: deletePatientApiCall,
|
||||
buttonText: "Delete",
|
||||
buttonColor: Colors.blueAccent,
|
||||
textColor: Colors.white,
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -471,6 +475,8 @@ class _EditPatientState extends State<EditPatient> {
|
||||
}
|
||||
},
|
||||
buttonText: "Update",
|
||||
buttonColor: Colors.blueAccent,
|
||||
textColor: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -156,8 +156,10 @@ class _RegisterState extends State<Register> {
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
child: MyButton(
|
||||
onTap: signUserUp,
|
||||
onTap: () {},
|
||||
buttonText: "Sign Up",
|
||||
buttonColor: Colors.blueAccent,
|
||||
textColor: Colors.white,
|
||||
),
|
||||
),
|
||||
//spacer
|
||||
|
||||
@@ -126,6 +126,8 @@ class _SignInState extends State<SignIn> {
|
||||
}
|
||||
},
|
||||
buttonText: "Sign In",
|
||||
buttonColor: Colors.blueAccent,
|
||||
textColor: Colors.white,
|
||||
),
|
||||
),
|
||||
//spacer
|
||||
|
||||
Reference in New Issue
Block a user