.
This commit is contained in:
@@ -94,9 +94,10 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
return MihPackageToolBody(
|
||||
borderOn: false,
|
||||
bodyItem: getBody(),
|
||||
bodyItem: getBody(screenWidth),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -119,12 +120,15 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
||||
});
|
||||
}
|
||||
|
||||
Widget getBody() {
|
||||
Widget getBody(double width) {
|
||||
return Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: MihSingleChildScroll(
|
||||
MihSingleChildScroll(
|
||||
child: Padding(
|
||||
padding:
|
||||
MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||
? EdgeInsets.symmetric(horizontal: width * 0.2)
|
||||
: EdgeInsets.symmetric(horizontal: width * 0.075),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
||||
@@ -84,7 +84,8 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
child: Theme(
|
||||
@@ -139,8 +140,9 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
|
||||
borderRadius:
|
||||
BorderRadius.circular(widget.borderRadius ?? 8.0),
|
||||
child: SizedBox(
|
||||
height:
|
||||
widget.height != null ? widget.height! - 25 : null,
|
||||
height: widget.height != null
|
||||
? widget.height! - 25
|
||||
: null,
|
||||
child: TextFormField(
|
||||
controller: widget.controller,
|
||||
cursorColor: widget.inputColor,
|
||||
@@ -249,7 +251,8 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, top: 4.0),
|
||||
padding:
|
||||
const EdgeInsets.only(left: 8.0, top: 4.0),
|
||||
child: Text(
|
||||
field.errorText ?? '',
|
||||
style: TextStyle(
|
||||
@@ -270,6 +273,7 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,13 +15,13 @@ abstract class AppEnviroment {
|
||||
case Enviroment.dev:
|
||||
{
|
||||
//================= Android Dev Urls =================
|
||||
baseApiUrl = "http://10.0.2.2:8080";
|
||||
baseFileUrl = "http://10.0.2.2:9000";
|
||||
baseAiUrl = "http://10.0.2.2:11434";
|
||||
// baseApiUrl = "http://10.0.2.2:8080";
|
||||
// baseFileUrl = "http://10.0.2.2:9000";
|
||||
// baseAiUrl = "http://10.0.2.2:11434";
|
||||
//================= Web Dev Urls =================
|
||||
// baseApiUrl = "http://localhost:8080";
|
||||
// baseFileUrl = "http://localhost:9000";
|
||||
// baseAiUrl = "http://localhost:11434";
|
||||
baseApiUrl = "http://localhost:8080";
|
||||
baseFileUrl = "http://localhost:9000";
|
||||
baseAiUrl = "http://localhost:11434";
|
||||
break;
|
||||
}
|
||||
case Enviroment.prod:
|
||||
|
||||
@@ -204,7 +204,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
|
||||
);
|
||||
}
|
||||
|
||||
MIHBody getBody() {
|
||||
MIHBody getBody(double width) {
|
||||
return MIHBody(
|
||||
borderOn: false,
|
||||
bodyItems: [
|
||||
@@ -222,7 +222,12 @@ class _ForgotPasswordState extends State<ForgotPassword> {
|
||||
child: SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(25.0),
|
||||
padding: MzanziInnovationHub.of(context)!.theme.screenType ==
|
||||
"desktop"
|
||||
? EdgeInsets.symmetric(
|
||||
vertical: 25, horizontal: width * 0.2)
|
||||
: EdgeInsets.symmetric(
|
||||
vertical: 25, horizontal: width * 0.075),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
@@ -320,11 +325,12 @@ class _ForgotPasswordState extends State<ForgotPassword> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
return MIHLayoutBuilder(
|
||||
actionButton: getActionButton(),
|
||||
header: getHeader(),
|
||||
secondaryActionButton: null,
|
||||
body: getBody(),
|
||||
body: getBody(screenWidth),
|
||||
actionDrawer: null,
|
||||
secondaryActionDrawer: null,
|
||||
bottomNavBar: null,
|
||||
|
||||
@@ -303,7 +303,7 @@ class _RegisterState extends State<Register> {
|
||||
);
|
||||
}
|
||||
|
||||
MIHBody getBody() {
|
||||
MIHBody getBody(double width) {
|
||||
return MIHBody(
|
||||
borderOn: false,
|
||||
bodyItems: [
|
||||
@@ -323,7 +323,10 @@ class _RegisterState extends State<Register> {
|
||||
child: SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(25.0),
|
||||
padding: MzanziInnovationHub.of(context)!.theme.screenType ==
|
||||
"desktop"
|
||||
? EdgeInsets.symmetric(horizontal: width * 0.2)
|
||||
: EdgeInsets.symmetric(horizontal: width * 0.075),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
@@ -415,7 +418,13 @@ class _RegisterState extends State<Register> {
|
||||
const SizedBox(height: 20),
|
||||
// sign up button
|
||||
Center(
|
||||
child: MihButton(
|
||||
child: Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
runAlignment: WrapAlignment.center,
|
||||
spacing: 10,
|
||||
runSpacing: 10,
|
||||
children: [
|
||||
MihButton(
|
||||
onPressed: () {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitFormInput();
|
||||
@@ -436,41 +445,28 @@ class _RegisterState extends State<Register> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 10),
|
||||
//register text
|
||||
SizedBox(
|
||||
width: 300.0,
|
||||
//height: 100.0,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
const Text(
|
||||
'Already a User?',
|
||||
style:
|
||||
TextStyle(fontSize: 18, color: Colors.grey),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 6,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: widget.onTap,
|
||||
child: Text(
|
||||
'Sign In',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: MzanziInnovationHub.of(context)!
|
||||
MihButton(
|
||||
onPressed: widget.onTap,
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
width: 300,
|
||||
child: Text(
|
||||
"I have an account",
|
||||
style: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
//here
|
||||
),
|
||||
|
||||
//here
|
||||
],
|
||||
)
|
||||
],
|
||||
@@ -494,11 +490,12 @@ class _RegisterState extends State<Register> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
return MIHLayoutBuilder(
|
||||
actionButton: getActionButton(),
|
||||
header: getHeader(),
|
||||
secondaryActionButton: getSecondaryActionButton(),
|
||||
body: getBody(),
|
||||
body: getBody(screenWidth),
|
||||
actionDrawer: null,
|
||||
secondaryActionDrawer: null,
|
||||
bottomNavBar: null,
|
||||
|
||||
@@ -235,16 +235,22 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
||||
|
||||
@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(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
MihForm(
|
||||
formKey: _formKey,
|
||||
@@ -364,8 +370,9 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
||||
child: Text(
|
||||
"Update",
|
||||
style: TextStyle(
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
color: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -376,6 +383,7 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user