Showing
12 changed files
with
269 additions
and
174 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,173 +164,196 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex | @@ -131,173 +164,196 @@ 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( | ||
137 | - children: [ | ||
138 | - Column( | ||
139 | - children: [ | ||
140 | - Expanded( | ||
141 | - child: ListView( | ||
142 | - children: [ | ||
143 | - AnimatedBuilder( | ||
144 | - animation: _controller, | ||
145 | - builder: (context, _) { | ||
146 | - return Material( | ||
147 | - // color: Theme.of(context).colorScheme.surfaceVariant, | ||
148 | - shape: RoundedRectangleBorder( | ||
149 | - side: BorderSide( | ||
150 | - width: 1, | ||
151 | - color: Theme.of(context).colorScheme.outline), | ||
152 | - ), | ||
153 | - child: LayoutBuilder(builder: (context, constraints) { | ||
154 | - return Theme( | ||
155 | - data: Theme.of(context), | ||
156 | - // .copyWith( | ||
157 | - // textTheme: const TextTheme( | ||
158 | - // // For H1. | ||
159 | - // headlineLarge: TextStyle(fontSize: 55), | ||
160 | - // // For H2. | ||
161 | - // headlineMedium: TextStyle(fontSize: 45), | ||
162 | - // // For H3. | ||
163 | - // headlineSmall: TextStyle(fontSize: 35), | ||
164 | - // // For H4. | ||
165 | - // titleLarge: TextStyle(fontSize: 25), | ||
166 | - // // For H5. | ||
167 | - // titleMedium: TextStyle(fontSize: 15), | ||
168 | - // // For H6. | ||
169 | - // titleSmall: TextStyle(fontSize: 10), | ||
170 | - // ), | ||
171 | - // ), | ||
172 | - child: Padding( | ||
173 | - padding: const EdgeInsets.all(8.0), | ||
174 | - child: TexMarkdown( | ||
175 | - _controller.text, | ||
176 | - textDirection: _direction, | ||
177 | - onLinkTab: (url, title) { | ||
178 | - debugPrint(url); | ||
179 | - debugPrint(title); | ||
180 | - }, | ||
181 | - // maxLines: 7, | ||
182 | - // overflow: TextOverflow.ellipsis, | ||
183 | - textAlign: TextAlign.justify, | ||
184 | - // textScaler: const TextScaler.linear(1.3), | ||
185 | - textScaler: const TextScaler.linear(1), | ||
186 | - style: const TextStyle( | ||
187 | - // Regular text font size here. | ||
188 | - fontSize: 15, | ||
189 | - ), | ||
190 | - latexWorkaround: (tex) { | ||
191 | - List<String> stack = []; | ||
192 | - tex = tex.splitMapJoin( | ||
193 | - RegExp(r"\\text\{|\{|\}|\_"), | ||
194 | - onMatch: (p) { | ||
195 | - String input = p[0] ?? ""; | ||
196 | - if (input == r"\text{") { | ||
197 | - stack.add(input); | ||
198 | - } | ||
199 | - if (stack.isNotEmpty) { | ||
200 | - if (input == r"{") { | 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( | ||
187 | + children: [ | ||
188 | + Column( | ||
189 | + children: [ | ||
190 | + Expanded( | ||
191 | + child: ListView( | ||
192 | + children: [ | ||
193 | + AnimatedBuilder( | ||
194 | + animation: _controller, | ||
195 | + builder: (context, _) { | ||
196 | + return Material( | ||
197 | + // color: Theme.of(context).colorScheme.surfaceVariant, | ||
198 | + shape: RoundedRectangleBorder( | ||
199 | + side: BorderSide( | ||
200 | + width: 1, | ||
201 | + color: Theme.of(context).colorScheme.outline), | ||
202 | + ), | ||
203 | + child: | ||
204 | + LayoutBuilder(builder: (context, constraints) { | ||
205 | + return Theme( | ||
206 | + data: Theme.of(context), | ||
207 | + // .copyWith( | ||
208 | + // textTheme: const TextTheme( | ||
209 | + // // For H1. | ||
210 | + // headlineLarge: TextStyle(fontSize: 55), | ||
211 | + // // For H2. | ||
212 | + // headlineMedium: TextStyle(fontSize: 45), | ||
213 | + // // For H3. | ||
214 | + // headlineSmall: TextStyle(fontSize: 35), | ||
215 | + // // For H4. | ||
216 | + // titleLarge: TextStyle(fontSize: 25), | ||
217 | + // // For H5. | ||
218 | + // titleMedium: TextStyle(fontSize: 15), | ||
219 | + // // For H6. | ||
220 | + // titleSmall: TextStyle(fontSize: 10), | ||
221 | + // ), | ||
222 | + // ), | ||
223 | + child: Padding( | ||
224 | + padding: const EdgeInsets.all(8.0), | ||
225 | + child: TexMarkdown( | ||
226 | + _controller.text, | ||
227 | + textDirection: _direction, | ||
228 | + onLinkTab: (url, title) { | ||
229 | + debugPrint(url); | ||
230 | + debugPrint(title); | ||
231 | + }, | ||
232 | + // maxLines: 7, | ||
233 | + // overflow: TextOverflow.ellipsis, | ||
234 | + textAlign: TextAlign.justify, | ||
235 | + // textScaler: const TextScaler.linear(1.3), | ||
236 | + textScaler: const TextScaler.linear(1), | ||
237 | + style: const TextStyle( | ||
238 | + // Regular text font size here. | ||
239 | + fontSize: 15, | ||
240 | + ), | ||
241 | + latexWorkaround: (tex) { | ||
242 | + List<String> stack = []; | ||
243 | + tex = tex.splitMapJoin( | ||
244 | + RegExp(r"\\text\{|\{|\}|\_"), | ||
245 | + onMatch: (p) { | ||
246 | + String input = p[0] ?? ""; | ||
247 | + if (input == r"\text{") { | ||
201 | stack.add(input); | 248 | stack.add(input); |
202 | } | 249 | } |
203 | - if (input == r"}") { | ||
204 | - stack.removeLast(); | ||
205 | - } | ||
206 | - if (input == r"_") { | ||
207 | - return r"\_"; | 250 | + if (stack.isNotEmpty) { |
251 | + if (input == r"{") { | ||
252 | + stack.add(input); | ||
253 | + } | ||
254 | + if (input == r"}") { | ||
255 | + stack.removeLast(); | ||
256 | + } | ||
257 | + if (input == r"_") { | ||
258 | + return r"\_"; | ||
259 | + } | ||
208 | } | 260 | } |
209 | - } | ||
210 | - return input; | ||
211 | - }, | ||
212 | - ); | ||
213 | - return tex.replaceAllMapped( | ||
214 | - RegExp(r"align\*"), | ||
215 | - (match) => "aligned"); | ||
216 | - }, | ||
217 | - latexBuilder: | ||
218 | - (contex, tex, textStyle, inline) { | ||
219 | - if (tex.contains(r"\begin{tabular}")) { | ||
220 | - // return table. | ||
221 | - String tableString = "|${(RegExp( | ||
222 | - r"^\\begin\{tabular\}\{.*?\}(.*?)\\end\{tabular\}$", | ||
223 | - multiLine: true, | ||
224 | - dotAll: true, | ||
225 | - ).firstMatch(tex)?[1] ?? "").trim()}|"; | ||
226 | - tableString = tableString | ||
227 | - .replaceAll(r"\\", "|\n|") | ||
228 | - .replaceAll(r"\hline", "") | ||
229 | - .replaceAll(RegExp(r"(?<!\\)&"), "|"); | ||
230 | - var tableStringList = tableString | ||
231 | - .split("\n") | ||
232 | - ..insert(1, "|---|"); | ||
233 | - tableString = tableStringList.join("\n"); | ||
234 | - return TexMarkdown(tableString); | ||
235 | - } | ||
236 | - var controller = ScrollController(); | ||
237 | - Widget child = Math.tex( | ||
238 | - tex, | ||
239 | - textStyle: textStyle, | ||
240 | - ); | ||
241 | - if (!inline) { | ||
242 | - child = Padding( | ||
243 | - padding: const EdgeInsets.all(0.0), | ||
244 | - child: Material( | ||
245 | - color: Theme.of(context) | ||
246 | - .colorScheme | ||
247 | - .onInverseSurface, | ||
248 | - child: Padding( | ||
249 | - padding: const EdgeInsets.all(8.0), | ||
250 | - child: Scrollbar( | ||
251 | - controller: controller, | ||
252 | - child: SingleChildScrollView( | 261 | + return input; |
262 | + }, | ||
263 | + ); | ||
264 | + return tex.replaceAllMapped( | ||
265 | + RegExp(r"align\*"), | ||
266 | + (match) => "aligned"); | ||
267 | + }, | ||
268 | + latexBuilder: | ||
269 | + (contex, tex, textStyle, inline) { | ||
270 | + if (tex.contains(r"\begin{tabular}")) { | ||
271 | + // return table. | ||
272 | + String tableString = "|${(RegExp( | ||
273 | + r"^\\begin\{tabular\}\{.*?\}(.*?)\\end\{tabular\}$", | ||
274 | + multiLine: true, | ||
275 | + dotAll: true, | ||
276 | + ).firstMatch(tex)?[1] ?? "").trim()}|"; | ||
277 | + tableString = tableString | ||
278 | + .replaceAll(r"\\", "|\n|") | ||
279 | + .replaceAll(r"\hline", "") | ||
280 | + .replaceAll( | ||
281 | + RegExp(r"(?<!\\)&"), "|"); | ||
282 | + var tableStringList = tableString | ||
283 | + .split("\n") | ||
284 | + ..insert(1, "|---|"); | ||
285 | + tableString = | ||
286 | + tableStringList.join("\n"); | ||
287 | + return TexMarkdown(tableString); | ||
288 | + } | ||
289 | + var controller = ScrollController(); | ||
290 | + Widget child = Math.tex( | ||
291 | + tex, | ||
292 | + textStyle: textStyle, | ||
293 | + ); | ||
294 | + if (!inline) { | ||
295 | + child = Padding( | ||
296 | + padding: const EdgeInsets.all(0.0), | ||
297 | + child: Material( | ||
298 | + color: Theme.of(context) | ||
299 | + .colorScheme | ||
300 | + .onInverseSurface, | ||
301 | + child: Padding( | ||
302 | + padding: | ||
303 | + const EdgeInsets.all(8.0), | ||
304 | + child: Scrollbar( | ||
253 | controller: controller, | 305 | controller: controller, |
254 | - scrollDirection: | ||
255 | - Axis.horizontal, | ||
256 | - child: Math.tex( | ||
257 | - tex, | ||
258 | - textStyle: textStyle, | 306 | + child: SingleChildScrollView( |
307 | + controller: controller, | ||
308 | + scrollDirection: | ||
309 | + Axis.horizontal, | ||
310 | + child: Math.tex( | ||
311 | + tex, | ||
312 | + textStyle: textStyle, | ||
313 | + ), | ||
259 | ), | 314 | ), |
260 | ), | 315 | ), |
261 | ), | 316 | ), |
262 | ), | 317 | ), |
263 | - ), | 318 | + ); |
319 | + } | ||
320 | + child = InkWell( | ||
321 | + onTap: () { | ||
322 | + debugPrint("Hello world"); | ||
323 | + }, | ||
324 | + child: child, | ||
264 | ); | 325 | ); |
265 | - } | ||
266 | - child = InkWell( | ||
267 | - onTap: () { | ||
268 | - debugPrint("Hello world"); | ||
269 | - }, | ||
270 | - child: child, | ||
271 | - ); | ||
272 | - return child; | ||
273 | - }, | 326 | + return child; |
327 | + }, | ||
328 | + ), | ||
274 | ), | 329 | ), |
275 | - ), | ||
276 | - // child: const Text("Hello"), | ||
277 | - ); | ||
278 | - }), | ||
279 | - ); | ||
280 | - }, | ||
281 | - ), | ||
282 | - ], | ||
283 | - ), | ||
284 | - ), | ||
285 | - ConstrainedBox( | ||
286 | - constraints: const BoxConstraints(maxHeight: 200), | ||
287 | - child: Padding( | ||
288 | - padding: const EdgeInsets.all(8.0), | ||
289 | - child: TextField( | ||
290 | - decoration: const InputDecoration( | ||
291 | - border: OutlineInputBorder(), | ||
292 | - label: Text("Type here:")), | ||
293 | - maxLines: null, | ||
294 | - controller: _controller, | 330 | + // child: const Text("Hello"), |
331 | + ); | ||
332 | + }), | ||
333 | + ); | ||
334 | + }, | ||
335 | + ), | ||
336 | + ], | ||
295 | ), | 337 | ), |
296 | ), | 338 | ), |
297 | - ), | ||
298 | - ], | ||
299 | - ), | ||
300 | - ], | 339 | + if (writingMod) |
340 | + ConstrainedBox( | ||
341 | + constraints: const BoxConstraints(maxHeight: 200), | ||
342 | + child: Padding( | ||
343 | + padding: const EdgeInsets.all(8.0), | ||
344 | + child: TextField( | ||
345 | + decoration: const InputDecoration( | ||
346 | + border: OutlineInputBorder(), | ||
347 | + label: Text("Type here:")), | ||
348 | + maxLines: null, | ||
349 | + controller: _controller, | ||
350 | + ), | ||
351 | + ), | ||
352 | + ), | ||
353 | + ], | ||
354 | + ), | ||
355 | + ], | ||
356 | + ), | ||
301 | ), | 357 | ), |
302 | ); | 358 | ); |
303 | } | 359 | } |
@@ -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