Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…tracking_app into NirmalAriyathilake-master
  • Loading branch information
dewmal committed Mar 20, 2020
2 parents c347468 + cf767e0 commit 1ea8aa7
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 6 deletions.
2 changes: 2 additions & 0 deletions assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/si.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : "එකතුකළ සිද්ධි",
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/ta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : "நிகழ்வுகள் சேர்க்கப்பட்டன",
Expand Down
44 changes: 38 additions & 6 deletions lib/page/screen/user_register_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ class _UserRegisterScreenState extends State<UserRegisterScreen> {
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: <Widget>[
SliverToBoxAdapter(
Expand All @@ -73,13 +76,16 @@ class _UserRegisterScreenState extends State<UserRegisterScreen> {
children: <Widget>[
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,
Expand All @@ -91,7 +97,8 @@ class _UserRegisterScreenState extends State<UserRegisterScreen> {
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,
Expand All @@ -112,7 +119,8 @@ class _UserRegisterScreenState extends State<UserRegisterScreen> {
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,
Expand Down Expand Up @@ -159,7 +167,8 @@ class _UserRegisterScreenState extends State<UserRegisterScreen> {
} 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)));
}
},
Expand Down Expand Up @@ -194,6 +203,29 @@ class _UserRegisterScreenState extends State<UserRegisterScreen> {
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("@")) {
Expand Down

0 comments on commit 1ea8aa7

Please sign in to comment.