fix permission error on desktop
This commit is contained in:
		| @@ -59,9 +59,8 @@ class MyPainter extends CustomPainter { | ||||
|         Offset pt2 = stroke.points[i + 1].point; | ||||
|         pt2 = _translatept(pt2, size); | ||||
|  | ||||
|         // final strokewidth = _calcAngleDependentWidth(pt1, pt2, stroke.points[i].thickness); | ||||
|         canvas.drawLine( | ||||
|             pt1, pt2, paint..strokeWidth = stroke.points[i].thickness); | ||||
|             pt1, pt2, paint..strokeWidth = stroke.points[i].thickness * zoom); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   | ||||
| @@ -11,8 +11,7 @@ void main() async { | ||||
|       defaultTargetPlatform != TargetPlatform.iOS) { | ||||
|     sqfliteFfiInit(); | ||||
|     databaseFactory = databaseFactoryFfi; | ||||
|   } | ||||
|  | ||||
|   } else { | ||||
|     WidgetsFlutterBinding.ensureInitialized(); | ||||
|  | ||||
|     Map<Permission, PermissionStatus> statuses = | ||||
| @@ -21,6 +20,7 @@ void main() async { | ||||
|     if (statuses.containsValue(PermissionStatus.denied)) { | ||||
|       // todo some error handling | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   runApp(const MaterialApp(home: App())); | ||||
| } | ||||
|   | ||||
| @@ -44,6 +44,6 @@ class NoteFile { | ||||
|   Future<void> close() async { | ||||
|     // shrink the db file size | ||||
|     await _db.execute('VACUUM'); | ||||
|     _db.close(); | ||||
|     await _db.close(); | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user