fix biz prof padding
This commit is contained in:
@@ -142,7 +142,7 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
||||
}
|
||||
}
|
||||
|
||||
void updateEmployeePopUp(int index) {
|
||||
void updateEmployeePopUp(int index, double width) {
|
||||
setState(() {
|
||||
accessController.text = widget.employees[index].access;
|
||||
typeController.text = widget.employees[index].title;
|
||||
@@ -178,7 +178,12 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
||||
onWindowTapClose: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
windowBody: Column(
|
||||
windowBody: Padding(
|
||||
padding:
|
||||
MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||
? EdgeInsets.symmetric(horizontal: width * 0.05)
|
||||
: const EdgeInsets.symmetric(horizontal: 0),
|
||||
child: Column(
|
||||
children: [
|
||||
MihForm(
|
||||
formKey: _formKey,
|
||||
@@ -242,8 +247,9 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
||||
}
|
||||
}
|
||||
},
|
||||
buttonColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
width: 300,
|
||||
child: Text(
|
||||
"Update",
|
||||
@@ -262,6 +268,7 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -287,6 +294,7 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
return ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
@@ -314,7 +322,7 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
updateEmployeePopUp(index);
|
||||
updateEmployeePopUp(index, screenWidth);
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
@@ -114,7 +114,7 @@ class _BuildUserListState extends State<BuildUserList> {
|
||||
return "$firstLetter********@$end";
|
||||
}
|
||||
|
||||
void addEmployeePopUp(int index) {
|
||||
void addEmployeePopUp(int index, double width) {
|
||||
setState(() {
|
||||
//accessController.text = widget.users[index].access;
|
||||
//typeController.text = widget.users[index].title;
|
||||
@@ -129,7 +129,12 @@ class _BuildUserListState extends State<BuildUserList> {
|
||||
builder: (context) => MihPackageWindow(
|
||||
fullscreen: false,
|
||||
windowTitle: "Add Employee",
|
||||
windowBody: Column(
|
||||
windowBody: Padding(
|
||||
padding:
|
||||
MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||
? EdgeInsets.symmetric(horizontal: width * 0.05)
|
||||
: const EdgeInsets.symmetric(horizontal: 0),
|
||||
child: Column(
|
||||
children: [
|
||||
MihForm(
|
||||
formKey: _formKey,
|
||||
@@ -138,8 +143,9 @@ class _BuildUserListState extends State<BuildUserList> {
|
||||
fillColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
controller: usernameController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -151,8 +157,9 @@ class _BuildUserListState extends State<BuildUserList> {
|
||||
fillColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
controller: emailController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -211,11 +218,11 @@ class _BuildUserListState extends State<BuildUserList> {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
onWindowTapClose: () {
|
||||
Navigator.pop(context);
|
||||
}));
|
||||
@@ -232,6 +239,7 @@ class _BuildUserListState extends State<BuildUserList> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
return ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
@@ -256,7 +264,7 @@ class _BuildUserListState extends State<BuildUserList> {
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
addEmployeePopUp(index);
|
||||
addEmployeePopUp(index, screenWidth);
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
@@ -223,15 +223,20 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
return MihPackageToolBody(
|
||||
borderOn: false,
|
||||
innerHorizontalPadding: 10,
|
||||
bodyItem: getBody(context),
|
||||
bodyItem: getBody(screenWidth, context),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getBody(BuildContext context) {
|
||||
Widget getBody(double width, BuildContext context) {
|
||||
return MihSingleChildScroll(
|
||||
child: Padding(
|
||||
padding: MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||
? EdgeInsets.symmetric(horizontal: width * 0.2)
|
||||
: EdgeInsets.symmetric(horizontal: width * 0.075),
|
||||
child: Column(
|
||||
children: [
|
||||
MihForm(
|
||||
@@ -273,7 +278,8 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
MihTextFormField(
|
||||
fillColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
controller: regController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -286,7 +292,8 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
MihTextFormField(
|
||||
fillColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
controller: nameController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -308,7 +315,8 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
MihTextFormField(
|
||||
fillColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
controller: practiceNoController,
|
||||
multiLineInput: false,
|
||||
requiredText: typeController.text == "Doctors Office",
|
||||
@@ -321,7 +329,8 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
MihTextFormField(
|
||||
fillColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
controller: vatNoController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -334,7 +343,8 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
MihTextFormField(
|
||||
fillColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
controller: contactController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -347,7 +357,8 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
MihTextFormField(
|
||||
fillColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
controller: emailController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -362,8 +373,9 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
children: [
|
||||
Flexible(
|
||||
child: MihTextFormField(
|
||||
fillColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
fillColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
controller: locationController,
|
||||
@@ -390,8 +402,9 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
child: Text(
|
||||
"Set",
|
||||
style: TextStyle(
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
color: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -425,6 +438,7 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,15 +203,20 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
return MihPackageToolBody(
|
||||
borderOn: false,
|
||||
innerHorizontalPadding: 10,
|
||||
bodyItem: getBody(),
|
||||
bodyItem: getBody(screenWidth),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getBody() {
|
||||
Widget getBody(double width) {
|
||||
return MihSingleChildScroll(
|
||||
child: Padding(
|
||||
padding: MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||
? EdgeInsets.symmetric(horizontal: width * 0.2)
|
||||
: EdgeInsets.symmetric(horizontal: width * 0.075),
|
||||
child: Column(
|
||||
children: [
|
||||
MihForm(
|
||||
@@ -369,8 +374,9 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
||||
child: Text(
|
||||
"Update",
|
||||
style: TextStyle(
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
color: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -382,6 +388,7 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
);
|
||||
}
|
||||
|
||||
MIHBody getBody() {
|
||||
MIHBody getBody(double width) {
|
||||
return MIHBody(
|
||||
borderOn: false,
|
||||
bodyItems: [
|
||||
@@ -313,6 +313,11 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
}
|
||||
},
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding:
|
||||
MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||
? EdgeInsets.symmetric(horizontal: width * 0.2)
|
||||
: EdgeInsets.symmetric(horizontal: width * 0.075),
|
||||
child: Column(
|
||||
children: [
|
||||
const Text(
|
||||
@@ -334,8 +339,9 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
fillColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
controller: regController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -349,8 +355,9 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
fillColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
controller: nameController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -371,8 +378,8 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
const SizedBox(height: 10.0),
|
||||
ValueListenableBuilder(
|
||||
valueListenable: busType,
|
||||
builder:
|
||||
(BuildContext context, String value, Widget? child) {
|
||||
builder: (BuildContext context, String value,
|
||||
Widget? child) {
|
||||
return Visibility(
|
||||
visible: value == "Doctors Office",
|
||||
child: MihTextFormField(
|
||||
@@ -402,8 +409,9 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
fillColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
controller: vatNoController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -417,8 +425,9 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
fillColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
controller: contactController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -432,8 +441,9 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
fillColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
controller: emailController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -520,8 +530,9 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
fillColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
controller: fnameController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -535,8 +546,9 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
fillColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
inputColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
inputColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
controller: lnameController,
|
||||
multiLineInput: false,
|
||||
requiredText: true,
|
||||
@@ -584,6 +596,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -626,11 +639,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
return MIHLayoutBuilder(
|
||||
actionButton: getActionButton(),
|
||||
secondaryActionButton: null,
|
||||
header: getHeader(),
|
||||
body: getBody(),
|
||||
body: getBody(screenWidth),
|
||||
actionDrawer: null,
|
||||
secondaryActionDrawer: null,
|
||||
bottomNavBar: null,
|
||||
|
||||
Reference in New Issue
Block a user