海报二维码样式变更

master
laiiihz 5 years ago
parent c3a9f4461e
commit 75570cea68

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

@ -1,3 +1,5 @@
import 'dart:math';
import 'package:extended_image/extended_image.dart';
import 'package:extended_text/extended_text.dart';
import 'package:flutter/material.dart';
@ -399,22 +401,55 @@ class PostBottomWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
QrImage(
padding: EdgeInsets.all(0),
data: qrCode,
size: 50,
gapless: false,
Container(
height: 60,
width: 60,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(R.ASSETS_SHOP_QR_BOX_PNG),
),
),
alignment: Alignment.center,
child: ShaderMask(
blendMode: BlendMode.srcATop,
shaderCallback: (bounds) {
return SweepGradient(
colors: [
Color.fromRGBO(177, 14, 19, 1),
Color.fromRGBO(177, 14, 19, 1),
Color.fromRGBO(234, 94, 87, 1),
Color.fromRGBO(234, 94, 87, 1),
Color.fromRGBO(62, 100, 93, 1),
Color.fromRGBO(62, 100, 93, 1),
Color.fromRGBO(252, 185, 73, 1),
Color.fromRGBO(252, 185, 73, 1),
Color.fromRGBO(177, 14, 19, 1),
],
stops: [0, 0.25, 0.25, 0.5, 0.5, 0.75, 0.75, 1, 1],
transform: GradientRotation(pi / 4.1),
).createShader(bounds);
},
child: Transform.scale(
scale: 0.65,
child: QrImage(
padding: EdgeInsets.all(0),
data: qrCode,
size: 60,
gapless: true,
),
),
),
),
Container(
margin: EdgeInsets.only(top: 5),
// margin: EdgeInsets.only(top: 5),
child: Text(
"长按二维码立购",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 8,
color: Color(0xff333333),
),
))
"长按二维码立购",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 8,
color: Color(0xff333333),
),
))
],
),
)

Loading…
Cancel
Save