|
@@ -2781,7 +2781,7 @@ class Utils { |
|
@@ -2781,7 +2781,7 @@ class Utils { |
|
2781
|
|
2781
|
|
|
2782
|
// 设置文本的宽度约束
|
2782
|
// 设置文本的宽度约束
|
|
2783
|
double width = subType1 == '1' ? 240 : 154;
|
2783
|
double width = subType1 == '1' ? 240 : 154;
|
|
2784
|
- Offset offset = subType1 == '1' ? Offset(241, 349) : Offset(340, 349);
|
2784
|
+ Offset offset = subType1 == '1' ? Offset(241, 349) : Offset(338, 349);
|
|
2785
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: width);
|
2785
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: width);
|
|
2786
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
2786
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
2787
|
canvas.drawParagraph(paragraph, offset);
|
2787
|
canvas.drawParagraph(paragraph, offset);
|
|
@@ -2813,7 +2813,7 @@ class Utils { |
|
@@ -2813,7 +2813,7 @@ class Utils { |
|
2813
|
String subType1 = subType[1]; //模版下面的子样式
|
2813
|
String subType1 = subType[1]; //模版下面的子样式
|
|
2814
|
|
2814
|
|
|
2815
|
String month =
|
2815
|
String month =
|
|
2816
|
- '${Utils.addZeroNumber(date.month)}/${Utils.addZeroNumber(date.day)}';
|
2816
|
+ '${Utils.addZeroNumber(date.month)}/${Utils.addZeroNumber(date.day)} ';
|
|
2817
|
String week = returnWeek(date, context);
|
2817
|
String week = returnWeek(date, context);
|
|
2818
|
String hour = subType1 == '1' || subType1 == '3' ? '${ddateHm}' : '';
|
2818
|
String hour = subType1 == '1' || subType1 == '3' ? '${ddateHm}' : '';
|
|
2819
|
String section = subType1 == '1' || subType1 == '4'
|
2819
|
String section = subType1 == '1' || subType1 == '4'
|
|
@@ -2823,7 +2823,7 @@ class Utils { |
|
@@ -2823,7 +2823,7 @@ class Utils { |
|
2823
|
: '';
|
2823
|
: '';
|
|
2824
|
|
2824
|
|
|
2825
|
if (section != '' && hour != '') {
|
2825
|
if (section != '' && hour != '') {
|
|
2826
|
- hour = hour + ' ';
|
2826
|
+ hour = hour + ' ';
|
|
2827
|
}
|
2827
|
}
|
|
2828
|
|
2828
|
|
|
2829
|
String time = hour + section;
|
2829
|
String time = hour + section;
|
|
@@ -2834,7 +2834,7 @@ class Utils { |
|
@@ -2834,7 +2834,7 @@ class Utils { |
|
2834
|
// paint.style = PaintingStyle.fill;
|
2834
|
// paint.style = PaintingStyle.fill;
|
|
2835
|
// }
|
2835
|
// }
|
|
2836
|
// // 绘制图像
|
2836
|
// // 绘制图像
|
|
2837
|
- canvas.drawRect(Rect.fromLTWH(0, 300, 500, 100), paint);
|
2837
|
+ canvas.drawRect(Rect.fromLTWH(0, 267, 500, 133), paint);
|
|
2838
|
|
2838
|
|
|
2839
|
// if (Platform.isIOS) {
|
2839
|
// if (Platform.isIOS) {
|
|
2840
|
// final paint1 = Paint()
|
2840
|
// final paint1 = Paint()
|
|
@@ -2858,7 +2858,7 @@ class Utils { |
|
@@ -2858,7 +2858,7 @@ class Utils { |
|
2858
|
// 设置文本的宽度约束
|
2858
|
// 设置文本的宽度约束
|
|
2859
|
ParagraphConstraints pc2 = ui.ParagraphConstraints(width: 500);
|
2859
|
ParagraphConstraints pc2 = ui.ParagraphConstraints(width: 500);
|
|
2860
|
ui.Paragraph paragraph2 = pb2.build()..layout(pc2);
|
2860
|
ui.Paragraph paragraph2 = pb2.build()..layout(pc2);
|
|
2861
|
- canvas.drawParagraph(paragraph2, Offset(0, 280));
|
2861
|
+ canvas.drawParagraph(paragraph2, Offset(0, 275));
|
|
2862
|
|
2862
|
|
|
2863
|
// 绘制文字
|
2863
|
// 绘制文字
|
|
2864
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
2864
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
@@ -2868,29 +2868,30 @@ class Utils { |
|
@@ -2868,29 +2868,30 @@ class Utils { |
|
2868
|
fontStyle: FontStyle.normal,
|
2868
|
fontStyle: FontStyle.normal,
|
|
2869
|
fontSize: 38));
|
2869
|
fontSize: 38));
|
|
2870
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
|
2870
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
|
|
2871
|
- pb3.addText(month);
|
2871
|
+ pb3.addText(month + week);
|
|
2872
|
|
2872
|
|
|
2873
|
// 设置文本的宽度约束
|
2873
|
// 设置文本的宽度约束
|
|
2874
|
- ParagraphConstraints pc3 = ui.ParagraphConstraints(width: 80);
|
2874
|
+ ParagraphConstraints pc3 = ui.ParagraphConstraints(width: 240);
|
|
2875
|
ui.Paragraph paragraph3 = pb3.build()..layout(pc3);
|
2875
|
ui.Paragraph paragraph3 = pb3.build()..layout(pc3);
|
|
2876
|
- canvas.drawParagraph(paragraph3, Offset(340, 320));
|
2876
|
+ canvas.drawParagraph(paragraph3, Offset(subType1 == '1' ? 8 : 65, 345));
|
|
2877
|
|
2877
|
|
|
2878
|
- // 绘制文字
|
|
|
|
2879
|
- ui.ParagraphBuilder pb4 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
2880
|
- textAlign: TextAlign.center,
|
|
|
|
2881
|
- height: 1,
|
|
|
|
2882
|
- fontWeight: FontWeight.bold,
|
|
|
|
2883
|
- fontStyle: FontStyle.normal,
|
|
|
|
2884
|
- fontSize: 20));
|
|
|
|
2885
|
- pb4.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20));
|
|
|
|
2886
|
- pb4.addText(week);
|
2878
|
+ // // 绘制文字
|
|
|
|
2879
|
+ // ui.ParagraphBuilder pb4 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
|
|
2880
|
+ // textAlign: TextAlign.center,
|
|
|
|
2881
|
+ // height: 1,
|
|
|
|
2882
|
+ // fontWeight: FontWeight.bold,
|
|
|
|
2883
|
+ // fontStyle: FontStyle.normal,
|
|
|
|
2884
|
+ // fontSize: 20));
|
|
|
|
2885
|
+ // pb4.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20));
|
|
|
|
2886
|
+ // pb4.addText(week);
|
|
2887
|
|
2887
|
|
|
2888
|
- // 设置文本的宽度约束
|
|
|
|
2889
|
- ParagraphConstraints pc4 = ui.ParagraphConstraints(width: 50);
|
|
|
|
2890
|
- ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
|
|
|
|
2891
|
- canvas.drawParagraph(paragraph4, Offset(420, 320));
|
2888
|
+ // // 设置文本的宽度约束
|
|
|
|
2889
|
+ // ParagraphConstraints pc4 = ui.ParagraphConstraints(width: 50);
|
|
|
|
2890
|
+ // ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
|
|
|
|
2891
|
+ // canvas.drawParagraph(paragraph4, Offset(420, 320));
|
|
2892
|
|
2892
|
|
|
2893
|
- Rect rect = Rect.fromLTWH(350, 348, 118, 30);
|
2893
|
+ Rect rect = Rect.fromLTWH(
|
|
|
|
2894
|
+ subType1 == '1' ? 265 : 315, 335, subType1 == '1' ? 210 : 112, 50);
|
|
2894
|
paint.color = MyColours.color_66FFEFC5;
|
2895
|
paint.color = MyColours.color_66FFEFC5;
|
|
2895
|
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
|
2896
|
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
|
|
2896
|
canvas.drawRRect(rRect, paint);
|
2897
|
canvas.drawRRect(rRect, paint);
|
|
@@ -2903,14 +2904,15 @@ class Utils { |
|
@@ -2903,14 +2904,15 @@ class Utils { |
|
2903
|
fontWeight: FontWeight.bold,
|
2904
|
fontWeight: FontWeight.bold,
|
|
2904
|
height: 1,
|
2905
|
height: 1,
|
|
2905
|
fontStyle: FontStyle.normal,
|
2906
|
fontStyle: FontStyle.normal,
|
|
2906
|
- fontSize: 20));
|
|
|
|
2907
|
- pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20));
|
2907
|
+ fontSize: 38));
|
|
|
|
2908
|
+ pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 38));
|
|
2908
|
pb.addText(time);
|
2909
|
pb.addText(time);
|
|
2909
|
|
2910
|
|
|
2910
|
// 设置文本的宽度约束
|
2911
|
// 设置文本的宽度约束
|
|
2911
|
|
2912
|
|
|
2912
|
- Offset offset = subType1 == '1' ? Offset(348, 353) : Offset(348, 353);
|
|
|
|
2913
|
- ParagraphConstraints pc = ui.ParagraphConstraints(width: 118);
|
2913
|
+ Offset offset = subType1 == '1' ? Offset(265, 345) : Offset(315, 345);
|
|
|
|
2914
|
+ ParagraphConstraints pc =
|
|
|
|
2915
|
+ ui.ParagraphConstraints(width: subType1 == '1' ? 210 : 112);
|
|
2914
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
2916
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
2915
|
canvas.drawParagraph(paragraph, offset);
|
2917
|
canvas.drawParagraph(paragraph, offset);
|
|
2916
|
|
2918
|
|
|
@@ -2934,13 +2936,13 @@ class Utils { |
|
@@ -2934,13 +2936,13 @@ class Utils { |
|
2934
|
var images = await loadImage(_thumbnail, true); // 使用方法获取Unit8List格式的图片
|
2936
|
var images = await loadImage(_thumbnail, true); // 使用方法获取Unit8List格式的图片
|
|
2935
|
print(images);
|
2937
|
print(images);
|
|
2936
|
|
2938
|
|
|
2937
|
- Paint paint = Paint()
|
|
|
|
2938
|
- ..color = MyColours.color_66515151
|
|
|
|
2939
|
- ..style = PaintingStyle.fill;
|
|
|
|
2940
|
- if (Platform.isIOS) {
|
|
|
|
2941
|
- paint = Paint()..style = PaintingStyle.fill;
|
|
|
|
2942
|
- }
|
|
|
|
2943
|
- canvas.drawImage(images, Offset.zero, paint); //绘制原始图片
|
2939
|
+ final Paint paint = Paint();
|
|
|
|
2940
|
+ canvas.drawImage(images, Offset.zero, paint); //绘制原始图片 Paint paint = Paint()
|
|
|
|
2941
|
+ paint.color = MyColours.color_99000000;
|
|
|
|
2942
|
+ paint.style = PaintingStyle.fill;
|
|
|
|
2943
|
+ // if (Platform.isIOS) {
|
|
|
|
2944
|
+ // paint = Paint()..style = PaintingStyle.fill;
|
|
|
|
2945
|
+ // }
|
|
2944
|
|
2946
|
|
|
2945
|
// paint.color = MyColours.color_99000000;
|
2947
|
// paint.color = MyColours.color_99000000;
|
|
2946
|
// paint.style = PaintingStyle.fill;
|
2948
|
// paint.style = PaintingStyle.fill;
|