We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is my code : Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded( child: Receipt( backgroundColor: AppColors.white, onInitialized: (ctr) { controller = ctr; }, builder: (context) => Container( padding: EdgeInsets.symmetric(horizontal: 4.w, vertical: 48.h), child: Column( children: [ SizedBox( width: 250.w, child: QrImage( data: jsonEncode(qrJson), version: QrVersions.auto, backgroundColor: AppColors.white, ), ), SizedBox(height: 24.h), _buildText( isEnglish ? event.nameEn : event.nameAr, ), SizedBox(height: 12.h), _buildText(phoneNumber), SizedBox(height: 12.h), _buildText( DateFormatter.getDDMMYYYY2(eventDay, code: code)), SizedBox(height: 12.h), _buildText(isEnglish ? event.locationNameEn : event.locationNameAr), ], ), ), ), ), ], ),
the widget is printed in leftCenter of papper. how can align it in the center? , as the widget in the center of screen. thanks
The text was updated successfully, but these errors were encountered:
try to set Center inside _buildText widget
Sorry, something went wrong.
No branches or pull requests
This is my code :
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Receipt(
backgroundColor: AppColors.white,
onInitialized: (ctr) {
controller = ctr;
},
builder: (context) => Container(
padding: EdgeInsets.symmetric(horizontal: 4.w, vertical: 48.h),
child: Column(
children: [
SizedBox(
width: 250.w,
child: QrImage(
data: jsonEncode(qrJson),
version: QrVersions.auto,
backgroundColor: AppColors.white,
),
),
SizedBox(height: 24.h),
_buildText(
isEnglish ? event.nameEn : event.nameAr,
),
SizedBox(height: 12.h),
_buildText(phoneNumber),
SizedBox(height: 12.h),
_buildText(
DateFormatter.getDDMMYYYY2(eventDay, code: code)),
SizedBox(height: 12.h),
_buildText(isEnglish
? event.locationNameEn
: event.locationNameAr),
],
),
),
),
),
],
),
the widget is printed in leftCenter of papper. how can align it in the center? , as the widget in the center of screen.
thanks
The text was updated successfully, but these errors were encountered: