|
@@ -2507,6 +2507,7 @@ class Utils { |
|
@@ -2507,6 +2507,7 @@ class Utils { |
|
2507
|
textAlign: TextAlign.center,
|
2507
|
textAlign: TextAlign.center,
|
|
2508
|
fontWeight: FontWeight.bold,
|
2508
|
fontWeight: FontWeight.bold,
|
|
2509
|
fontStyle: FontStyle.normal,
|
2509
|
fontStyle: FontStyle.normal,
|
|
|
|
2510
|
+ height: 1,
|
|
2510
|
maxLines: 1,
|
2511
|
maxLines: 1,
|
|
2511
|
ellipsis: '3',
|
2512
|
ellipsis: '3',
|
|
2512
|
fontSize: 24));
|
2513
|
fontSize: 24));
|
|
@@ -2517,7 +2518,7 @@ class Utils { |
|
@@ -2517,7 +2518,7 @@ class Utils { |
|
2517
|
// 设置文本的宽度约束
|
2518
|
// 设置文本的宽度约束
|
|
2518
|
ParagraphConstraints pc2 = ui.ParagraphConstraints(width: 500);
|
2519
|
ParagraphConstraints pc2 = ui.ParagraphConstraints(width: 500);
|
|
2519
|
ui.Paragraph paragraph2 = pb2.build()..layout(pc2);
|
2520
|
ui.Paragraph paragraph2 = pb2.build()..layout(pc2);
|
|
2520
|
- canvas.drawParagraph(paragraph2, Offset(0, 12));
|
2521
|
+ canvas.drawParagraph(paragraph2, Offset(0, 14));
|
|
2521
|
|
2522
|
|
|
2522
|
canvas.drawRect(Rect.fromLTWH(0, 348, 500, 52), paint);
|
2523
|
canvas.drawRect(Rect.fromLTWH(0, 348, 500, 52), paint);
|
|
2523
|
|
2524
|
|
|
@@ -2526,6 +2527,7 @@ class Utils { |
|
@@ -2526,6 +2527,7 @@ class Utils { |
|
2526
|
textAlign: TextAlign.center,
|
2527
|
textAlign: TextAlign.center,
|
|
2527
|
fontWeight: FontWeight.bold,
|
2528
|
fontWeight: FontWeight.bold,
|
|
2528
|
fontStyle: FontStyle.normal,
|
2529
|
fontStyle: FontStyle.normal,
|
|
|
|
2530
|
+ height: 1,
|
|
2529
|
fontSize: 24));
|
2531
|
fontSize: 24));
|
|
2530
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
2532
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
2531
|
pb.addText(time);
|
2533
|
pb.addText(time);
|
|
@@ -2533,7 +2535,7 @@ class Utils { |
|
@@ -2533,7 +2535,7 @@ class Utils { |
|
2533
|
// 设置文本的宽度约束
|
2535
|
// 设置文本的宽度约束
|
|
2534
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
|
2536
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
|
|
2535
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
2537
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
2536
|
- canvas.drawParagraph(paragraph, Offset(0, 360));
|
2538
|
+ canvas.drawParagraph(paragraph, Offset(0, 362));
|
|
2537
|
|
2539
|
|
|
2538
|
// 绘制文字
|
2540
|
// 绘制文字
|
|
2539
|
// ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
2541
|
// ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
@@ -2607,6 +2609,7 @@ class Utils { |
|
@@ -2607,6 +2609,7 @@ class Utils { |
|
2607
|
textAlign: TextAlign.center,
|
2609
|
textAlign: TextAlign.center,
|
|
2608
|
fontWeight: FontWeight.bold,
|
2610
|
fontWeight: FontWeight.bold,
|
|
2609
|
maxLines: 2,
|
2611
|
maxLines: 2,
|
|
|
|
2612
|
+ height: 1,
|
|
2610
|
fontStyle: FontStyle.normal,
|
2613
|
fontStyle: FontStyle.normal,
|
|
2611
|
fontSize: 24));
|
2614
|
fontSize: 24));
|
|
2612
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
2615
|
pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
@@ -2622,6 +2625,7 @@ class Utils { |
|
@@ -2622,6 +2625,7 @@ class Utils { |
|
2622
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
2625
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
2623
|
textAlign: TextAlign.center,
|
2626
|
textAlign: TextAlign.center,
|
|
2624
|
fontWeight: FontWeight.bold,
|
2627
|
fontWeight: FontWeight.bold,
|
|
|
|
2628
|
+ height: 1,
|
|
2625
|
fontStyle: FontStyle.normal,
|
2629
|
fontStyle: FontStyle.normal,
|
|
2626
|
fontSize: 48));
|
2630
|
fontSize: 48));
|
|
2627
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
|
2631
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
|
|
@@ -2637,6 +2641,7 @@ class Utils { |
|
@@ -2637,6 +2641,7 @@ class Utils { |
|
2637
|
textAlign: TextAlign.center,
|
2641
|
textAlign: TextAlign.center,
|
|
2638
|
fontWeight: FontWeight.bold,
|
2642
|
fontWeight: FontWeight.bold,
|
|
2639
|
fontStyle: FontStyle.normal,
|
2643
|
fontStyle: FontStyle.normal,
|
|
|
|
2644
|
+ height: 1,
|
|
2640
|
fontSize: 24));
|
2645
|
fontSize: 24));
|
|
2641
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
2646
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
2642
|
pb.addText(time);
|
2647
|
pb.addText(time);
|
|
@@ -2644,7 +2649,7 @@ class Utils { |
|
@@ -2644,7 +2649,7 @@ class Utils { |
|
2644
|
// 设置文本的宽度约束
|
2649
|
// 设置文本的宽度约束
|
|
2645
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
|
2650
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
|
|
2646
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
2651
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
2647
|
- canvas.drawParagraph(paragraph, Offset(0, 270));
|
2652
|
+ canvas.drawParagraph(paragraph, Offset(0, 265));
|
|
2648
|
|
2653
|
|
|
2649
|
//下面的代码是生成图片的关键代码,以上绘制文字和圆圈的代码可以忽略不计
|
2654
|
//下面的代码是生成图片的关键代码,以上绘制文字和圆圈的代码可以忽略不计
|
|
2650
|
var picture =
|
2655
|
var picture =
|
|
@@ -2681,7 +2686,7 @@ class Utils { |
|
@@ -2681,7 +2686,7 @@ class Utils { |
|
2681
|
? _getDsoltStrShow(dsolt, isCan: false)
|
2686
|
? _getDsoltStrShow(dsolt, isCan: false)
|
|
2682
|
: '';
|
2687
|
: '';
|
|
2683
|
|
2688
|
|
|
2684
|
- if (hour != '') {
|
2689
|
+ if (hour != '' && section != '') {
|
|
2685
|
section = section + ' ';
|
2690
|
section = section + ' ';
|
|
2686
|
}
|
2691
|
}
|
|
2687
|
|
2692
|
|
|
@@ -2724,6 +2729,7 @@ class Utils { |
|
@@ -2724,6 +2729,7 @@ class Utils { |
|
2724
|
textAlign: TextAlign.center,
|
2729
|
textAlign: TextAlign.center,
|
|
2725
|
fontWeight: FontWeight.bold,
|
2730
|
fontWeight: FontWeight.bold,
|
|
2726
|
fontStyle: FontStyle.normal,
|
2731
|
fontStyle: FontStyle.normal,
|
|
|
|
2732
|
+ height: 1,
|
|
2727
|
fontSize: 48));
|
2733
|
fontSize: 48));
|
|
2728
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
|
2734
|
pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
|
|
2729
|
pb3.addText(month);
|
2735
|
pb3.addText(month);
|
|
@@ -2746,11 +2752,11 @@ class Utils { |
|
@@ -2746,11 +2752,11 @@ class Utils { |
|
2746
|
// 设置文本的宽度约束
|
2752
|
// 设置文本的宽度约束
|
|
2747
|
ParagraphConstraints pc4 = ui.ParagraphConstraints(width: 30);
|
2753
|
ParagraphConstraints pc4 = ui.ParagraphConstraints(width: 30);
|
|
2748
|
ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
|
2754
|
ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
|
|
2749
|
- canvas.drawParagraph(paragraph4, Offset(430, 264));
|
2755
|
+ canvas.drawParagraph(paragraph4, Offset(430, 250));
|
|
2750
|
|
2756
|
|
|
2751
|
Rect rect = subType1 == '1'
|
2757
|
Rect rect = subType1 == '1'
|
|
2752
|
- ? Rect.fromLTWH(315, 317, 140, 38)
|
|
|
|
2753
|
- : Rect.fromLTWH(387, 317, 67, 36);
|
2758
|
+ ? Rect.fromLTWH(315, 310, 140, 38)
|
|
|
|
2759
|
+ : Rect.fromLTWH(386, 310, 67, 37);
|
|
2754
|
paint.color = MyColours.color_66FFEFC5;
|
2760
|
paint.color = MyColours.color_66FFEFC5;
|
|
2755
|
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
|
2761
|
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
|
|
2756
|
canvas.drawRRect(rRect, paint);
|
2762
|
canvas.drawRRect(rRect, paint);
|
|
@@ -2760,14 +2766,15 @@ class Utils { |
|
@@ -2760,14 +2766,15 @@ class Utils { |
|
2760
|
ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle(
|
2766
|
ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
2761
|
textAlign: TextAlign.center,
|
2767
|
textAlign: TextAlign.center,
|
|
2762
|
fontWeight: FontWeight.bold,
|
2768
|
fontWeight: FontWeight.bold,
|
|
|
|
2769
|
+ height: 1,
|
|
2763
|
fontStyle: FontStyle.normal,
|
2770
|
fontStyle: FontStyle.normal,
|
|
2764
|
fontSize: 24));
|
2771
|
fontSize: 24));
|
|
2765
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
2772
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
|
|
2766
|
pb.addText(time);
|
2773
|
pb.addText(time);
|
|
2767
|
|
2774
|
|
|
2768
|
// 设置文本的宽度约束
|
2775
|
// 设置文本的宽度约束
|
|
2769
|
- double width = subType1 == '1' ? 200 : 100;
|
|
|
|
2770
|
- Offset offset = subType1 == '1' ? Offset(285, 320) : Offset(370, 320);
|
2776
|
+ double width = subType1 == '1' ? 200 : 114;
|
|
|
|
2777
|
+ Offset offset = subType1 == '1' ? Offset(285, 320) : Offset(360, 318);
|
|
2771
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: width);
|
2778
|
ParagraphConstraints pc = ui.ParagraphConstraints(width: width);
|
|
2772
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
2779
|
ui.Paragraph paragraph = pb.build()..layout(pc);
|
|
2773
|
canvas.drawParagraph(paragraph, offset);
|
2780
|
canvas.drawParagraph(paragraph, offset);
|
|
@@ -2849,6 +2856,7 @@ class Utils { |
|
@@ -2849,6 +2856,7 @@ class Utils { |
|
2849
|
// 绘制文字
|
2856
|
// 绘制文字
|
|
2850
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
2857
|
ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
2851
|
textAlign: TextAlign.center,
|
2858
|
textAlign: TextAlign.center,
|
|
|
|
2859
|
+ height: 1,
|
|
2852
|
fontWeight: FontWeight.bold,
|
2860
|
fontWeight: FontWeight.bold,
|
|
2853
|
fontStyle: FontStyle.normal,
|
2861
|
fontStyle: FontStyle.normal,
|
|
2854
|
fontSize: 20));
|
2862
|
fontSize: 20));
|
|
@@ -2863,7 +2871,7 @@ class Utils { |
|
@@ -2863,7 +2871,7 @@ class Utils { |
|
2863
|
// 绘制文字
|
2871
|
// 绘制文字
|
|
2864
|
ui.ParagraphBuilder pb4 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
2872
|
ui.ParagraphBuilder pb4 = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
2865
|
textAlign: TextAlign.center,
|
2873
|
textAlign: TextAlign.center,
|
|
2866
|
- // height: 1,
|
2874
|
+ height: 1,
|
|
2867
|
fontWeight: FontWeight.bold,
|
2875
|
fontWeight: FontWeight.bold,
|
|
2868
|
fontStyle: FontStyle.normal,
|
2876
|
fontStyle: FontStyle.normal,
|
|
2869
|
fontSize: 20));
|
2877
|
fontSize: 20));
|
|
@@ -2875,16 +2883,18 @@ class Utils { |
|
@@ -2875,16 +2883,18 @@ class Utils { |
|
2875
|
ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
|
2883
|
ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
|
|
2876
|
canvas.drawParagraph(paragraph4, Offset(420, 320));
|
2884
|
canvas.drawParagraph(paragraph4, Offset(420, 320));
|
|
2877
|
|
2885
|
|
|
2878
|
- Rect rect = Rect.fromLTWH(350, 351, 118, 30);
|
2886
|
+ Rect rect = Rect.fromLTWH(350, 348, 118, 30);
|
|
2879
|
paint.color = MyColours.color_66FFEFC5;
|
2887
|
paint.color = MyColours.color_66FFEFC5;
|
|
2880
|
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
|
2888
|
RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
|
|
2881
|
canvas.drawRRect(rRect, paint);
|
2889
|
canvas.drawRRect(rRect, paint);
|
|
|
|
2890
|
+
|
|
2882
|
paint.color = MyColours.color_99000000;
|
2891
|
paint.color = MyColours.color_99000000;
|
|
2883
|
|
2892
|
|
|
2884
|
// 绘制文字
|
2893
|
// 绘制文字
|
|
2885
|
ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle(
|
2894
|
ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle(
|
|
2886
|
textAlign: TextAlign.center,
|
2895
|
textAlign: TextAlign.center,
|
|
2887
|
fontWeight: FontWeight.bold,
|
2896
|
fontWeight: FontWeight.bold,
|
|
|
|
2897
|
+ height: 1,
|
|
2888
|
fontStyle: FontStyle.normal,
|
2898
|
fontStyle: FontStyle.normal,
|
|
2889
|
fontSize: 20));
|
2899
|
fontSize: 20));
|
|
2890
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20));
|
2900
|
pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20));
|
|
@@ -3198,6 +3208,9 @@ class Utils { |
|
@@ -3198,6 +3208,9 @@ class Utils { |
|
3198
|
if (liteStyle != '0') {
|
3208
|
if (liteStyle != '0') {
|
|
3199
|
//画图
|
3209
|
//画图
|
|
3200
|
// 4种情况的图分别画出来
|
3210
|
// 4种情况的图分别画出来
|
|
|
|
3211
|
+ if (liteStyle == '1' || liteStyle == '2' || liteStyle == '3') {
|
|
|
|
3212
|
+ liteStyle = '2-3';
|
|
|
|
3213
|
+ }
|
|
3201
|
List<String> subType = liteStyle!.split('-');
|
3214
|
List<String> subType = liteStyle!.split('-');
|
|
3202
|
String subType0 = subType[0]; //几号模版
|
3215
|
String subType0 = subType[0]; //几号模版
|
|
3203
|
if (subType0 == '1') {
|
3216
|
if (subType0 == '1') {
|