From 0daf0aa15151e55207b952e159434abe2aae0256 Mon Sep 17 00:00:00 2001 From: zohra051 <37175388+zohra051@users.noreply.github.com> Date: Tue, 28 Jul 2020 15:50:35 +0200 Subject: [PATCH] (fix/big_card) : Big loyalty card render problem (#88) --- CHANGELOG.md | 1 + lib/pages/card_page.dart | 22 +++++++++++----------- lib/widgets/widget_loyaltyCards.dart | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f7ada9d..5aad897b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Loyalty Cards Page : Changed floating button icon - Widget_item : Product designation overflow - Share_one and Mainpage : Wishlist share process indicator visible on short process +- Card_page : Big loyalty card render problem ### Security diff --git a/lib/pages/card_page.dart b/lib/pages/card_page.dart index fc4744f1..0d2b4671 100644 --- a/lib/pages/card_page.dart +++ b/lib/pages/card_page.dart @@ -40,8 +40,9 @@ class CardsState extends State { bottomLeft: Radius.circular(22), bottomRight: Radius.circular(22))), ), - Padding( - padding: const EdgeInsets.only(top: 70.0, left: 32), + Positioned( + top: MediaQuery.of(context).size.width * 0.2, + left: MediaQuery.of(context).size.width * 0.1, child: Container( height: MediaQuery.of(context).size.height * 0.6, width: MediaQuery.of(context).size.width * 0.5, @@ -51,15 +52,13 @@ class CardsState extends State { ), ), Positioned( - top: MediaQuery.of(context).size.width * 0.6, + top: MediaQuery.of(context).size.width * 0.55, child: Container( - height: MediaQuery.of(context).size.height * 0.1, + height: MediaQuery.of(context).size.height * 0.2, width: MediaQuery.of(context).size.width * 0.8, child: Transform( child: BarcodeWidget( style: TextStyle(fontSize: 20), - height: 100, - width: 350, barcode: Barcode.ean13(), data: args.cards["barecode"], ), @@ -70,11 +69,11 @@ class CardsState extends State { ), ), Positioned( - top: MediaQuery.of(context).size.width * 0.7, - right: MediaQuery.of(context).size.width * 0.3, + right: MediaQuery.of(context).size.width * 0.23, child: Transform( child: Container( - width: MediaQuery.of(context).size.width * 0.4, + width: MediaQuery.of(context).size.width * 0.6, + height: MediaQuery.of(context).size.height * 0.85, alignment: Alignment.center, child: Text( args.cards["label"], @@ -86,8 +85,9 @@ class CardsState extends State { ..rotateZ(91 * 3.1415927 / 180), ), ), - Padding( - padding: const EdgeInsets.only(left: 240, top: 10), + Positioned( + top: MediaQuery.of(context).size.width * 0.05, + left: MediaQuery.of(context).size.width * 0.6, child: Container( height: 25, width: 25, diff --git a/lib/widgets/widget_loyaltyCards.dart b/lib/widgets/widget_loyaltyCards.dart index 1fe59e86..a4f40d60 100644 --- a/lib/widgets/widget_loyaltyCards.dart +++ b/lib/widgets/widget_loyaltyCards.dart @@ -91,7 +91,7 @@ class LoyaltyCardsWidgetState extends State { width: 180, child: TextField( inputFormatters: [ - LengthLimitingTextInputFormatter(10), + LengthLimitingTextInputFormatter(25), ], textAlign: TextAlign.center, style: TextStyle(fontSize: 18),