Skip to content

Commit

Permalink
Tamil language font size reduce to 75%
Browse files Browse the repository at this point in the history
  • Loading branch information
dewmal committed Mar 29, 2020
1 parent bcd9e27 commit c2edf7a
Show file tree
Hide file tree
Showing 14 changed files with 162 additions and 114 deletions.
11 changes: 6 additions & 5 deletions lib/page/screen/case_details_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:selftrackingapp/models/location.dart';
import 'package:selftrackingapp/widgets/custom_text.dart';

DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm:ss");

Expand Down Expand Up @@ -173,13 +174,13 @@ class CaseDetailScreenState extends State<CaseDetailScreen> {
builder: (BuildContext context) {
// return object of type Dialog
return AlertDialog(
title: new Text("Your location"),
content:
new Text("You were here at ${dateFormat.format(location.date)}"),
title: new CustomText("Your location"),
content: new CustomText(
"You were here at ${dateFormat.format(location.date)}"),
actions: <Widget>[
// usually buttons at the bottom of the dialog
new FlatButton(
child: new Text("Close"),
child: new CustomText("Close"),
onPressed: () {
Navigator.of(context).pop();
},
Expand All @@ -195,7 +196,7 @@ class CaseDetailScreenState extends State<CaseDetailScreen> {
padding: const EdgeInsets.all(8),
itemCount: entries.length,
itemBuilder: (BuildContext context, int index) {
return Text(
return CustomText(
'Entry ${entries[index].longitude},${entries[index].latitude},${entries[index].date}');
});
}
Expand Down
25 changes: 14 additions & 11 deletions lib/page/screen/case_list_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:selftrackingapp/notifiers/registered_cases_model.dart';
import 'package:selftrackingapp/page/screen/user_register_screen.dart';
import 'package:selftrackingapp/utils/tracker_colors.dart';
import 'package:selftrackingapp/widgets/case_item.dart';
import 'package:selftrackingapp/widgets/custom_text.dart';

class CaseListScreen extends StatefulWidget {
@override
Expand Down Expand Up @@ -88,7 +89,7 @@ class _CaseListScreenState extends State<CaseListScreen> {
pinned: true,
bottom: PreferredSize(
preferredSize: Size.fromHeight(10.0),
child: Text(''), // Add this code
child: CustomText(''), // Add this code
),
flexibleSpace: Container(
child: Center(
Expand All @@ -105,7 +106,7 @@ class _CaseListScreenState extends State<CaseListScreen> {
.clear();
});
},
child: Text(AppLocalizations.of(context)
child: CustomText(AppLocalizations.of(context)
.translate('case_list_screen_remove_text')),
),
RaisedButton(
Expand All @@ -131,7 +132,7 @@ class _CaseListScreenState extends State<CaseListScreen> {
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
child: CustomText(
AppLocalizations.of(context)
.translate("cse_list_screen_see-text") +
"(${Provider.of<RegisteredCasesModel>(context).reportedCases.length})",
Expand Down Expand Up @@ -160,8 +161,8 @@ class _CaseListScreenState extends State<CaseListScreen> {
case ConnectionState.none:
return SliverToBoxAdapter(
child: Center(
child:
Text("Error getting the cases, try again later.")),
child: CustomText(
"Error getting the cases, try again later.")),
);
break;
case ConnectionState.waiting:
Expand All @@ -174,8 +175,8 @@ class _CaseListScreenState extends State<CaseListScreen> {
case ConnectionState.active:
return SliverToBoxAdapter(
child: Center(
child:
Text("Error getting the cases, try again later.")),
child: CustomText(
"Error getting the cases, try again later.")),
);
break;
case ConnectionState.done:
Expand All @@ -195,7 +196,8 @@ class _CaseListScreenState extends State<CaseListScreen> {
return SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.all(30.0),
child: Center(child: Text("No cases found there.")),
child: Center(
child: CustomText("No cases found there.")),
),
);
if (_cases.length > 0) {
Expand All @@ -209,22 +211,23 @@ class _CaseListScreenState extends State<CaseListScreen> {
return SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.all(30.0),
child: Center(child: Text("No cases found there.")),
child: Center(
child: CustomText("No cases found there.")),
),
);
}
} else {
return SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.all(30.0),
child: Center(child: Text("No cases found.")),
child: Center(child: CustomText("No cases found.")),
),
);
}
break;
default:
return SliverToBoxAdapter(
child: Center(child: Text("")),
child: Center(child: CustomText("")),
);
}
},
Expand Down
17 changes: 9 additions & 8 deletions lib/page/screen/contact_us_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:get_it/get_it.dart';
import 'package:selftrackingapp/models/contact_us_contact.dart';
import 'package:selftrackingapp/networking/data_repository.dart';
import 'package:selftrackingapp/utils/tracker_colors.dart';
import 'package:selftrackingapp/widgets/custom_text.dart';
import 'package:url_launcher/url_launcher.dart';

import '../../theme.dart';
Expand All @@ -25,7 +26,7 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
switch (snapshot.connectionState) {
case ConnectionState.none:
return Center(
child: Text(
child: CustomText(
"An error has occured fetching contacts, try again later"),
);
break;
Expand All @@ -34,7 +35,7 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
break;
case ConnectionState.active:
return Center(
child: Text(
child: CustomText(
"An error has occured fetching contacts, try again later"),
);
break;
Expand Down Expand Up @@ -71,15 +72,15 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
CustomText(
phoneNumber,
style: h1TextStyle.copyWith(
color: Colors.white,
fontWeight: FontWeight.w400,
),
textAlign: TextAlign.start,
),
Text(
CustomText(
title,
style: h3TextStyle.copyWith(
color: Colors.white.withOpacity(0.5),
Expand All @@ -103,12 +104,12 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.all(Radius.circular(20.0))),
title: const Text("Oops, something went wrong"),
content: Text(
title: CustomText("Oops, something went wrong"),
content: CustomText(
"Failed to make phone call, try again later."),
actions: [
FlatButton(
child: const Text("Ok"),
child: CustomText("Ok"),
onPressed: () => Navigator.pop(context),
),
],
Expand All @@ -128,7 +129,7 @@ class _ContactUsScreenState extends State<ContactUsScreen> {
SizedBox(
height: 2.0,
),
Text(
CustomText(
address,
style: TextStyle(
color: Colors.black54,
Expand Down
29 changes: 15 additions & 14 deletions lib/page/screen/dashboard_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:selftrackingapp/models/message_type.dart';
import 'package:selftrackingapp/notifiers/stories_model.dart';
import 'package:selftrackingapp/page/screen/faq_screen.dart';
import 'package:selftrackingapp/utils/tracker_colors.dart';
import 'package:selftrackingapp/widgets/custom_text.dart';
import 'package:share/share.dart';

import 'package:intl/intl.dart';
Expand Down Expand Up @@ -201,7 +202,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Row(
children: <Widget>[
Expanded(
child: Text(
child: CustomText(
article.title,
textAlign: TextAlign.start,
style: Theme.of(context).textTheme.title.copyWith(
Expand All @@ -217,7 +218,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
CustomText(
"By ${article.originator}",
textAlign: TextAlign.start,
style: Theme.of(context)
Expand All @@ -226,7 +227,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
.copyWith(fontSize: 12),
),
Spacer(),
Text(
CustomText(
"${dateFormat.format(article.created)}",
//published data needs to facilitated into the messages from the API
style: Theme.of(context)
Expand All @@ -244,7 +245,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Divider(
color: Colors.grey[400].withOpacity(0.1),
),
Text(
CustomText(
article.message,
style: TextStyle(color: Colors.black, fontSize: 16.0),
),
Expand All @@ -261,7 +262,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
),
FlatButton(
child: Text(
child: CustomText(
AppLocalizations.of(context)
.translate("news_list_read_more_text")
.toUpperCase(),
Expand Down Expand Up @@ -294,7 +295,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
CustomText(
figure,
style: TextStyle(
fontWeight: FontWeight.bold,
Expand All @@ -303,7 +304,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
Spacer(),
Expanded(
child: Text(
child: CustomText(
title,
textAlign: TextAlign.start,
style: TextStyle(
Expand Down Expand Up @@ -366,7 +367,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Row(
children: <Widget>[
Expanded(
child: Text(
child: CustomText(
article.title,
textAlign: TextAlign.start,
style: Theme.of(context).textTheme.title.copyWith(
Expand All @@ -382,7 +383,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
CustomText(
"By ${article.originator}",
textAlign: TextAlign.start,
style: Theme.of(context)
Expand All @@ -391,7 +392,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
.copyWith(fontSize: 12),
),
Spacer(),
Text(
CustomText(
"${dateFormat.format(article.created)}",
//published data needs to facilitated into the messages from the API
style: Theme.of(context)
Expand All @@ -405,7 +406,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
)
],
),
content: Text(
content: CustomText(
article.message,
style: TextStyle(color: Colors.black),
),
Expand All @@ -431,7 +432,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
switch (snapshot.connectionState) {
case ConnectionState.none:
return Center(
child: Text("An error has occured, try again"),
child: CustomText("An error has occured, try again"),
);
break;
case ConnectionState.waiting:
Expand All @@ -441,7 +442,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
break;
case ConnectionState.active:
return Center(
child: Text("An error has occured, try again"),
child: CustomText("An error has occured, try again"),
);
break;
case ConnectionState.done:
Expand Down Expand Up @@ -503,7 +504,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
Padding(
padding: const EdgeInsets.all(20.0),
child: Text(
child: CustomText(
"${AppLocalizations.of(context).translate('dashboard_last_updated_text')} ${dateFormat.format(lastUpdated)}",
style: TextStyle(fontWeight: FontWeight.w400),
),
Expand Down
7 changes: 4 additions & 3 deletions lib/page/screen/faq_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:selftrackingapp/widgets/custom_text.dart';

import '../../app_localizations.dart';

Expand All @@ -21,14 +22,14 @@ class FAQScreenContent extends StatelessWidget {
child: ListTile(
title: Container(
margin: EdgeInsets.only(top: 12, bottom: 0),
child: Text(
child: CustomText(
key,
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
),
subtitle: Container(
margin: EdgeInsets.symmetric(vertical: 15),
child: Text(
child: CustomText(
value,
style: TextStyle(fontSize: 15, fontStyle: FontStyle.italic),
),
Expand All @@ -50,7 +51,7 @@ class FAQScreen extends StatelessWidget {
appBar: AppBar(
backgroundColor: Colors.white,
iconTheme: IconThemeData(color: Colors.black),
title: Text(
title: CustomText(
AppLocalizations.of(context).translate("popmenu_faq"),
style: TextStyle(
color: Colors.black,
Expand Down
Loading

0 comments on commit c2edf7a

Please sign in to comment.