|
...
|
...
|
@@ -2482,16 +2482,16 @@ class Utils { |
|
|
|
|
|
|
|
paint.color = MyColours.color_99000000;
|
|
|
|
paint.style = PaintingStyle.fill;
|
|
|
|
if (Platform.isIOS) {
|
|
|
|
paint.style = PaintingStyle.fill;
|
|
|
|
}
|
|
|
|
// if (Platform.isIOS) {
|
|
|
|
// paint.style = PaintingStyle.fill;
|
|
|
|
// }
|
|
|
|
// 定义源矩形,通常是图像的全部
|
|
|
|
// final Rect source = Rect.fromLTWH(
|
|
|
|
// 0.0, 0.0, images.width.toDouble(), images.height.toDouble());
|
|
|
|
// // 定义目标矩形,即画布的大小
|
|
|
|
// final Rect destination = Rect.fromLTWH(0.0, 0.0, w(210), w(168));
|
|
|
|
// // 绘制图像
|
|
|
|
canvas.drawRect(Rect.fromLTWH(0, 0, 500, 52), paint);
|
|
|
|
canvas.drawRect(Rect.fromLTWH(0, 0, 500, 60), paint);
|
|
|
|
// canvas.drawImageRect(images, source, destination, paint);
|
|
|
|
|
|
|
|
// 定义源矩形,通常是图像的全部
|
|
...
|
...
|
@@ -2517,8 +2517,8 @@ class Utils { |
|
|
|
height: 1,
|
|
|
|
maxLines: 1,
|
|
|
|
ellipsis: '3',
|
|
|
|
fontSize: 24));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
|
|
fontSize: 38));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
|
|
|
|
pb2.addText(
|
|
|
|
'${Provider.of<UserModel>(context, listen: false).user!.sellername}');
|
|
|
|
|
|
...
|
...
|
@@ -2527,7 +2527,7 @@ class Utils { |
|
|
|
ui.Paragraph paragraph2 = pb2.build()..layout(pc2);
|
|
|
|
canvas.drawParagraph(paragraph2, Offset(0, 14));
|
|
|
|
|
|
|
|
canvas.drawRect(Rect.fromLTWH(0, 348, 500, 52), paint);
|
|
|
|
canvas.drawRect(Rect.fromLTWH(0, 340, 500, 60), paint);
|
|
|
|
|
|
|
|
// 绘制文字
|
|
|
|
ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
...
|
...
|
@@ -2535,14 +2535,14 @@ class Utils { |
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
height: 1,
|
|
|
|
fontSize: 24));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
|
|
fontSize: 38));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
|
|
|
|
pb.addText(time);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
|
|
|
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
|
|
canvas.drawParagraph(paragraph, Offset(0, 362));
|
|
|
|
canvas.drawParagraph(paragraph, Offset(0, 354));
|
|
|
|
|
|
|
|
// 绘制文字
|
|
|
|
// ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
...
|
...
|
@@ -2618,8 +2618,8 @@ class Utils { |
|
|
|
maxLines: 2,
|
|
|
|
height: 1,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 24));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
|
|
fontSize: 428));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 42));
|
|
|
|
pb2.addText(
|
|
|
|
'${Provider.of<UserModel>(context, listen: false).user!.sellername}');
|
|
|
|
|
|
...
|
...
|
@@ -2634,8 +2634,8 @@ class Utils { |
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
height: 1,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 48));
|
|
|
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
|
|
|
|
fontSize: 86));
|
|
|
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 86));
|
|
|
|
pb3.addText(month);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
...
|
...
|
@@ -2649,14 +2649,14 @@ class Utils { |
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
height: 1,
|
|
|
|
fontSize: 24));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
|
|
fontSize: 42));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 42));
|
|
|
|
pb.addText(time);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
|
|
|
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
|
|
canvas.drawParagraph(paragraph, Offset(0, 265));
|
|
|
|
canvas.drawParagraph(paragraph, Offset(0, 285));
|
|
|
|
|
|
|
|
//下面的代码是生成图片的关键代码,以上绘制文字和圆圈的代码可以忽略不计
|
|
|
|
var picture =
|
|
...
|
...
|
@@ -2721,8 +2721,8 @@ class Utils { |
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
maxLines: 2,
|
|
|
|
fontSize: 24));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
|
|
fontSize: 38));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
|
|
|
|
pb2.addText(
|
|
|
|
'${Provider.of<UserModel>(context, listen: false).user!.sellername}');
|
|
|
|
|
|
...
|
...
|
@@ -2737,14 +2737,14 @@ class Utils { |
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
height: 1,
|
|
|
|
fontSize: 48));
|
|
|
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
|
|
|
|
fontSize: 88));
|
|
|
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 88));
|
|
|
|
pb3.addText(month);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc3 = ui.ParagraphConstraints(width: 170);
|
|
|
|
ParagraphConstraints pc3 = ui.ParagraphConstraints(width: 270);
|
|
|
|
ui.Paragraph paragraph3 = pb3.build()..layout(pc3);
|
|
|
|
canvas.drawParagraph(paragraph3, Offset(265, 250));
|
|
|
|
canvas.drawParagraph(paragraph3, Offset(155, 250));
|
|
|
|
|
|
|
|
// 绘制文字
|
|
|
|
ui.ParagraphBuilder pb4 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
...
|
...
|
@@ -2752,18 +2752,18 @@ class Utils { |
|
|
|
height: 1,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 20));
|
|
|
|
pb4.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20));
|
|
|
|
fontSize: 38));
|
|
|
|
pb4.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
|
|
|
|
pb4.addText(week);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc4 = ui.ParagraphConstraints(width: 30);
|
|
|
|
ParagraphConstraints pc4 = ui.ParagraphConstraints(width: 40);
|
|
|
|
ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
|
|
|
|
canvas.drawParagraph(paragraph4, Offset(430, 250));
|
|
|
|
|
|
|
|
Rect rect = subType1 == '1'
|
|
|
|
? Rect.fromLTWH(315, 310, 140, 38)
|
|
|
|
: Rect.fromLTWH(386, 310, 67, 37);
|
|
|
|
? Rect.fromLTWH(250, 340, 220, 50)
|
|
|
|
: Rect.fromLTWH(362, 340, 104, 50);
|
|
|
|
paint.color = MyColours.color_66FFEFC5;
|
|
|
|
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
|
|
|
|
canvas.drawRRect(rRect, paint);
|
|
...
|
...
|
@@ -2775,13 +2775,13 @@ class Utils { |
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
height: 1,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 24));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
|
|
fontSize: 38));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
|
|
|
|
pb.addText(time);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
|
|
double width = subType1 == '1' ? 200 : 114;
|
|
|
|
Offset offset = subType1 == '1' ? Offset(285, 320) : Offset(360, 318);
|
|
|
|
double width = subType1 == '1' ? 240 : 154;
|
|
|
|
Offset offset = subType1 == '1' ? Offset(241, 349) : Offset(340, 349);
|
|
|
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: width);
|
|
|
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
|
|
canvas.drawParagraph(paragraph, offset);
|
|
...
|
...
|
@@ -2846,19 +2846,19 @@ class Utils { |
|
|
|
// }
|
|
|
|
// 绘制文字
|
|
|
|
ui.ParagraphBuilder pb2 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
maxLines: 1,
|
|
|
|
fontSize: 20));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20));
|
|
|
|
fontSize: 38));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
|
|
|
|
pb2.addText(
|
|
|
|
'${Provider.of<UserModel>(context, listen: false).user!.sellername}');
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc2 = ui.ParagraphConstraints(width: 320);
|
|
|
|
ParagraphConstraints pc2 = ui.ParagraphConstraints(width: 500);
|
|
|
|
ui.Paragraph paragraph2 = pb2.build()..layout(pc2);
|
|
|
|
canvas.drawParagraph(paragraph2, Offset(20, 337));
|
|
|
|
canvas.drawParagraph(paragraph2, Offset(0, 280));
|
|
|
|
|
|
|
|
// 绘制文字
|
|
|
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
...
|
...
|
@@ -2866,8 +2866,8 @@ class Utils { |
|
|
|
height: 1,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 20));
|
|
|
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20));
|
|
|
|
fontSize: 38));
|
|
|
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
|
|
|
|
pb3.addText(month);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
...
|
...
|
@@ -2933,34 +2933,46 @@ class Utils { |
|
|
|
var canvas = new Canvas(pictureRecorder); //canvas接受一个图片记录仪
|
|
|
|
var images = await loadImage(_thumbnail, true); // 使用方法获取Unit8List格式的图片
|
|
|
|
print(images);
|
|
|
|
|
|
|
|
Paint paint = Paint()
|
|
|
|
..color = Color.fromRGBO(81, 81, 81, 0.4)
|
|
|
|
..color = MyColours.color_66515151
|
|
|
|
..style = PaintingStyle.fill;
|
|
|
|
if (Platform.isIOS) {
|
|
|
|
paint = Paint()..style = PaintingStyle.fill;
|
|
|
|
}
|
|
|
|
// 定义源矩形,通常是图像的全部
|
|
|
|
final Rect source = Rect.fromLTWH(
|
|
|
|
0.0, 0.0, images.width.toDouble(), images.height.toDouble());
|
|
|
|
// 定义目标矩形,即画布的大小
|
|
|
|
final Rect destination = Rect.fromLTWH(0.0, 0.0, 500, 400);
|
|
|
|
// 绘制图像
|
|
|
|
canvas.drawImageRect(images, source, destination, paint);
|
|
|
|
if (Platform.isIOS) {
|
|
|
|
final paint1 = Paint()
|
|
|
|
..color = Colors.black.withOpacity(0.6)
|
|
|
|
..maskFilter = MaskFilter.blur(BlurStyle.normal, 5.0)
|
|
|
|
..style = PaintingStyle.fill;
|
|
|
|
// 绘制一个矩形作为蒙版
|
|
|
|
canvas.drawRect(Rect.fromLTRB(0, 0, 500, 400), paint1);
|
|
|
|
}
|
|
|
|
canvas.drawImage(images, Offset.zero, paint); //绘制原始图片
|
|
|
|
|
|
|
|
// paint.color = MyColours.color_99000000;
|
|
|
|
// paint.style = PaintingStyle.fill;
|
|
|
|
// if (Platform.isIOS) {
|
|
|
|
// paint.style = PaintingStyle.fill;
|
|
|
|
// }
|
|
|
|
// // 绘制图像
|
|
|
|
canvas.drawRect(Rect.fromLTWH(0, 0, 500, 400), paint);
|
|
|
|
|
|
|
|
// // 定义源矩形,通常是图像的全部
|
|
|
|
// final Rect source = Rect.fromLTWH(
|
|
|
|
// 0.0, 0.0, images.width.toDouble(), images.height.toDouble());
|
|
|
|
// // 定义目标矩形,即画布的大小
|
|
|
|
// final Rect destination = Rect.fromLTWH(0.0, 0.0, 500, 400);
|
|
|
|
// // 绘制图像
|
|
|
|
// canvas.drawImageRect(images, source, destination, paint);
|
|
|
|
// if (Platform.isIOS) {
|
|
|
|
// final paint1 = Paint()
|
|
|
|
// ..color = Colors.black.withOpacity(0.6)
|
|
|
|
// ..maskFilter = MaskFilter.blur(BlurStyle.normal, 5.0)
|
|
|
|
// ..style = PaintingStyle.fill;
|
|
|
|
// // 绘制一个矩形作为蒙版
|
|
|
|
// // canvas.drawRect(Rect.fromLTRB(0, 0, 500, 400), paint1);
|
|
|
|
// }
|
|
|
|
// 绘制文字
|
|
|
|
ui.ParagraphBuilder pb2 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 26));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 26));
|
|
|
|
height: 1,
|
|
|
|
fontSize: 28));
|
|
|
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 28));
|
|
|
|
pb2.addText(
|
|
|
|
'${Provider.of<UserModel>(context, listen: false).user!.sellername}');
|
|
|
|
|
|
...
|
...
|
@@ -2973,34 +2985,47 @@ class Utils { |
|
|
|
ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
height: 1,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 48));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
|
|
|
|
fontSize: 72));
|
|
|
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 72));
|
|
|
|
pb.addText(month);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
|
|
|
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
|
|
canvas.drawParagraph(paragraph, Offset(10, 150));
|
|
|
|
canvas.drawParagraph(paragraph, Offset(10, 160));
|
|
|
|
|
|
|
|
// 绘制文字
|
|
|
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
height: 1,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontSize: 42));
|
|
|
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 42));
|
|
|
|
fontSize: 36));
|
|
|
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 36));
|
|
|
|
pb3.addText(week);
|
|
|
|
|
|
|
|
// 设置文本的宽度约束
|
|
|
|
ParagraphConstraints pc3 = ui.ParagraphConstraints(width: 500);
|
|
|
|
ui.Paragraph paragraph3 = pb3.build()..layout(pc3);
|
|
|
|
canvas.drawParagraph(paragraph3, Offset(10, 230));
|
|
|
|
canvas.drawParagraph(paragraph3, Offset(10, 260));
|
|
|
|
|
|
|
|
//下面的代码是生成图片的关键代码,以上绘制文字和圆圈的代码可以忽略不计
|
|
|
|
var picture = await pictureRecorder
|
|
|
|
.endRecording()
|
|
|
|
.toImage(w(210).toInt(), w(168).toInt()); //设置生成图片的宽和高
|
|
|
|
// var picture = await pictureRecorder
|
|
|
|
// .endRecording()
|
|
|
|
// .toImage(w(210).toInt(), w(168).toInt()); //设置生成图片的宽和高
|
|
|
|
// var pngImageBytes =
|
|
|
|
// (await picture.toByteData(format: ui.ImageByteFormat.png))!;
|
|
|
|
// // var imgBytes = Uint8List.view(pngImageBytes.buffer); //这一行和下面这一行都是生成Uint8List格式的图片(原理还不知道)
|
|
|
|
// Uint8List pngBytes = pngImageBytes.buffer.asUint8List();
|
|
|
|
// print(pngBytes); //pngBytes可以放在Image.memory()中预览
|
|
|
|
|
|
|
|
// Uint8List result = await realComporessList(pngBytes); //压缩图片
|
|
|
|
// return result;
|
|
|
|
//下面的代码是生成图片的关键代码,以上绘制文字和圆圈的代码可以忽略不计
|
|
|
|
var picture =
|
|
|
|
await pictureRecorder.endRecording().toImage(500, 400); //设置生成图片的宽和高
|
|
|
|
var pngImageBytes =
|
|
|
|
(await picture.toByteData(format: ui.ImageByteFormat.png))!;
|
|
|
|
// var imgBytes = Uint8List.view(pngImageBytes.buffer); //这一行和下面这一行都是生成Uint8List格式的图片(原理还不知道)
|
|
...
|
...
|
@@ -3217,50 +3242,61 @@ class Utils { |
|
|
|
//画图
|
|
|
|
// 4种情况的图分别画出来
|
|
|
|
if (liteStyle == '1' || liteStyle == '2' || liteStyle == '3') {
|
|
|
|
liteStyle = '2-4';
|
|
|
|
}
|
|
|
|
List<String> subType = liteStyle!.split('-');
|
|
|
|
String subType0 = subType[0]; //几号模版
|
|
|
|
if (subType0 == '1') {
|
|
|
|
_thumbnailUint8List = await canvas(
|
|
|
|
String month =
|
|
|
|
'${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日';
|
|
|
|
String weekAndDsolt = returnWeek(dateTime, context) +
|
|
|
|
_getDsoltStrShow(ddateSolt, isCan: liteStyle == '1' ? false : true);
|
|
|
|
_thumbnailUint8List = await canvasold(
|
|
|
|
context,
|
|
|
|
sellerImage == null || sellerImage == ''
|
|
|
|
? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
|
|
|
|
: sellerImage,
|
|
|
|
dateTime,
|
|
|
|
liteStyle,
|
|
|
|
ddateSolt,
|
|
|
|
ddateHm);
|
|
|
|
} else if (subType0 == '2') {
|
|
|
|
_thumbnailUint8List = await canvas2(
|
|
|
|
context,
|
|
|
|
sellerImage == null || sellerImage == ''
|
|
|
|
? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
|
|
|
|
: sellerImage,
|
|
|
|
dateTime,
|
|
|
|
liteStyle,
|
|
|
|
ddateSolt,
|
|
|
|
ddateHm);
|
|
|
|
} else if (subType0 == '3') {
|
|
|
|
_thumbnailUint8List = await canvas3(
|
|
|
|
context,
|
|
|
|
sellerImage == null || sellerImage == ''
|
|
|
|
? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
|
|
|
|
: sellerImage,
|
|
|
|
dateTime,
|
|
|
|
liteStyle,
|
|
|
|
ddateSolt,
|
|
|
|
ddateHm);
|
|
|
|
month,
|
|
|
|
weekAndDsolt);
|
|
|
|
} else {
|
|
|
|
_thumbnailUint8List = await canvas4(
|
|
|
|
context,
|
|
|
|
sellerImage == null || sellerImage == ''
|
|
|
|
? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
|
|
|
|
: sellerImage,
|
|
|
|
dateTime,
|
|
|
|
liteStyle,
|
|
|
|
ddateSolt,
|
|
|
|
ddateHm);
|
|
|
|
List<String> subType = liteStyle!.split('-');
|
|
|
|
String subType0 = subType[0]; //几号模版
|
|
|
|
if (subType0 == '1') {
|
|
|
|
_thumbnailUint8List = await canvas(
|
|
|
|
context,
|
|
|
|
sellerImage == null || sellerImage == ''
|
|
|
|
? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
|
|
|
|
: sellerImage,
|
|
|
|
dateTime,
|
|
|
|
liteStyle,
|
|
|
|
ddateSolt,
|
|
|
|
ddateHm);
|
|
|
|
} else if (subType0 == '2') {
|
|
|
|
_thumbnailUint8List = await canvas2(
|
|
|
|
context,
|
|
|
|
sellerImage == null || sellerImage == ''
|
|
|
|
? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
|
|
|
|
: sellerImage,
|
|
|
|
dateTime,
|
|
|
|
liteStyle,
|
|
|
|
ddateSolt,
|
|
|
|
ddateHm);
|
|
|
|
} else if (subType0 == '3') {
|
|
|
|
_thumbnailUint8List = await canvas3(
|
|
|
|
context,
|
|
|
|
sellerImage == null || sellerImage == ''
|
|
|
|
? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
|
|
|
|
: sellerImage,
|
|
|
|
dateTime,
|
|
|
|
liteStyle,
|
|
|
|
ddateSolt,
|
|
|
|
ddateHm);
|
|
|
|
} else {
|
|
|
|
_thumbnailUint8List = await canvas4(
|
|
|
|
context,
|
|
|
|
sellerImage == null || sellerImage == ''
|
|
|
|
? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
|
|
|
|
: sellerImage,
|
|
|
|
dateTime,
|
|
|
|
liteStyle,
|
|
|
|
ddateSolt,
|
|
|
|
ddateHm);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String _title = liteStyleTitle ??
|
...
|
...
|
|