Commit f37a7b9f authored by GayaniPKarunaratne's avatar GayaniPKarunaratne

Change some codes in Addlocation dart file

parent cd54b311
......@@ -109,7 +109,13 @@ final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
//---------------------------------------------User Name-----------------------------------------------------
Widget _buildName(){
return TextFormField(
decoration: InputDecoration(labelText: 'Full Name'),
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Full Name'
),
// ignore: missing_return
validator: (String value){
if (value.isEmpty) {
return '*Full Name is Required';
......@@ -127,7 +133,12 @@ Widget _buildName(){
//---------------------------------------------Phone Number-----------------------------------------------------
Widget _buildPNo(){
return TextFormField(
decoration: InputDecoration(labelText: 'Phone Number'),
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Phone Number'
),
keyboardType: TextInputType.phone,
maxLength: 10,
validator: (String value){
......@@ -147,7 +158,12 @@ Widget _buildPNo(){
//---------------------------------------------Risk Location-----------------------------------------------------
Widget _buildLocation(){
return TextFormField(
decoration: InputDecoration(labelText: 'Risk Location'),
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Risk Location'
),
validator: (String value){
if (value.isEmpty) {
return '*Risk Location is Required';
......@@ -165,7 +181,12 @@ Widget _buildLocation(){
//---------------------------------------------Hotel Name-----------------------------------------------------
Widget _buildHotelName(){
return TextFormField(
decoration: InputDecoration(labelText: 'Hotel Name'),
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Hotel Name'
),
validator: (String value){
if (value.isEmpty) {
return '*Hotel Name is Required';
......@@ -183,7 +204,12 @@ Widget _buildHotelName(){
//---------------------------------------------Date-----------------------------------------------------
Widget _buildDate(){
return TextFormField(
decoration: InputDecoration(labelText: 'Date'),
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Date'
),
validator: (String value){
if (value.isEmpty) {
return '*Date is Required';
......@@ -201,7 +227,13 @@ Widget _buildDate(){
//---------------------------------------------Time-----------------------------------------------------
Widget _buildTime(){
return TextFormField(
decoration: InputDecoration(labelText: 'Time'),
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Time'
),
// ignore: missing_return
validator: (String value){
if (value.isEmpty) {
return '*Time is Required';
......@@ -234,14 +266,19 @@ Widget _buildTime(){
//mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
_buildName(),
SizedBox(height: 10),
_buildPNo(),
SizedBox(height: 10),
_buildLocation(),
SizedBox(height: 10),
_buildHotelName(),
SizedBox(height: 10),
_buildDate(),
SizedBox(height: 10),
_buildTime(),
SizedBox(height: 100),
SizedBox(height: 50),
RaisedButton(
color: Colors.green,
child: Text(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment