diff --git a/assets/lang/en.json b/assets/lang/en.json index 57b53f8..bd42476 100644 --- a/assets/lang/en.json +++ b/assets/lang/en.json @@ -19,9 +19,11 @@ "user_register_screen_title": "Register for a Case", "user_register_screen_subtitle": "Were you near a confirmed case?", "user_register_screen_name": "Name", + "user_register_screen_age": "Age", "user_register_screen_email": "E-mail", "user_register_screen_phone": "Mobile Number (0760000000)", "user_register_screen_invalid_name": "Enter a valid name", + "user_register_screen_invalid_age": "Enter a valid age.", "user_register_screen_invalid_number": "Enter a valid number", "user_register_screen_invalid_email": "Enter a valid email address", "user_register_screen_selected_text" : "Cases You've Selected:", diff --git a/assets/lang/si.json b/assets/lang/si.json index f709e99..dcd5d6a 100644 --- a/assets/lang/si.json +++ b/assets/lang/si.json @@ -21,9 +21,11 @@ "user_register_screen_title": "සබැඳි සිද්ධියක් සදහා ලියාපදිංචි වන්න", "user_register_screen_subtitle": "රෝගය තහවුරු වූ අයෙක් අසළ සිටියේද ?", "user_register_screen_name": "නම", + "user_register_screen_age": "වයස", "user_register_screen_email": "විද්යුත් තැපෑල", "user_register_screen_phone": "ජංගම දූරකථන අංකය (0760000000)", "user_register_screen_invalid_name": "වලංගු නමක් ඇතුළත් කරන්න", + "user_register_screen_invalid_age": "නිවැරදි වයස ඇතුළත් කරන්න", "user_register_screen_invalid_number": "වලංගු අංකයක් ඇතුළත් කරන්න", "user_register_screen_invalid_email": "වලංගු ලිපිනයක් ඇතුලත් කරන්න", "user_register_screen_selected_text" : "එකතුකළ සිද්ධි", diff --git a/assets/lang/ta.json b/assets/lang/ta.json index bfd6966..170ee66 100644 --- a/assets/lang/ta.json +++ b/assets/lang/ta.json @@ -21,9 +21,11 @@ "user_register_screen_title": " பதிவு செய்க", "user_register_screen_subtitle": "பதிவு செய்க", "user_register_screen_name": "பெயர்", + "user_register_screen_age": "வயது", "user_register_screen_email": "மின்னஞ்சல்", "user_register_screen_phone": "கைபேசி எண் (0760000000)", "user_register_screen_invalid_name": "சரியான பெயரை உள்ளிடவும்", + "user_register_screen_invalid_age": "சரியான வயதை உள்ளிடவும்", "user_register_screen_invalid_number": "சரியான எண்ணை உள்ளிடவும்", "user_register_screen_invalid_email": "சரியான மின்னஞ்சல் முகவரியை உள்ளிடவும்", "user_register_screen_selected_text" : "நிகழ்வுகள் சேர்க்கப்பட்டன", diff --git a/lib/page/screen/user_register_screen.dart b/lib/page/screen/user_register_screen.dart index f3487eb..cf29fae 100644 --- a/lib/page/screen/user_register_screen.dart +++ b/lib/page/screen/user_register_screen.dart @@ -62,7 +62,10 @@ class _UserRegisterScreenState extends State { appBar: AppBar( backgroundColor: Colors.white, iconTheme: IconThemeData(color: Colors.black), - title: Text(AppLocalizations.of(context).translate('user_register_bar_title_text'), style: TextStyle(color: Colors.black))), + title: Text( + AppLocalizations.of(context) + .translate('user_register_bar_title_text'), + style: TextStyle(color: Colors.black))), body: CustomScrollView( slivers: [ SliverToBoxAdapter( @@ -73,13 +76,16 @@ class _UserRegisterScreenState extends State { children: [ Container( child: Text( - AppLocalizations.of(context).translate("user_register_screen_title"), + AppLocalizations.of(context) + .translate("user_register_screen_title"), style: TextStyle( color: Colors.black, fontSize: 30.0, fontWeight: FontWeight.bold))), Container( - child: Text(AppLocalizations.of(context).translate("user_register_screen_subtitle"), + child: Text( + AppLocalizations.of(context) + .translate("user_register_screen_subtitle"), style: TextStyle( color: Colors.black, fontSize: 20.0, @@ -91,7 +97,8 @@ class _UserRegisterScreenState extends State { child: Padding( padding: const EdgeInsets.only(left: 20.0), child: Text( - AppLocalizations.of(context).translate("user_register_screen_selected_text"), + AppLocalizations.of(context) + .translate("user_register_screen_selected_text"), style: TextStyle( color: Colors.black, fontWeight: FontWeight.bold, @@ -112,7 +119,8 @@ class _UserRegisterScreenState extends State { onPressed: () { Navigator.of(context).pop(); }, - child: Text(AppLocalizations.of(context).translate("user_register_screen_add_text")), + child: Text(AppLocalizations.of(context) + .translate("user_register_screen_add_text")), ), ), alignment: Alignment.bottomRight, @@ -159,7 +167,8 @@ class _UserRegisterScreenState extends State { } else { return SliverToBoxAdapter( child: Padding( - child: Text(AppLocalizations.of(context).translate("user_registration_screen_no_text")), + child: Text(AppLocalizations.of(context) + .translate("user_registration_screen_no_text")), padding: const EdgeInsets.only(left: 20.0, top: 10.0))); } }, @@ -194,6 +203,29 @@ class _UserRegisterScreenState extends State { SizedBox( height: 15.0, ), + TextFormField( + validator: (val) { + if (val.isEmpty) { + return AppLocalizations.of(context) + .translate("user_register_screen_invalid_age"); + } + }, + decoration: InputDecoration( + labelText: AppLocalizations.of(context) + .translate("user_register_screen_age"), + icon: Icon( + Icons.date_range, + color: TrackerColors.primaryColor, + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(15.0), + borderSide: BorderSide( + color: TrackerColors.primaryColor, + ), + ))), + SizedBox( + height: 15.0, + ), TextFormField( validator: (val) { if (val.isEmpty || !val.contains("@")) {