Skip to content

Commit

Permalink
OxygenForm UI
Browse files Browse the repository at this point in the history
  • Loading branch information
niloysikdar committed May 1, 2021
1 parent 49a1285 commit e3f66ff
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 0 deletions.
112 changes: 112 additions & 0 deletions lib/screens/addoxygen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:plaso_connect/constants/colors.dart';
import 'package:plaso_connect/widgets/formbanner.dart';
import 'package:plaso_connect/widgets/inputfield.dart';

class AddOxygenDetails extends StatefulWidget {
@override
Expand Down Expand Up @@ -47,9 +49,119 @@ class _AddOxygenDetailsState extends State<AddOxygenDetails> {
size: size,
svgPath: "assets/images/medicine.svg",
),
SingleChildScrollView(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(
top: size.height * 0.35,
left: 20,
right: 20,
),
padding: EdgeInsets.all(15),
decoration: BoxDecoration(
color: kbackgroundLight,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
blurRadius: 10.0,
spreadRadius: 5.0,
offset: Offset(0.0, 0.0),
)
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"*$headerstring",
style: TextStyle(
color: Colors.red,
fontSize: 15,
),
),
SizedBox(height: 10),
inputforOxygen(
controller: titlecontroller,
prefixIcon: Icons.title_rounded,
hintText: "Title of the post",
textInputType: TextInputType.text,
maxLines: 1,
),
inputforOxygen(
controller: descriptioncontroller,
prefixIcon: Icons.description_rounded,
hintText: "Full Information",
textInputType: TextInputType.text,
maxLines: 3,
),
inputforOxygen(
controller: pincontroller,
prefixIcon: Icons.location_on_rounded,
hintText: "Area PIN code",
textInputType: TextInputType.number,
maxLines: 1,
),
SizedBox(height: 30),
GestureDetector(
onTap: () {
print("Posted");
},
child: doneBtn(),
),
],
),
),
),
],
),
),
);
}

Widget doneBtn() {
return Container(
margin: EdgeInsets.symmetric(horizontal: 30),
child: Material(
elevation: 5,
borderRadius: BorderRadius.circular(15),
color: kelectronBlue[700],
child: Container(
padding: EdgeInsets.symmetric(vertical: 12),
child: Center(
child: Text(
"Post",
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
),
),
),
);
}

Widget inputforOxygen({
required TextEditingController controller,
required IconData prefixIcon,
required String hintText,
required TextInputType textInputType,
required int maxLines,
}) {
return Container(
margin: EdgeInsets.symmetric(vertical: 10),
child: inputField(
controller: controller,
prefixIcon: prefixIcon,
hintText: hintText,
textInputType: textInputType,
maxLines: maxLines,
),
);
}
}
8 changes: 8 additions & 0 deletions lib/screens/plasmaform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,30 +125,35 @@ class _PlasmaDonateState extends State<PlasmaDonate> {
prefixIcon: Icons.account_circle_rounded,
hintText: "Full Name",
textInputType: TextInputType.name,
maxLines: 1,
),
inputforPlasma(
controller: phonecontroller,
prefixIcon: Icons.phone_rounded,
hintText: "Phone Number",
textInputType: TextInputType.phone,
maxLines: 1,
),
inputforPlasma(
controller: agecontroller,
prefixIcon: Icons.add_rounded,
hintText: "Age",
textInputType: TextInputType.number,
maxLines: 1,
),
inputforPlasma(
controller: addresscontroller,
prefixIcon: Icons.location_on_rounded,
hintText: "Full Address",
textInputType: TextInputType.name,
maxLines: 3,
),
inputforPlasma(
controller: pincontroller,
prefixIcon: Icons.location_on_rounded,
hintText: "Address PIN code",
textInputType: TextInputType.number,
maxLines: 1,
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 5),
Expand Down Expand Up @@ -292,6 +297,7 @@ class _PlasmaDonateState extends State<PlasmaDonate> {
prefixIcon: Icons.date_range_rounded,
hintText: "Date of Recovery",
textInputType: TextInputType.datetime,
maxLines: 1,
)
: Container(height: 0),
Row(
Expand Down Expand Up @@ -408,6 +414,7 @@ class _PlasmaDonateState extends State<PlasmaDonate> {
required IconData prefixIcon,
required String hintText,
required TextInputType textInputType,
required int maxLines,
}) {
return Container(
margin: EdgeInsets.symmetric(vertical: 10),
Expand All @@ -416,6 +423,7 @@ class _PlasmaDonateState extends State<PlasmaDonate> {
prefixIcon: prefixIcon,
hintText: hintText,
textInputType: textInputType,
maxLines: maxLines,
),
);
}
Expand Down
2 changes: 2 additions & 0 deletions lib/screens/signup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ class _SignUpPageState extends State<SignUpPage> {
prefixIcon: Icons.account_circle_rounded,
hintText: "Full Name",
textInputType: TextInputType.name,
maxLines: 1,
),
SizedBox(height: 25),
inputField(
controller: phonecontroller,
prefixIcon: Icons.phone,
hintText: "Phone Number",
textInputType: TextInputType.phone,
maxLines: 1,
),
SizedBox(height: 35),
loginButton(
Expand Down
2 changes: 2 additions & 0 deletions lib/widgets/inputfield.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Widget inputField({
required IconData prefixIcon,
required String hintText,
required TextInputType textInputType,
required int maxLines,
}) {
return Container(
decoration: newboxDecoration(),
Expand All @@ -17,6 +18,7 @@ Widget inputField({
fontSize: 22,
color: Colors.grey[700],
),
maxLines: maxLines,
decoration: InputDecoration(
filled: true,
fillColor: Color(0xFFEFEEEE),
Expand Down

0 comments on commit e3f66ff

Please sign in to comment.