Showing
12 changed files
with
121 additions
and
26 deletions
| 1 | +import 'dart:io'; | ||
| 2 | + | ||
| 3 | +import 'package:desktop_drop/desktop_drop.dart'; | ||
| 1 | import 'package:flutter/material.dart'; | 4 | import 'package:flutter/material.dart'; |
| 2 | import 'package:gpt_markdown/gpt_markdown.dart'; | 5 | import 'package:gpt_markdown/gpt_markdown.dart'; |
| 3 | import 'package:flutter_math_fork/flutter_math.dart'; | 6 | import 'package:flutter_math_fork/flutter_math.dart'; |
| 7 | +import 'package:watcher/watcher.dart'; | ||
| 4 | 8 | ||
| 5 | // | 9 | // |
| 6 | void main() { | 10 | void main() { |
| @@ -113,6 +117,35 @@ You can also use LaTeX for mathematical expressions. Here's an example: | @@ -113,6 +117,35 @@ You can also use LaTeX for mathematical expressions. Here's an example: | ||
| 113 | Markdown and LaTeX can be powerful tools for formatting text and mathematical expressions in your Flutter app. If you have any questions or need further assistance, feel free to ask! | 117 | Markdown and LaTeX can be powerful tools for formatting text and mathematical expressions in your Flutter app. If you have any questions or need further assistance, feel free to ask! |
| 114 | ''', | 118 | ''', |
| 115 | ); | 119 | ); |
| 120 | + File? file; | ||
| 121 | + | ||
| 122 | + loadContent() async { | ||
| 123 | + File? file = this.file; | ||
| 124 | + if (file == null) { | ||
| 125 | + return; | ||
| 126 | + } | ||
| 127 | + String content = await file.readAsString(); | ||
| 128 | + _controller.text = content; | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + updateContent(String contents) async { | ||
| 132 | + // | ||
| 133 | + await file?.writeAsString(contents); | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + load() async { | ||
| 137 | + await loadContent(); | ||
| 138 | + String? path = file?.path; | ||
| 139 | + if (path == null) { | ||
| 140 | + return; | ||
| 141 | + } | ||
| 142 | + FileWatcher(path).events.listen((details) { | ||
| 143 | + loadContent(); | ||
| 144 | + }); | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + bool writingMod = true; | ||
| 148 | + | ||
| 116 | @override | 149 | @override |
| 117 | Widget build(BuildContext context) { | 150 | Widget build(BuildContext context) { |
| 118 | return Scaffold( | 151 | return Scaffold( |
| @@ -131,9 +164,26 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | @@ -131,9 +164,26 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | ||
| 131 | onPressed: widget.onPressed, | 164 | onPressed: widget.onPressed, |
| 132 | icon: const Icon(Icons.sunny), | 165 | icon: const Icon(Icons.sunny), |
| 133 | ), | 166 | ), |
| 167 | + IconButton( | ||
| 168 | + onPressed: () => setState(() { | ||
| 169 | + writingMod = !writingMod; | ||
| 170 | + }), | ||
| 171 | + icon: const Icon(Icons.arrow_drop_down), | ||
| 172 | + ), | ||
| 134 | ], | 173 | ], |
| 135 | ), | 174 | ), |
| 136 | - body: Stack( | 175 | + body: DropTarget( |
| 176 | + onDragDone: (details) { | ||
| 177 | + var files = details.files; | ||
| 178 | + if (files.length != 1) { | ||
| 179 | + return; | ||
| 180 | + } | ||
| 181 | + var file = files[0]; | ||
| 182 | + String path = file.path; | ||
| 183 | + this.file = File(path); | ||
| 184 | + load(); | ||
| 185 | + }, | ||
| 186 | + child: Stack( | ||
| 137 | children: [ | 187 | children: [ |
| 138 | Column( | 188 | Column( |
| 139 | children: [ | 189 | children: [ |
| @@ -150,7 +200,8 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | @@ -150,7 +200,8 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | ||
| 150 | width: 1, | 200 | width: 1, |
| 151 | color: Theme.of(context).colorScheme.outline), | 201 | color: Theme.of(context).colorScheme.outline), |
| 152 | ), | 202 | ), |
| 153 | - child: LayoutBuilder(builder: (context, constraints) { | 203 | + child: |
| 204 | + LayoutBuilder(builder: (context, constraints) { | ||
| 154 | return Theme( | 205 | return Theme( |
| 155 | data: Theme.of(context), | 206 | data: Theme.of(context), |
| 156 | // .copyWith( | 207 | // .copyWith( |
| @@ -226,11 +277,13 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | @@ -226,11 +277,13 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | ||
| 226 | tableString = tableString | 277 | tableString = tableString |
| 227 | .replaceAll(r"\\", "|\n|") | 278 | .replaceAll(r"\\", "|\n|") |
| 228 | .replaceAll(r"\hline", "") | 279 | .replaceAll(r"\hline", "") |
| 229 | - .replaceAll(RegExp(r"(?<!\\)&"), "|"); | 280 | + .replaceAll( |
| 281 | + RegExp(r"(?<!\\)&"), "|"); | ||
| 230 | var tableStringList = tableString | 282 | var tableStringList = tableString |
| 231 | .split("\n") | 283 | .split("\n") |
| 232 | ..insert(1, "|---|"); | 284 | ..insert(1, "|---|"); |
| 233 | - tableString = tableStringList.join("\n"); | 285 | + tableString = |
| 286 | + tableStringList.join("\n"); | ||
| 234 | return TexMarkdown(tableString); | 287 | return TexMarkdown(tableString); |
| 235 | } | 288 | } |
| 236 | var controller = ScrollController(); | 289 | var controller = ScrollController(); |
| @@ -246,7 +299,8 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | @@ -246,7 +299,8 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | ||
| 246 | .colorScheme | 299 | .colorScheme |
| 247 | .onInverseSurface, | 300 | .onInverseSurface, |
| 248 | child: Padding( | 301 | child: Padding( |
| 249 | - padding: const EdgeInsets.all(8.0), | 302 | + padding: |
| 303 | + const EdgeInsets.all(8.0), | ||
| 250 | child: Scrollbar( | 304 | child: Scrollbar( |
| 251 | controller: controller, | 305 | controller: controller, |
| 252 | child: SingleChildScrollView( | 306 | child: SingleChildScrollView( |
| @@ -282,6 +336,7 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | @@ -282,6 +336,7 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | ||
| 282 | ], | 336 | ], |
| 283 | ), | 337 | ), |
| 284 | ), | 338 | ), |
| 339 | + if (writingMod) | ||
| 285 | ConstrainedBox( | 340 | ConstrainedBox( |
| 286 | constraints: const BoxConstraints(maxHeight: 200), | 341 | constraints: const BoxConstraints(maxHeight: 200), |
| 287 | child: Padding( | 342 | child: Padding( |
| @@ -299,6 +354,7 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | @@ -299,6 +354,7 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | ||
| 299 | ), | 354 | ), |
| 300 | ], | 355 | ], |
| 301 | ), | 356 | ), |
| 357 | + ), | ||
| 302 | ); | 358 | ); |
| 303 | } | 359 | } |
| 304 | } | 360 | } |
| @@ -6,10 +6,14 @@ | @@ -6,10 +6,14 @@ | ||
| 6 | 6 | ||
| 7 | #include "generated_plugin_registrant.h" | 7 | #include "generated_plugin_registrant.h" |
| 8 | 8 | ||
| 9 | +#include <desktop_drop/desktop_drop_plugin.h> | ||
| 9 | #include <printing/printing_plugin.h> | 10 | #include <printing/printing_plugin.h> |
| 10 | #include <url_launcher_linux/url_launcher_plugin.h> | 11 | #include <url_launcher_linux/url_launcher_plugin.h> |
| 11 | 12 | ||
| 12 | void fl_register_plugins(FlPluginRegistry* registry) { | 13 | void fl_register_plugins(FlPluginRegistry* registry) { |
| 14 | + g_autoptr(FlPluginRegistrar) desktop_drop_registrar = | ||
| 15 | + fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopDropPlugin"); | ||
| 16 | + desktop_drop_plugin_register_with_registrar(desktop_drop_registrar); | ||
| 13 | g_autoptr(FlPluginRegistrar) printing_registrar = | 17 | g_autoptr(FlPluginRegistrar) printing_registrar = |
| 14 | fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin"); | 18 | fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin"); |
| 15 | printing_plugin_register_with_registrar(printing_registrar); | 19 | printing_plugin_register_with_registrar(printing_registrar); |
| @@ -5,11 +5,13 @@ | @@ -5,11 +5,13 @@ | ||
| 5 | import FlutterMacOS | 5 | import FlutterMacOS |
| 6 | import Foundation | 6 | import Foundation |
| 7 | 7 | ||
| 8 | +import desktop_drop | ||
| 8 | import path_provider_foundation | 9 | import path_provider_foundation |
| 9 | import printing | 10 | import printing |
| 10 | import url_launcher_macos | 11 | import url_launcher_macos |
| 11 | 12 | ||
| 12 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { | 13 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { |
| 14 | + DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin")) | ||
| 13 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) | 15 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) |
| 14 | PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin")) | 16 | PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin")) |
| 15 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) | 17 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) |
| 1 | PODS: | 1 | PODS: |
| 2 | + - desktop_drop (0.0.1): | ||
| 3 | + - FlutterMacOS | ||
| 2 | - FlutterMacOS (1.0.0) | 4 | - FlutterMacOS (1.0.0) |
| 3 | - path_provider_foundation (0.0.1): | 5 | - path_provider_foundation (0.0.1): |
| 4 | - Flutter | 6 | - Flutter |
| @@ -9,12 +11,15 @@ PODS: | @@ -9,12 +11,15 @@ PODS: | ||
| 9 | - FlutterMacOS | 11 | - FlutterMacOS |
| 10 | 12 | ||
| 11 | DEPENDENCIES: | 13 | DEPENDENCIES: |
| 14 | + - desktop_drop (from `Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos`) | ||
| 12 | - FlutterMacOS (from `Flutter/ephemeral`) | 15 | - FlutterMacOS (from `Flutter/ephemeral`) |
| 13 | - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) | 16 | - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) |
| 14 | - printing (from `Flutter/ephemeral/.symlinks/plugins/printing/macos`) | 17 | - printing (from `Flutter/ephemeral/.symlinks/plugins/printing/macos`) |
| 15 | - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) | 18 | - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) |
| 16 | 19 | ||
| 17 | EXTERNAL SOURCES: | 20 | EXTERNAL SOURCES: |
| 21 | + desktop_drop: | ||
| 22 | + :path: Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos | ||
| 18 | FlutterMacOS: | 23 | FlutterMacOS: |
| 19 | :path: Flutter/ephemeral | 24 | :path: Flutter/ephemeral |
| 20 | path_provider_foundation: | 25 | path_provider_foundation: |
| @@ -25,6 +30,7 @@ EXTERNAL SOURCES: | @@ -25,6 +30,7 @@ EXTERNAL SOURCES: | ||
| 25 | :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos | 30 | :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos |
| 26 | 31 | ||
| 27 | SPEC CHECKSUMS: | 32 | SPEC CHECKSUMS: |
| 33 | + desktop_drop: 69eeff437544aa619c8db7f4481b3a65f7696898 | ||
| 28 | FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 | 34 | FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 |
| 29 | path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 | 35 | path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 |
| 30 | printing: 1dd6a1fce2209ec240698e2439a4adbb9b427637 | 36 | printing: 1dd6a1fce2209ec240698e2439a4adbb9b427637 |
| 1 | import Cocoa | 1 | import Cocoa |
| 2 | import FlutterMacOS | 2 | import FlutterMacOS |
| 3 | 3 | ||
| 4 | -@NSApplicationMain | 4 | +@main |
| 5 | class AppDelegate: FlutterAppDelegate { | 5 | class AppDelegate: FlutterAppDelegate { |
| 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { | 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { |
| 7 | return true | 7 | return true |
| @@ -97,6 +97,14 @@ packages: | @@ -97,6 +97,14 @@ packages: | ||
| 97 | url: "https://pub.dev" | 97 | url: "https://pub.dev" |
| 98 | source: hosted | 98 | source: hosted |
| 99 | version: "1.0.8" | 99 | version: "1.0.8" |
| 100 | + desktop_drop: | ||
| 101 | + dependency: "direct main" | ||
| 102 | + description: | ||
| 103 | + name: desktop_drop | ||
| 104 | + sha256: d55a010fe46c8e8fcff4ea4b451a9ff84a162217bdb3b2a0aa1479776205e15d | ||
| 105 | + url: "https://pub.dev" | ||
| 106 | + source: hosted | ||
| 107 | + version: "0.4.4" | ||
| 100 | fake_async: | 108 | fake_async: |
| 101 | dependency: transitive | 109 | dependency: transitive |
| 102 | description: | 110 | description: |
| @@ -117,10 +125,10 @@ packages: | @@ -117,10 +125,10 @@ packages: | ||
| 117 | dependency: "direct main" | 125 | dependency: "direct main" |
| 118 | description: | 126 | description: |
| 119 | name: file_picker | 127 | name: file_picker |
| 120 | - sha256: "824f5b9f389bfc4dddac3dea76cd70c51092d9dff0b2ece7ef4f53db8547d258" | 128 | + sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3" |
| 121 | url: "https://pub.dev" | 129 | url: "https://pub.dev" |
| 122 | source: hosted | 130 | source: hosted |
| 123 | - version: "8.0.6" | 131 | + version: "8.0.7" |
| 124 | flutter: | 132 | flutter: |
| 125 | dependency: "direct main" | 133 | dependency: "direct main" |
| 126 | description: flutter | 134 | description: flutter |
| @@ -211,18 +219,18 @@ packages: | @@ -211,18 +219,18 @@ packages: | ||
| 211 | dependency: transitive | 219 | dependency: transitive |
| 212 | description: | 220 | description: |
| 213 | name: leak_tracker | 221 | name: leak_tracker |
| 214 | - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" | 222 | + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" |
| 215 | url: "https://pub.dev" | 223 | url: "https://pub.dev" |
| 216 | source: hosted | 224 | source: hosted |
| 217 | - version: "10.0.4" | 225 | + version: "10.0.5" |
| 218 | leak_tracker_flutter_testing: | 226 | leak_tracker_flutter_testing: |
| 219 | dependency: transitive | 227 | dependency: transitive |
| 220 | description: | 228 | description: |
| 221 | name: leak_tracker_flutter_testing | 229 | name: leak_tracker_flutter_testing |
| 222 | - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" | 230 | + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" |
| 223 | url: "https://pub.dev" | 231 | url: "https://pub.dev" |
| 224 | source: hosted | 232 | source: hosted |
| 225 | - version: "3.0.3" | 233 | + version: "3.0.5" |
| 226 | leak_tracker_testing: | 234 | leak_tracker_testing: |
| 227 | dependency: transitive | 235 | dependency: transitive |
| 228 | description: | 236 | description: |
| @@ -251,18 +259,18 @@ packages: | @@ -251,18 +259,18 @@ packages: | ||
| 251 | dependency: transitive | 259 | dependency: transitive |
| 252 | description: | 260 | description: |
| 253 | name: material_color_utilities | 261 | name: material_color_utilities |
| 254 | - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" | 262 | + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec |
| 255 | url: "https://pub.dev" | 263 | url: "https://pub.dev" |
| 256 | source: hosted | 264 | source: hosted |
| 257 | - version: "0.8.0" | 265 | + version: "0.11.1" |
| 258 | meta: | 266 | meta: |
| 259 | dependency: transitive | 267 | dependency: transitive |
| 260 | description: | 268 | description: |
| 261 | name: meta | 269 | name: meta |
| 262 | - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" | 270 | + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 |
| 263 | url: "https://pub.dev" | 271 | url: "https://pub.dev" |
| 264 | source: hosted | 272 | source: hosted |
| 265 | - version: "1.12.0" | 273 | + version: "1.15.0" |
| 266 | nested: | 274 | nested: |
| 267 | dependency: transitive | 275 | dependency: transitive |
| 268 | description: | 276 | description: |
| @@ -363,10 +371,10 @@ packages: | @@ -363,10 +371,10 @@ packages: | ||
| 363 | dependency: transitive | 371 | dependency: transitive |
| 364 | description: | 372 | description: |
| 365 | name: permission_handler_android | 373 | name: permission_handler_android |
| 366 | - sha256: b29a799ca03be9f999aa6c39f7de5209482d638e6f857f6b93b0875c618b7e54 | 374 | + sha256: eaf2a1ec4472775451e88ca6a7b86559ef2f1d1ed903942ed135e38ea0097dca |
| 367 | url: "https://pub.dev" | 375 | url: "https://pub.dev" |
| 368 | source: hosted | 376 | source: hosted |
| 369 | - version: "12.0.7" | 377 | + version: "12.0.8" |
| 370 | permission_handler_apple: | 378 | permission_handler_apple: |
| 371 | dependency: transitive | 379 | dependency: transitive |
| 372 | description: | 380 | description: |
| @@ -387,10 +395,10 @@ packages: | @@ -387,10 +395,10 @@ packages: | ||
| 387 | dependency: transitive | 395 | dependency: transitive |
| 388 | description: | 396 | description: |
| 389 | name: permission_handler_platform_interface | 397 | name: permission_handler_platform_interface |
| 390 | - sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" | 398 | + sha256: fe0ffe274d665be8e34f9c59705441a7d248edebbe5d9e3ec2665f88b79358ea |
| 391 | url: "https://pub.dev" | 399 | url: "https://pub.dev" |
| 392 | source: hosted | 400 | source: hosted |
| 393 | - version: "4.2.1" | 401 | + version: "4.2.2" |
| 394 | permission_handler_windows: | 402 | permission_handler_windows: |
| 395 | dependency: transitive | 403 | dependency: transitive |
| 396 | description: | 404 | description: |
| @@ -496,10 +504,10 @@ packages: | @@ -496,10 +504,10 @@ packages: | ||
| 496 | dependency: transitive | 504 | dependency: transitive |
| 497 | description: | 505 | description: |
| 498 | name: test_api | 506 | name: test_api |
| 499 | - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" | 507 | + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" |
| 500 | url: "https://pub.dev" | 508 | url: "https://pub.dev" |
| 501 | source: hosted | 509 | source: hosted |
| 502 | - version: "0.7.0" | 510 | + version: "0.7.2" |
| 503 | tuple: | 511 | tuple: |
| 504 | dependency: transitive | 512 | dependency: transitive |
| 505 | description: | 513 | description: |
| @@ -568,10 +576,10 @@ packages: | @@ -568,10 +576,10 @@ packages: | ||
| 568 | dependency: transitive | 576 | dependency: transitive |
| 569 | description: | 577 | description: |
| 570 | name: url_launcher_web | 578 | name: url_launcher_web |
| 571 | - sha256: a36e2d7981122fa185006b216eb6b5b97ede3f9a54b7a511bc966971ab98d049 | 579 | + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" |
| 572 | url: "https://pub.dev" | 580 | url: "https://pub.dev" |
| 573 | source: hosted | 581 | source: hosted |
| 574 | - version: "2.3.2" | 582 | + version: "2.3.3" |
| 575 | url_launcher_windows: | 583 | url_launcher_windows: |
| 576 | dependency: transitive | 584 | dependency: transitive |
| 577 | description: | 585 | description: |
| @@ -616,10 +624,18 @@ packages: | @@ -616,10 +624,18 @@ packages: | ||
| 616 | dependency: transitive | 624 | dependency: transitive |
| 617 | description: | 625 | description: |
| 618 | name: vm_service | 626 | name: vm_service |
| 619 | - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" | 627 | + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc |
| 628 | + url: "https://pub.dev" | ||
| 629 | + source: hosted | ||
| 630 | + version: "14.2.4" | ||
| 631 | + watcher: | ||
| 632 | + dependency: "direct main" | ||
| 633 | + description: | ||
| 634 | + name: watcher | ||
| 635 | + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" | ||
| 620 | url: "https://pub.dev" | 636 | url: "https://pub.dev" |
| 621 | source: hosted | 637 | source: hosted |
| 622 | - version: "14.2.1" | 638 | + version: "1.1.0" |
| 623 | web: | 639 | web: |
| 624 | dependency: transitive | 640 | dependency: transitive |
| 625 | description: | 641 | description: |
| @@ -21,6 +21,8 @@ dependencies: | @@ -21,6 +21,8 @@ dependencies: | ||
| 21 | permission_handler: ^11.3.1 | 21 | permission_handler: ^11.3.1 |
| 22 | file_picker: ^8.0.6 | 22 | file_picker: ^8.0.6 |
| 23 | flutter_math_fork: ^0.7.2 | 23 | flutter_math_fork: ^0.7.2 |
| 24 | + watcher: ^1.1.0 | ||
| 25 | + desktop_drop: ^0.4.4 | ||
| 24 | 26 | ||
| 25 | dev_dependencies: | 27 | dev_dependencies: |
| 26 | flutter_test: | 28 | flutter_test: |
| @@ -6,11 +6,14 @@ | @@ -6,11 +6,14 @@ | ||
| 6 | 6 | ||
| 7 | #include "generated_plugin_registrant.h" | 7 | #include "generated_plugin_registrant.h" |
| 8 | 8 | ||
| 9 | +#include <desktop_drop/desktop_drop_plugin.h> | ||
| 9 | #include <permission_handler_windows/permission_handler_windows_plugin.h> | 10 | #include <permission_handler_windows/permission_handler_windows_plugin.h> |
| 10 | #include <printing/printing_plugin.h> | 11 | #include <printing/printing_plugin.h> |
| 11 | #include <url_launcher_windows/url_launcher_windows.h> | 12 | #include <url_launcher_windows/url_launcher_windows.h> |
| 12 | 13 | ||
| 13 | void RegisterPlugins(flutter::PluginRegistry* registry) { | 14 | void RegisterPlugins(flutter::PluginRegistry* registry) { |
| 15 | + DesktopDropPluginRegisterWithRegistrar( | ||
| 16 | + registry->GetRegistrarForPlugin("DesktopDropPlugin")); | ||
| 14 | PermissionHandlerWindowsPluginRegisterWithRegistrar( | 17 | PermissionHandlerWindowsPluginRegisterWithRegistrar( |
| 15 | registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); | 18 | registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); |
| 16 | PrintingPluginRegisterWithRegistrar( | 19 | PrintingPluginRegisterWithRegistrar( |
-
Please register or login to post a comment