squash pdf export + storage permissions

This commit is contained in:
2022-10-31 18:29:58 +00:00
parent 84eef41996
commit 004b7166f7
13 changed files with 207 additions and 31 deletions

View File

@ -5,6 +5,7 @@ import 'package:fluentui_system_icons/fluentui_system_icons.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import '../export/export_pdf.dart';
import '../savesystem/note_file.dart';
import '../widgets/icon_material_button.dart';
import '../widgets/tool_bar.dart';
@ -72,6 +73,7 @@ class _DrawingPageState extends State<DrawingPage> {
color: const Color.fromRGBO(255, 255, 255, .85),
onPressed: () {
// todo implement
exportPDF(controller.strokes, '${widget.name}.pdf');
},
),
IconMaterialButton(

View File

@ -128,6 +128,7 @@ class PaintController extends ChangeNotifier {
Point p = Point(offset, newWidth);
strokes.last.addPoint(p);
// todo do a batch commit per stroke
file.addPoint(strokes.last.id, p);
break;
case Pen.selector: