- feat(sync): SyncEngine 接入 EditorPage, 保存时 enqueue + 网络恢复自动 trySync - fix(editor): authorId 从 AuthBloc 获取, 替代硬编码 'local' - fix(bloc): class_bloc/calendar/profile/parent catch(_).全部改为 debugPrint - feat(editor): 编辑器工具栏拆分 (brush_panel/tag_panel/text_format_bar/dot_grid_painter) - feat(editor): EditorBloc 扩展 + EditorPage 增强 - feat(search): SearchBloc 扩展搜索功能 - feat(home): HomeBloc/HomePage 增强 - feat(auth): LoginPage 增强 - feat(templates): TemplateGalleryPage 重构 - fix(web): 管理端班级/日记页面修复 - fix(server): comment_service + theme_handler 修复 - docs: 添加全链路审计报告和验证截图
29 lines
785 B
Dart
29 lines
785 B
Dart
// 点阵背景画笔 — 24x24px 间距,1px 圆点
|
||
// 用于日记编辑区域提供纸质感背景
|
||
|
||
import 'package:flutter/material.dart';
|
||
|
||
/// 点阵背景画笔 -- 24x24px 间距,1px 圆点
|
||
class DotGridPainter extends CustomPainter {
|
||
const DotGridPainter();
|
||
|
||
@override
|
||
void paint(Canvas canvas, Size size) {
|
||
final paint = Paint()
|
||
..color = const Color(0xFF2D2420).withOpacity(0.15)
|
||
..style = PaintingStyle.fill;
|
||
|
||
const spacing = 24.0;
|
||
const dotRadius = 1.0;
|
||
|
||
for (double x = spacing; x < size.width; x += spacing) {
|
||
for (double y = spacing; y < size.height; y += spacing) {
|
||
canvas.drawCircle(Offset(x, y), dotRadius, paint);
|
||
}
|
||
}
|
||
}
|
||
|
||
@override
|
||
bool shouldRepaint(covariant DotGridPainter oldDelegate) => false;
|
||
}
|