Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
fixed common_success_page.dart text scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuldevgarg committed Dec 26, 2023
1 parent 739e291 commit 93d20d4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ class NewConsumerBillState extends State<NewConsumerBill> {
: MediaQuery.of(context)
.size
.width /
1.12,
2.2,
child: OutlinedButton.icon(
onPressed: () => commonProvider
.getFileFromPDFBillService(
Expand Down
31 changes: 17 additions & 14 deletions frontend/mgramseva/lib/widgets/button_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,23 @@ class ButtonGroup extends StatelessWidget {
child: Row(
children: <Widget>[
Expanded(
child: OutlinedButton.icon(
onPressed: callBackIcon,
style: ElevatedButton.styleFrom(padding:EdgeInsets.symmetric(vertical: 8),alignment: Alignment.center,side:BorderSide(
width: 1,
color: Theme.of(context).disabledColor),
),
icon: (Image.asset('assets/png/whats_app.png', fit: BoxFit.fitHeight,)),
label: Padding(
padding: const EdgeInsets.symmetric(vertical: 12),
child: Text(
ApplicationLocalizations.of(context)
.translate(i18.common.SHARE_BILL_PDF),
style: Theme.of(context).textTheme.titleSmall)),
)),
child: Container(
height: 48,
child: OutlinedButton.icon(
onPressed: callBackIcon,
style: ElevatedButton.styleFrom(padding:EdgeInsets.symmetric(vertical: 5),alignment: Alignment.center,side:BorderSide(
width: 1,
color: Theme.of(context).disabledColor),
),
icon: (Image.asset('assets/png/whats_app.png', fit: BoxFit.fitHeight,)),
label: Padding(
padding: const EdgeInsets.symmetric(vertical: 0),
child: Text(
ApplicationLocalizations.of(context)
.translate(i18.common.SHARE_BILL_PDF),
style: Theme.of(context).textTheme.titleSmall)),
)),
),
Expanded(child: ShortButton(label, callBack))
],
),
Expand Down
4 changes: 4 additions & 0 deletions frontend/mgramseva/lib/widgets/common_success_page.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:mgramseva/model/success_handler.dart';
import 'package:mgramseva/utils/constants/i18_key_constants.dart';
Expand Down Expand Up @@ -112,6 +113,7 @@ class CommonSuccess extends StatelessWidget {
null
? successHandler.downloadLinkLabel!
: ''),
textScaleFactor: MediaQuery.of(context).size.width>340?0.9:0.68,
style: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryColor)),
Expand All @@ -132,6 +134,7 @@ class CommonSuccess extends StatelessWidget {
successHandler.printLabel != null
? successHandler.printLabel!
: ''),
textScaleFactor: MediaQuery.of(context).size.width>340?0.9:0.68,
style: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryColor)),
Expand All @@ -146,6 +149,7 @@ class CommonSuccess extends StatelessWidget {
label: Text(
ApplicationLocalizations.of(context)
.translate(i18.common.SHARE_BILL),
textScaleFactor: MediaQuery.of(context).size.width>340?0.9:0.68,
style: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryColor),
Expand Down
3 changes: 3 additions & 0 deletions frontend/mgramseva/lib/widgets/no_login_success_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class NoLoginSuccess extends StatelessWidget {
successHandler.downloadLinkLabel != null
? successHandler.downloadLinkLabel!
: ''),
textScaleFactor: MediaQuery.of(context).size.width>340?0.9:0.68,
style: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryColor)),
Expand All @@ -108,6 +109,7 @@ class NoLoginSuccess extends StatelessWidget {
successHandler.printLabel != null
? successHandler.printLabel!
: ''),
textScaleFactor: MediaQuery.of(context).size.width>340?0.9:0.68,
style: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryColor)),
Expand All @@ -122,6 +124,7 @@ class NoLoginSuccess extends StatelessWidget {
label: Text(
ApplicationLocalizations.of(context)
.translate(i18.common.SHARE_BILL),
textScaleFactor: MediaQuery.of(context).size.width>340?0.9:0.68,
style: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryColor),
Expand Down

0 comments on commit 93d20d4

Please sign in to comment.