.
This commit is contained in:
@@ -95,7 +95,7 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -122,121 +122,201 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
|||||||
Widget getBody() {
|
Widget getBody() {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
MihSingleChildScroll(
|
Padding(
|
||||||
child: Column(
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
child: MihSingleChildScroll(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
Row(
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
children: [
|
||||||
children: [
|
Row(
|
||||||
Text(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
"Hello",
|
children: [
|
||||||
textAlign: TextAlign.center,
|
Text(
|
||||||
style: TextStyle(
|
"Hello",
|
||||||
fontSize: 25,
|
textAlign: TextAlign.center,
|
||||||
fontWeight: FontWeight.bold,
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
MihForm(
|
||||||
|
formKey: _formKey,
|
||||||
|
formFields: [
|
||||||
|
MihTextFormField(
|
||||||
|
fillColor: MzanziInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.secondaryColor(),
|
||||||
|
inputColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
controller: _textFieldZeroController,
|
||||||
|
multiLineInput: false,
|
||||||
|
requiredText: true,
|
||||||
|
hintText: "Username",
|
||||||
|
validator: (value) {
|
||||||
|
return MihValidationServices().validateUsername(value);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
MihTextFormField(
|
||||||
|
fillColor: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
inputColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
controller: _textFieldOneController,
|
||||||
|
multiLineInput: false,
|
||||||
|
requiredText: true,
|
||||||
|
hintText: "Email",
|
||||||
|
autofillHints: [AutofillHints.email],
|
||||||
|
validator: (value) {
|
||||||
|
return MihValidationServices().validateEmail(value);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
MihTextFormField(
|
||||||
|
fillColor: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
inputColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
controller: _textFieldTwoController,
|
||||||
|
multiLineInput: false,
|
||||||
|
requiredText: true,
|
||||||
|
hintText: "Password",
|
||||||
|
passwordMode: true,
|
||||||
|
autofillHints: [AutofillHints.password],
|
||||||
|
validator: (value) {
|
||||||
|
return MihValidationServices().validatePassword(value);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
MihTextFormField(
|
||||||
|
fillColor: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
inputColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
controller: _textFieldThreeController,
|
||||||
|
multiLineInput: false,
|
||||||
|
requiredText: true,
|
||||||
|
hintText: "Numbers Only",
|
||||||
|
numberMode: true,
|
||||||
|
validator: (value) => value == null || value.isEmpty
|
||||||
|
? 'This Field is required'
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
MihTextFormField(
|
||||||
|
height: 250,
|
||||||
|
fillColor: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
inputColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
controller: _textFieldFourController,
|
||||||
|
multiLineInput: true,
|
||||||
|
requiredText: false,
|
||||||
|
hintText: "Enter Multi Line Text",
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: MihButton(
|
||||||
|
onPressed: () {
|
||||||
|
if (_formKey.currentState!.validate()) {
|
||||||
|
// Process data
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(content: Text("Input Valid")),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttonColor: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
elevation: 10,
|
||||||
|
width: 300,
|
||||||
|
child: Text(
|
||||||
|
"Click Me",
|
||||||
|
style: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Divider(
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
thickness: 2,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
MihSearchBar(
|
||||||
|
controller: _searchController,
|
||||||
|
hintText: "Ask Mzansi",
|
||||||
|
// prefixIcon: Icons.search,
|
||||||
|
prefixIcon: Icons.search,
|
||||||
|
prefixAltIcon: MihIcons.mzansiAi,
|
||||||
|
width: 300,
|
||||||
|
fillColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
hintColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
onPrefixIconTap: () {
|
||||||
|
print("Search Icon Pressed: ${_searchController.text}");
|
||||||
|
},
|
||||||
|
searchFocusNode: searchFocusNode,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
MihButton(
|
||||||
|
onPressed: () {
|
||||||
|
print("Button Pressed");
|
||||||
|
},
|
||||||
|
buttonColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
elevation: 10,
|
||||||
|
width: 300,
|
||||||
|
child: Text(
|
||||||
|
"Click Me",
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
const SizedBox(height: 40),
|
||||||
const SizedBox(height: 20),
|
MihButton(
|
||||||
MihForm(
|
onPressed: () {
|
||||||
formKey: _formKey,
|
print("Button Pressed");
|
||||||
formFields: [
|
},
|
||||||
MihTextFormField(
|
buttonColor:
|
||||||
fillColor:
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
width: 300,
|
||||||
inputColor:
|
child: Row(
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
controller: _textFieldZeroController,
|
children: [
|
||||||
multiLineInput: false,
|
Icon(
|
||||||
requiredText: true,
|
Icons.delete,
|
||||||
hintText: "Username",
|
color: MzanziInnovationHub.of(context)!
|
||||||
validator: (value) {
|
.theme
|
||||||
return MihValidationServices().validateUsername(value);
|
.primaryColor(),
|
||||||
},
|
),
|
||||||
),
|
Text(
|
||||||
const SizedBox(height: 10),
|
|
||||||
MihTextFormField(
|
|
||||||
fillColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
inputColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
controller: _textFieldOneController,
|
|
||||||
multiLineInput: false,
|
|
||||||
requiredText: true,
|
|
||||||
hintText: "Email",
|
|
||||||
autofillHints: [AutofillHints.email],
|
|
||||||
validator: (value) {
|
|
||||||
return MihValidationServices().validateEmail(value);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
MihTextFormField(
|
|
||||||
fillColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
inputColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
controller: _textFieldTwoController,
|
|
||||||
multiLineInput: false,
|
|
||||||
requiredText: true,
|
|
||||||
hintText: "Password",
|
|
||||||
passwordMode: true,
|
|
||||||
autofillHints: [AutofillHints.password],
|
|
||||||
validator: (value) {
|
|
||||||
return MihValidationServices().validatePassword(value);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
MihTextFormField(
|
|
||||||
fillColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
inputColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
controller: _textFieldThreeController,
|
|
||||||
multiLineInput: false,
|
|
||||||
requiredText: true,
|
|
||||||
hintText: "Numbers Only",
|
|
||||||
numberMode: true,
|
|
||||||
validator: (value) => value == null || value.isEmpty
|
|
||||||
? 'This Field is required'
|
|
||||||
: null,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
MihTextFormField(
|
|
||||||
height: 250,
|
|
||||||
fillColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
inputColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
controller: _textFieldFourController,
|
|
||||||
multiLineInput: true,
|
|
||||||
requiredText: false,
|
|
||||||
hintText: "Enter Multi Line Text",
|
|
||||||
),
|
|
||||||
const SizedBox(height: 20),
|
|
||||||
Align(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {
|
|
||||||
if (_formKey.currentState!.validate()) {
|
|
||||||
// Process data
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
const SnackBar(content: Text("Input Valid")),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
buttonColor: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
elevation: 10,
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
"Click Me",
|
"Click Me",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color: MzanziInnovationHub.of(context)!
|
||||||
@@ -246,169 +326,99 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
|||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Divider(
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
thickness: 2,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
MihSearchBar(
|
|
||||||
controller: _searchController,
|
|
||||||
hintText: "Ask Mzansi",
|
|
||||||
// prefixIcon: Icons.search,
|
|
||||||
prefixIcon: Icons.search,
|
|
||||||
prefixAltIcon: MihIcons.mzansiAi,
|
|
||||||
width: 300,
|
|
||||||
fillColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
hintColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
onPrefixIconTap: () {
|
|
||||||
print("Search Icon Pressed: ${_searchController.text}");
|
|
||||||
},
|
|
||||||
searchFocusNode: searchFocusNode,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 20),
|
|
||||||
MihButton(
|
|
||||||
onPressed: () {
|
|
||||||
print("Button Pressed");
|
|
||||||
},
|
|
||||||
buttonColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
elevation: 10,
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
"Click Me",
|
|
||||||
style: TextStyle(
|
|
||||||
color:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 40),
|
MihButton(
|
||||||
MihButton(
|
onPressed: () {
|
||||||
onPressed: () {
|
print("Button Pressed");
|
||||||
print("Button Pressed");
|
},
|
||||||
},
|
buttonColor:
|
||||||
buttonColor:
|
MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
width: 300,
|
||||||
width: 300,
|
child: Text(
|
||||||
child: Row(
|
"Click Me",
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
style: TextStyle(
|
||||||
children: [
|
color:
|
||||||
Icon(
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
Icons.delete,
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Container(
|
||||||
|
color: Colors.black,
|
||||||
|
width: 200,
|
||||||
|
height: 200,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: IconButton.filled(
|
||||||
|
onPressed: () {},
|
||||||
|
icon: Icon(
|
||||||
|
MihIcons.mihLogo,
|
||||||
color:
|
color:
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
),
|
),
|
||||||
Text(
|
|
||||||
"Click Me",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.primaryColor(),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
MihButton(
|
|
||||||
onPressed: () {
|
|
||||||
print("Button Pressed");
|
|
||||||
},
|
|
||||||
buttonColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.errorColor(),
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
"Click Me",
|
|
||||||
style: TextStyle(
|
|
||||||
color:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
MihCircleAvatar(
|
||||||
Container(
|
imageFile: imagePreview,
|
||||||
color: Colors.black,
|
width: 50,
|
||||||
width: 200,
|
editable: false,
|
||||||
height: 200,
|
fileNameController: _fileNameController,
|
||||||
padding: EdgeInsets.zero,
|
userSelectedfile: file,
|
||||||
alignment: Alignment.center,
|
frameColor:
|
||||||
child: IconButton.filled(
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
onPressed: () {},
|
backgroundColor:
|
||||||
icon: Icon(
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
MihIcons.mihLogo,
|
onChange: (selectedImage) {
|
||||||
color:
|
setState(() {
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
file = selectedImage;
|
||||||
),
|
});
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 10),
|
||||||
const SizedBox(height: 10),
|
MihTextFormField(
|
||||||
MihCircleAvatar(
|
fillColor:
|
||||||
imageFile: imagePreview,
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
width: 50,
|
inputColor:
|
||||||
editable: false,
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
fileNameController: _fileNameController,
|
controller: _fileNameController,
|
||||||
userSelectedfile: file,
|
hintText: "Selected Avatar File",
|
||||||
frameColor:
|
requiredText: false,
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
readOnly: false,
|
||||||
backgroundColor:
|
),
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
const SizedBox(height: 10),
|
||||||
onChange: (selectedImage) {
|
MihImageDisplay(
|
||||||
setState(() {
|
imageFile: imagePreview,
|
||||||
file = selectedImage;
|
width: 300,
|
||||||
});
|
height: 200,
|
||||||
},
|
editable: true,
|
||||||
),
|
fileNameController: _imagefileController,
|
||||||
const SizedBox(height: 10),
|
userSelectedfile: imageFile,
|
||||||
MihTextFormField(
|
onChange: (selectedFile) {
|
||||||
fillColor:
|
setState(() {
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
imageFile = selectedFile;
|
||||||
inputColor:
|
});
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
},
|
||||||
controller: _fileNameController,
|
),
|
||||||
hintText: "Selected Avatar File",
|
const SizedBox(height: 10),
|
||||||
requiredText: false,
|
MihTextFormField(
|
||||||
readOnly: false,
|
fillColor:
|
||||||
),
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
const SizedBox(height: 10),
|
inputColor:
|
||||||
MihImageDisplay(
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
imageFile: imagePreview,
|
controller: _imagefileController,
|
||||||
width: 300,
|
hintText: "Selected Image File",
|
||||||
height: 200,
|
requiredText: false,
|
||||||
editable: true,
|
readOnly: false,
|
||||||
fileNameController: _imagefileController,
|
),
|
||||||
userSelectedfile: imageFile,
|
const SizedBox(height: 10),
|
||||||
onChange: (selectedFile) {
|
],
|
||||||
setState(() {
|
),
|
||||||
imageFile = selectedFile;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
MihTextFormField(
|
|
||||||
fillColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
inputColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
controller: _imagefileController,
|
|
||||||
hintText: "Selected Image File",
|
|
||||||
requiredText: false,
|
|
||||||
readOnly: false,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 25.0),
|
const SizedBox(height: 25.0),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: false,
|
||||||
child: MihTextFormField(
|
child: MihTextFormField(
|
||||||
fillColor:
|
fillColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
|||||||
Reference in New Issue
Block a user