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>(); ...@@ -109,7 +109,13 @@ final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
//---------------------------------------------User Name----------------------------------------------------- //---------------------------------------------User Name-----------------------------------------------------
Widget _buildName(){ Widget _buildName(){
return TextFormField( 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){ validator: (String value){
if (value.isEmpty) { if (value.isEmpty) {
return '*Full Name is Required'; return '*Full Name is Required';
...@@ -127,7 +133,12 @@ Widget _buildName(){ ...@@ -127,7 +133,12 @@ Widget _buildName(){
//---------------------------------------------Phone Number----------------------------------------------------- //---------------------------------------------Phone Number-----------------------------------------------------
Widget _buildPNo(){ Widget _buildPNo(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'Phone Number'), decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Phone Number'
),
keyboardType: TextInputType.phone, keyboardType: TextInputType.phone,
maxLength: 10, maxLength: 10,
validator: (String value){ validator: (String value){
...@@ -147,7 +158,12 @@ Widget _buildPNo(){ ...@@ -147,7 +158,12 @@ Widget _buildPNo(){
//---------------------------------------------Risk Location----------------------------------------------------- //---------------------------------------------Risk Location-----------------------------------------------------
Widget _buildLocation(){ Widget _buildLocation(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'Risk Location'), decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Risk Location'
),
validator: (String value){ validator: (String value){
if (value.isEmpty) { if (value.isEmpty) {
return '*Risk Location is Required'; return '*Risk Location is Required';
...@@ -165,7 +181,12 @@ Widget _buildLocation(){ ...@@ -165,7 +181,12 @@ Widget _buildLocation(){
//---------------------------------------------Hotel Name----------------------------------------------------- //---------------------------------------------Hotel Name-----------------------------------------------------
Widget _buildHotelName(){ Widget _buildHotelName(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'Hotel Name'), decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Hotel Name'
),
validator: (String value){ validator: (String value){
if (value.isEmpty) { if (value.isEmpty) {
return '*Hotel Name is Required'; return '*Hotel Name is Required';
...@@ -183,7 +204,12 @@ Widget _buildHotelName(){ ...@@ -183,7 +204,12 @@ Widget _buildHotelName(){
//---------------------------------------------Date----------------------------------------------------- //---------------------------------------------Date-----------------------------------------------------
Widget _buildDate(){ Widget _buildDate(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'Date'), decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Date'
),
validator: (String value){ validator: (String value){
if (value.isEmpty) { if (value.isEmpty) {
return '*Date is Required'; return '*Date is Required';
...@@ -201,7 +227,13 @@ Widget _buildDate(){ ...@@ -201,7 +227,13 @@ Widget _buildDate(){
//---------------------------------------------Time----------------------------------------------------- //---------------------------------------------Time-----------------------------------------------------
Widget _buildTime(){ Widget _buildTime(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'Time'), decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.green)
),
labelText: 'Time'
),
// ignore: missing_return
validator: (String value){ validator: (String value){
if (value.isEmpty) { if (value.isEmpty) {
return '*Time is Required'; return '*Time is Required';
...@@ -234,14 +266,19 @@ Widget _buildTime(){ ...@@ -234,14 +266,19 @@ Widget _buildTime(){
//mainAxisAlignment: MainAxisAlignment.center, //mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
_buildName(), _buildName(),
SizedBox(height: 10),
_buildPNo(), _buildPNo(),
SizedBox(height: 10),
_buildLocation(), _buildLocation(),
SizedBox(height: 10),
_buildHotelName(), _buildHotelName(),
SizedBox(height: 10),
_buildDate(), _buildDate(),
SizedBox(height: 10),
_buildTime(), _buildTime(),
SizedBox(height: 100), SizedBox(height: 50),
RaisedButton( RaisedButton(
color: Colors.green, color: Colors.green,
child: Text( 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