Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#109 [BUG] Text overflowing #112

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bhagavad_gita/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30
compileSdkVersion 33

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
2 changes: 1 addition & 1 deletion bhagavad_gita/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.5.31'
ext.kotlin_version = '1.6.10'
repositories {
google()
jcenter()
Expand Down
353 changes: 193 additions & 160 deletions bhagavad_gita/lib/screens/home_screen.dart/about_gita_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,189 +16,222 @@ class _AboutGitaScreenState extends State<AboutGitaScreen>
super.build(context);
height = MediaQuery.of(context).size.height;
width = MediaQuery.of(context).size.width;
return Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
Stack(
children: [
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height / 2.7,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
image: DecorationImage(
image: AssetImage('assets/images/image_aboutGita.jpg'),
fit: BoxFit.cover),
return SafeArea(
child: Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
Stack(
children: [
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height / 2.7,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
image: DecorationImage(
image:
AssetImage('assets/images/image_aboutGita.jpg'),
fit: BoxFit.cover),
),
),
),
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height / 2.7,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
image: DecorationImage(
image: AssetImage(
'assets/images/black_imageAboutGita.png'),
fit: BoxFit.cover),
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height / 2.7,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
image: DecorationImage(
image: AssetImage(
'assets/images/black_imageAboutGita.png'),
fit: BoxFit.cover),
),
),
),
Positioned(
top: MediaQuery.of(context).size.height / kPadding * 2.7,
left: kDefaultPadding,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
Positioned(
top: MediaQuery.of(context).size.height / kPadding * 2.7,
left: kDefaultPadding,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
DemoLocalization.of(context)!
.getTranslatedValue('about_gita')
.toString(),
style: Theme.of(context)
.textTheme
.headline1!
.copyWith(fontSize: 30, color: whiteColor),
),
// Text(
// DemoLocalization.of(context)!
// .getTranslatedValue('gita')
// .toString(),
// textAlign: TextAlign.justify,
// style: Theme.of(context)
// .textTheme
// .headline1!
// .copyWith(fontSize: 28, color: orangeColor),
// ),
],
),
),
),
],
),
Column(
children: [
Stack(
children: [
Row(
children: [
Padding(
padding: EdgeInsets.all(kDefaultPadding * 2),
child: SvgPicture.asset(
'assets/icons/icon_quote_AboutGita.svg',
),
),
],
),
Positioned(
top: kDefaultPadding * 2.7,
left: 0,
right: 0,
child: Container(
child: Text(
DemoLocalization.of(context)!
.getTranslatedValue('unlikeModernWriting')
.toString(),
textAlign: TextAlign.center,
style: Theme.of(context)
.textTheme
.headline1!
.copyWith(
fontSize: (Localizations.localeOf(context)
.languageCode ==
'hi')
? 21
: 20,
color: orangeColor),
),
),
),
],
),
],
),
Padding(
padding: const EdgeInsets.all(10),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: kDefaultPadding),
child: Column(
children: [
RichText(
textAlign: TextAlign.left,
text: TextSpan(
children: [
TextSpan(
text: DemoLocalization.of(context)!
.getTranslatedValue('gitaStory')
.toString(),
style: Theme.of(context)
.textTheme
.subtitle1!
.copyWith(
fontSize: (Localizations.localeOf(context)
.languageCode ==
'hi')
? 20
: 18,
color: blackColor),
)
],
),
),
SizedBox(height: kDefaultPadding * 1.5),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/icons/icon_left_rtansection.svg"),
SizedBox(width: kDefaultPadding),
Text(
DemoLocalization.of(context)!
.getTranslatedValue('about_gita')
.getTranslatedValue('story')
.toString(),
style: Theme.of(context)
.textTheme
.headline1!
.copyWith(fontSize: 30, color: whiteColor),
.subtitle1!
.copyWith(
fontSize: (Localizations.localeOf(context)
.languageCode ==
'hi')
? 20
: 18,
fontWeight: FontWeight.w600),
),
// Text(
// DemoLocalization.of(context)!
// .getTranslatedValue('gita')
// .toString(),
// textAlign: TextAlign.justify,
// style: Theme.of(context)
// .textTheme
// .headline1!
// .copyWith(fontSize: 28, color: orangeColor),
// ),
SizedBox(width: kDefaultPadding),
SvgPicture.asset(
"assets/icons/icon_right_translation.svg")
],
),
),
),
],
),
Column(
children: [
Stack(
children: [
SizedBox(height: kDefaultPadding),
Text(
DemoLocalization.of(context)!
.getTranslatedValue('gitaStoryDetail')
.toString(),
style: Theme.of(context).textTheme.subtitle1!.copyWith(
fontSize:
(Localizations.localeOf(context).languageCode ==
'hi')
? 20
: 18,
color: blackColor)),
SizedBox(height: kDefaultPadding * 1.5),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.all(kDefaultPadding * 2),
child: SvgPicture.asset(
'assets/icons/icon_quote_AboutGita.svg',
),
),
],
),
Positioned(
top: kDefaultPadding * 2.7,
left: 0,
right: 0,
child: Container(
child: Text(
SvgPicture.asset(
"assets/icons/icon_left_rtansection.svg"),
SizedBox(width: kDefaultPadding),
Text(
DemoLocalization.of(context)!
.getTranslatedValue('unlikeModernWriting')
.getTranslatedValue('conclusion')
.toString(),
textAlign: TextAlign.center,
style: Theme.of(context)
.textTheme
.headline1!
.copyWith(fontSize:
(Localizations.localeOf(context).languageCode == 'hi') ?
21 : 20, color: orangeColor),
.subtitle1!
.copyWith(
fontSize: (Localizations.localeOf(context)
.languageCode ==
'hi')
? 20
: 18,
fontWeight: FontWeight.w600),
),
),
),
],
),
],
),
Padding(
padding: const EdgeInsets.all(10),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: kDefaultPadding),
child: Column(
children: [
RichText(
textAlign: TextAlign.left,
text: TextSpan(
children: [
TextSpan(
text: DemoLocalization.of(context)!
.getTranslatedValue('gitaStory')
.toString(),
style: Theme.of(context)
.textTheme.subtitle1!
.copyWith(fontSize: (Localizations.localeOf(context).languageCode == 'hi') ?
20 : 18, color: blackColor),
)
SizedBox(width: kDefaultPadding),
SvgPicture.asset(
"assets/icons/icon_right_translation.svg")
],
),
),
SizedBox(height: kDefaultPadding * 1.5),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/icons/icon_left_rtansection.svg"),
SizedBox(width: kDefaultPadding),
Text(
DemoLocalization.of(context)!
.getTranslatedValue('story')
.toString(),
style: Theme.of(context).textTheme.subtitle1!.copyWith(
fontSize: (Localizations.localeOf(context).languageCode == 'hi') ?
20 : 18, fontWeight: FontWeight.w600),
),
SizedBox(width: kDefaultPadding),
SvgPicture.asset(
"assets/icons/icon_right_translation.svg")
],
),
SizedBox(height: kDefaultPadding),
Text(
SizedBox(height: kDefaultPadding),
Text(
DemoLocalization.of(context)!
.getTranslatedValue('gitaStoryDetail')
.getTranslatedValue('conclusionDetail')
.toString(),
style: Theme.of(context)
.textTheme.subtitle1!
.copyWith(fontSize: (Localizations.localeOf(context).languageCode == 'hi') ?
20 : 18, color: blackColor)),
SizedBox(height: kDefaultPadding * 1.5),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/icons/icon_left_rtansection.svg"),
SizedBox(width: kDefaultPadding),
Text(
DemoLocalization.of(context)!
.getTranslatedValue('conclusion')
.toString(),
style: Theme.of(context).textTheme.subtitle1!.copyWith(
fontSize: (Localizations.localeOf(context).languageCode == 'hi') ?
20 : 18, fontWeight: FontWeight.w600),
),
SizedBox(width: kDefaultPadding),
SvgPicture.asset(
"assets/icons/icon_right_translation.svg")
],
),
SizedBox(height: kDefaultPadding),
Text(
DemoLocalization.of(context)!
.getTranslatedValue('conclusionDetail')
.toString(),
style: Theme.of(context)
.textTheme.subtitle1!
.copyWith(fontSize: (Localizations.localeOf(context).languageCode == 'hi') ?
20 : 18, color: blackColor),
),
SizedBox(height: kDefaultPadding),
],
style: Theme.of(context).textTheme.subtitle1!.copyWith(
fontSize:
(Localizations.localeOf(context).languageCode ==
'hi')
? 20
: 18,
color: blackColor),
),
SizedBox(height: kDefaultPadding),
],
),
),
),
],
],
),
),
),
);
Expand Down
Loading