diff --git a/lib/main.dart b/lib/main.dart index 7381f20..8daa754 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,3 @@ -import 'package:drag_and_drop_windows/drag_and_drop_windows.dart'; import 'package:dynamic_color/dynamic_color.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -7,7 +6,6 @@ import 'package:logger/logger.dart'; import 'package:window_manager/window_manager.dart'; import 'view/root.dart'; -import 'vm/contents.dart'; import 'vm/theme.dart'; void main() async { @@ -39,14 +37,8 @@ class Staplver extends ConsumerWidget with WindowListener { final themeState = ref.watch(appThemePod); // notifier - final contentsNotifier = ref.read(contentsPod.notifier); final themeNotifier = ref.watch(appThemePod.notifier); - // local - dropEventStream.listen( - (paths) async => contentsNotifier.handleDragAndDrop(paths), - ); - // view return DynamicColorBuilder( builder: (ColorScheme? lightColorScheme, ColorScheme? darkColorScheme) { diff --git a/lib/model/error/exception.dart b/lib/model/error/exception.dart index 4cf69aa..e71b6cc 100644 --- a/lib/model/error/exception.dart +++ b/lib/model/error/exception.dart @@ -239,7 +239,7 @@ final class PjConfigExceptions extends ConfigExceptions { (ref) => ref .read(appThemePod.notifier) .updateThemeMode(ThemeMode.system), - ) + ), ], ); } diff --git a/lib/model/state.dart b/lib/model/state.dart index 7233adb..e12e591 100644 --- a/lib/model/state.dart +++ b/lib/model/state.dart @@ -38,7 +38,6 @@ class AppThemeState with _$AppThemeState { class ContentsState with _$ContentsState { const factory ContentsState({ Directory? defaultBackupDir, - void Function(Directory)? dragAndDropCallback, }) = _ContentsState; } diff --git a/lib/view/components/create_pj/set_pj_details.dart b/lib/view/components/create_pj/set_pj_details.dart index 2299211..5b77a7a 100644 --- a/lib/view/components/create_pj/set_pj_details.dart +++ b/lib/view/components/create_pj/set_pj_details.dart @@ -40,7 +40,7 @@ class CompSetPjDetails extends ConsumerWidget { style: TextStyle( color: Theme.of(context).colorScheme.error, ), - ) + ), ], ), ), diff --git a/lib/view/components/create_pj/set_working_dir.dart b/lib/view/components/create_pj/set_working_dir.dart index 4dc7ab9..7758738 100644 --- a/lib/view/components/create_pj/set_working_dir.dart +++ b/lib/view/components/create_pj/set_working_dir.dart @@ -1,8 +1,10 @@ import 'dart:io'; +import 'package:cross_file/cross_file.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:staplver/vm/contents.dart'; import '../../../model/constant.dart'; import '../../routes/fab/create_pj.dart'; @@ -33,15 +35,22 @@ class CompSetWorkingDir extends HookConsumerWidget { (_) => isValidContentsNotifier.state = isValidContents(), ); - Future selectDir() async { - final selectedDirectory = await FilePicker.platform.getDirectoryPath(); - if (selectedDirectory == null) return; - final dir = Directory(selectedDirectory); + void updateDir(Directory dir) { workingDirNotifier.state = dir; textController.text = dir.path; pjNameNotifier.state = dir.name; } + Future selectDir() async { + final selectedDirectory = await FilePicker.platform.getDirectoryPath(); + if (selectedDirectory == null) return; + updateDir(Directory(selectedDirectory)); + } + + Future onDragDone(List files) async { + updateDir(await Contents.getSingleDirectory(files)); + } + String? validator(String? newVal) { if (newVal == null || newVal.isEmpty) { return '作業フォルダーのパスを入力してください'; @@ -106,12 +115,13 @@ class CompSetWorkingDir extends HookConsumerWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ const SizedBox(height: 20), - dragAndDropSquare( - selectDir, - Theme.of(context).colorScheme, - 'バージョン管理をするフォルダーを\nドラッグ & ドロップ', - 'または, クリックしてフォルダーを選択', - Icons.create_new_folder, + DragAndDropSquare( + onClick: selectDir, + onDragDone: onDragDone, + colorScheme: Theme.of(context).colorScheme, + aboveText: 'バージョン管理をするフォルダーを\nドラッグ & ドロップ', + belowText: 'または, クリックしてフォルダーを選択', + icon: Icons.create_new_folder, ), const SizedBox(height: 30), workingDirField, diff --git a/lib/view/components/drag_and_drop.dart b/lib/view/components/drag_and_drop.dart index bae113f..838ef2b 100644 --- a/lib/view/components/drag_and_drop.dart +++ b/lib/view/components/drag_and_drop.dart @@ -1,44 +1,68 @@ +import 'package:cross_file/cross_file.dart'; +import 'package:desktop_drop/desktop_drop.dart'; import 'package:dotted_border/dotted_border.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; -Widget dragAndDropSquare( - VoidCallback onClick, - ColorScheme colorScheme, - String aboveText, - String belowText, - IconData icon, -) { - return GestureDetector( - onTap: onClick, - child: DottedBorder( - color: colorScheme.tertiary, - dashPattern: const [15, 6], - strokeWidth: 3, - child: MouseRegion( - cursor: SystemMouseCursors.click, - child: Container( - height: 350, - width: 350, - color: colorScheme.tertiaryContainer, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Text( - aboveText, - style: - const TextStyle(fontWeight: FontWeight.w500, fontSize: 18), - textAlign: TextAlign.center, - ), - Icon(icon, size: 100), - Text( - belowText, - style: - const TextStyle(fontWeight: FontWeight.w500, fontSize: 18), +class DragAndDropSquare extends ConsumerWidget { + const DragAndDropSquare({ + required this.onClick, + required this.onDragDone, + required this.colorScheme, + required this.aboveText, + required this.belowText, + required this.icon, + super.key, + }); + + final VoidCallback onClick; + final void Function(List files) onDragDone; + final ColorScheme colorScheme; + final String aboveText; + final String belowText; + final IconData icon; + + @override + Widget build(BuildContext context, WidgetRef ref) { + return GestureDetector( + onTap: onClick, + child: DropTarget( + onDragDone: (details) => onDragDone(details.files), + child: DottedBorder( + color: colorScheme.tertiary, + dashPattern: const [15, 6], + strokeWidth: 3, + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: Container( + height: 350, + width: 350, + color: colorScheme.tertiaryContainer, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Text( + aboveText, + style: const TextStyle( + fontWeight: FontWeight.w500, + fontSize: 18, + ), + textAlign: TextAlign.center, + ), + Icon(icon, size: 100), + Text( + belowText, + style: const TextStyle( + fontWeight: FontWeight.w500, + fontSize: 18, + ), + ), + ], ), - ], + ), ), ), ), - ), - ); + ); + } } diff --git a/lib/view/components/import_pj/set_working_dir.dart b/lib/view/components/import_pj/set_working_dir.dart index 4af8320..9744f75 100644 --- a/lib/view/components/import_pj/set_working_dir.dart +++ b/lib/view/components/import_pj/set_working_dir.dart @@ -1,8 +1,10 @@ import 'dart:io'; +import 'package:cross_file/cross_file.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:staplver/vm/contents.dart'; import '../../../model/error/exception.dart'; import '../../../model/error/handler.dart'; @@ -67,12 +69,19 @@ class CompSetWorkingDir extends ConsumerWidget { } }); + void updateDir(Directory dir) { + workingDirNotifier.state = dir; + textController.text = dir.path; + } + Future selectDir() async { final selectedDirectory = await FilePicker.platform.getDirectoryPath(); if (selectedDirectory == null) return; - final dir = Directory(selectedDirectory); - workingDirNotifier.state = dir; - textController.text = dir.path; + updateDir(Directory(selectedDirectory)); + } + + Future onDragDone(List files) async { + updateDir(await Contents.getSingleDirectory(files)); } String? validator(String? newVal) { @@ -139,12 +148,13 @@ class CompSetWorkingDir extends ConsumerWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ const SizedBox(height: 20), - dragAndDropSquare( - selectDir, - Theme.of(context).colorScheme, - '作業フォルダーをドラッグ & ドロップ', - 'または, クリックしてフォルダーを選択', - Icons.create_new_folder, + DragAndDropSquare( + onClick: selectDir, + onDragDone: onDragDone, + colorScheme: Theme.of(context).colorScheme, + aboveText: '作業フォルダーをドラッグ & ドロップ', + belowText: 'または, クリックしてフォルダーを選択', + icon: Icons.create_new_folder, ), const SizedBox(height: 40), workingDirField, diff --git a/lib/view/components/navbar.dart b/lib/view/components/navbar.dart index 5b35cc8..60a5424 100644 --- a/lib/view/components/navbar.dart +++ b/lib/view/components/navbar.dart @@ -3,7 +3,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_speed_dial/flutter_speed_dial.dart'; import '../../model/class/app.dart'; -import '../../vm/contents.dart'; import '../../vm/page.dart'; import '../routes/fab/checkout.dart'; import '../routes/fab/create_pj.dart'; @@ -20,28 +19,24 @@ class NavBar { Orientation orientation; List getDest() { - final contentsNotifier = ref.read(contentsPod.notifier); - return [ Destination( icon: const Icon(Icons.rocket_launch_outlined), selectedIcon: const Icon(Icons.rocket_launch), label: 'プロジェクト', - runInit: () => contentsNotifier.updateDragAndDropCallback(null), + runInit: () {}, ), Destination( icon: const Icon(Icons.settings_outlined), selectedIcon: const Icon(Icons.settings), label: '設定', - runInit: () => contentsNotifier.updateDragAndDropCallback( - contentsNotifier.updateDefaultBackupDir, - ), + runInit: () {}, ), Destination( icon: const Icon(Icons.bug_report_outlined), selectedIcon: const Icon(Icons.bug_report), label: 'デバッグ', - runInit: () => contentsNotifier.updateDragAndDropCallback(null), + runInit: () {}, ), ]; } diff --git a/lib/view/components/projects/save_point.dart/diff.dart b/lib/view/components/projects/save_point.dart/diff.dart index c3ddd29..e26bc60 100644 --- a/lib/view/components/projects/save_point.dart/diff.dart +++ b/lib/view/components/projects/save_point.dart/diff.dart @@ -2,11 +2,9 @@ import 'dart:io'; import 'package:dynamic_color/dynamic_color.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:staplver/model/class/svn.dart'; import 'package:staplver/model/constant.dart'; -import 'package:staplver/view/components/projects/save_point.dart/history.dart'; import 'package:staplver/view/routes/projects/details.dart'; import 'package:staplver/vm/page.dart'; import 'package:staplver/vm/svn.dart'; diff --git a/lib/view/root.dart b/lib/view/root.dart index 69d44c9..113225a 100644 --- a/lib/view/root.dart +++ b/lib/view/root.dart @@ -10,7 +10,6 @@ import '../vm/now.dart'; import '../vm/page.dart'; import 'components/navbar.dart'; import 'routes/debug.dart'; -import 'routes/home.dart'; import 'routes/projects/projects.dart'; import 'routes/settings.dart'; import 'util/route.dart'; @@ -87,7 +86,7 @@ class _AppRootState extends ConsumerState with WindowListener { Text( ' / ${dest[pageState.navbarIndex].label}', style: const TextStyle(fontSize: 18), - ) + ), ], ), leading: const SizedBox(), diff --git a/lib/view/routes/debug.dart b/lib/view/routes/debug.dart index 88fde71..b64b7ca 100644 --- a/lib/view/routes/debug.dart +++ b/lib/view/routes/debug.dart @@ -186,7 +186,7 @@ class PageDebug extends HookConsumerWidget { Text('log => ${logState.logs.join('\n')}'), ], ), - ) + ), ], ), ), diff --git a/lib/view/routes/fab/checkout.dart b/lib/view/routes/fab/checkout.dart index 74bb092..5922896 100644 --- a/lib/view/routes/fab/checkout.dart +++ b/lib/view/routes/fab/checkout.dart @@ -7,7 +7,6 @@ import 'package:staplver/vm/log.dart'; import '../../../model/class/app.dart'; import '../../../model/constant.dart'; -import '../../../vm/contents.dart'; import '../../../vm/page.dart'; import '../../components/checkout/pj_summary.dart'; import '../../components/checkout/set_backup_dir.dart'; @@ -24,11 +23,7 @@ class PageCheckout extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - // notifier - final contentsNotifier = ref.read(contentsPod.notifier); - // local - final backupDirNotifier = ref.read(backupDirProvider.notifier); final workingDirNotifier = ref.read(workingDirProvider.notifier); final newPjDataNotifier = ref.read(PageCheckout.newPjDataProvider.notifier); @@ -38,9 +33,6 @@ class PageCheckout extends HookConsumerWidget { RouteController(ref).home2fabInit(); workingDirNotifier.state = null; newPjDataNotifier.state = null; - contentsNotifier.updateDragAndDropCallback( - (newDir) => backupDirNotifier.state = newDir, - ); log.d('init (home -> createPj)'); } @@ -50,23 +42,19 @@ class PageCheckout extends HookConsumerWidget { final components = [ WizardComponents( title: 'バックアップフォルダーの選択', - runInit: () => contentsNotifier.updateDragAndDropCallback( - (newDir) => backupDirNotifier.state = newDir, - ), + runInit: () {}, icon: Icons.folder_copy, screen: const CompSetBackupDir(), ), WizardComponents( title: '作業フォルダーの選択', - runInit: () => contentsNotifier.updateDragAndDropCallback( - (newDir) => workingDirNotifier.state = newDir, - ), + runInit: () {}, icon: Icons.drive_file_move, screen: const CompSetWorkingDir(), ), WizardComponents( title: 'プロジェクト設定の確認', - runInit: () => contentsNotifier.updateDragAndDropCallback(null), + runInit: () {}, icon: Icons.settings, screen: const CompPjSummary(), ), @@ -92,7 +80,6 @@ class PageCheckout extends HookConsumerWidget { void runDispose(BuildContext context, WidgetRef ref) { Navigator.pop(context); - ref.read(contentsPod.notifier).updateDragAndDropCallback(null); } return CompWizard( diff --git a/lib/view/routes/fab/create_pj.dart b/lib/view/routes/fab/create_pj.dart index 99bfd95..95d85e7 100644 --- a/lib/view/routes/fab/create_pj.dart +++ b/lib/view/routes/fab/create_pj.dart @@ -33,7 +33,6 @@ class PageCreatePj extends HookConsumerWidget { final contentsState = ref.watch(contentsPod); // notifier - final contentsNotifier = ref.read(contentsPod.notifier); final workingDirNotifier = ref.read(workingDirProvider.notifier); final backupDirNotifier = ref.read(backupDirProvider.notifier); @@ -49,9 +48,6 @@ class PageCreatePj extends HookConsumerWidget { workingDirNotifier.state = null; backupDirNotifier.state = contentsState.defaultBackupDir; ignoreFilesNotifier.state = []; - contentsNotifier.updateDragAndDropCallback( - (newDir) => workingDirNotifier.state = newDir, - ); log.df('init (home -> createPj)'); } @@ -61,32 +57,25 @@ class PageCreatePj extends HookConsumerWidget { final components = [ WizardComponents( title: '作業フォルダーの選択', - runInit: () => contentsNotifier.updateDragAndDropCallback( - (newDir) => workingDirNotifier.state = newDir, - ), + runInit: () {}, icon: Icons.drive_file_move, screen: const CompSetWorkingDir(), ), WizardComponents( title: 'バージョンの管理外にする ファイル/フォルダー を選択', - runInit: () { - pjNameNotifier.state = workingDirNotifier.state?.name ?? ''; - contentsNotifier.updateDragAndDropCallback(null); - }, + runInit: () {}, icon: Icons.folder_off, screen: const CompSetIgnoreFiles(), ), WizardComponents( title: 'プロジェクトの設定', - runInit: () => contentsNotifier.updateDragAndDropCallback( - (newDir) => backupDirNotifier.state = newDir, - ), + runInit: () {}, icon: Icons.settings, screen: const CompSetPjConfig(), ), WizardComponents( title: 'プロジェクトの詳細', - runInit: () => contentsNotifier.updateDragAndDropCallback(null), + runInit: () {}, icon: Icons.settings_suggest, screen: const CompSetPjDetails(), ), @@ -136,7 +125,6 @@ class PageCreatePj extends HookConsumerWidget { void runDispose(BuildContext context, WidgetRef ref) { Navigator.pop(context); - ref.read(contentsPod.notifier).updateDragAndDropCallback(null); } return CompWizard( diff --git a/lib/view/routes/fab/import_pj.dart b/lib/view/routes/fab/import_pj.dart index 249f1d3..5c44ded 100644 --- a/lib/view/routes/fab/import_pj.dart +++ b/lib/view/routes/fab/import_pj.dart @@ -11,7 +11,6 @@ import '../../../model/error/exception.dart'; import '../../../model/error/handler.dart'; import '../../../model/helper/config.dart'; import '../../../repository/config.dart'; -import '../../../vm/contents.dart'; import '../../../vm/page.dart'; import '../../../vm/projects.dart'; import '../../components/import_pj/pj_summary.dart'; @@ -26,9 +25,6 @@ class PageImportPj extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - // notifier - final contentsNotifier = ref.read(contentsPod.notifier); - // local final workingDirNotifier = ref.read(workingDirProvider.notifier); final importedPjNotifier = ref.read(importedPjProvider.notifier); @@ -39,9 +35,6 @@ class PageImportPj extends HookConsumerWidget { RouteController(ref).home2fabInit(); workingDirNotifier.state = null; importedPjNotifier.state = null; - contentsNotifier.updateDragAndDropCallback( - (newDir) => workingDirNotifier.state = newDir, - ); log.d('init (home -> importPj)'); } @@ -51,15 +44,13 @@ class PageImportPj extends HookConsumerWidget { final components = [ WizardComponents( title: '作業フォルダーの選択', - runInit: () => contentsNotifier.updateDragAndDropCallback( - (newDir) => workingDirNotifier.state = newDir, - ), + runInit: () {}, icon: Icons.folder_copy, screen: const CompSetWorkingDir(), ), WizardComponents( title: 'インポートするプロジェクトの確認', - runInit: () => contentsNotifier.updateDragAndDropCallback(null), + runInit: () {}, icon: Icons.settings, screen: const CompPjSummary(), ), @@ -99,7 +90,6 @@ class PageImportPj extends HookConsumerWidget { void runDispose(BuildContext context, WidgetRef ref) { Navigator.pop(context); - ref.read(contentsPod.notifier).updateDragAndDropCallback(null); } return CompWizard( diff --git a/lib/view/routes/projects/details.dart b/lib/view/routes/projects/details.dart index 68b4205..9db87cf 100644 --- a/lib/view/routes/projects/details.dart +++ b/lib/view/routes/projects/details.dart @@ -196,10 +196,10 @@ class CompProjectsDetails extends HookConsumerWidget { children: [ Expanded(child: CompPjStatus()), SizedBox(child: VerticalDivider()), - Expanded(child: CompPjSavePointHistory()) + Expanded(child: CompPjSavePointHistory()), ], ), - ) + ), ]; Widget content() { diff --git a/lib/vm/contents.dart b/lib/vm/contents.dart index d6c3281..dad6913 100644 --- a/lib/vm/contents.dart +++ b/lib/vm/contents.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:cross_file/cross_file.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../model/state.dart'; @@ -24,31 +25,18 @@ class Contents extends _$Contents { state = state.copyWith(defaultBackupDir: newDefaultBackupDir); } - void updateDragAndDropCallback( - void Function(Directory)? newDragAndDropCallback, - ) { - log.t('newDragAndDropCallback:\n $newDragAndDropCallback'); - state = state.copyWith(dragAndDropCallback: newDragAndDropCallback); - } - - Future getSingleDirectory(List paths) async { - if (paths.length != 1) { + static Future getSingleDirectory(List files) async { + if (files.length != 1) { return Future.error(DragAndDropErrors.multiPathsProvided); } - var isDirectoryTemp = false; // ignore: avoid_slow_async_io - await FileSystemEntity.isDirectory(paths[0]) - .then((bool isDirectory) => isDirectoryTemp = isDirectory); - if (!isDirectoryTemp) { + final isDirectory = await FileSystemEntity.isDirectory(files[0].path); + + if (!isDirectory) { return Future.error(DragAndDropErrors.isNotDirectory); } - return Directory(paths[0]); - } - - Future handleDragAndDrop(List paths) async { - if (state.dragAndDropCallback == null) return; - state.dragAndDropCallback!(await getSingleDirectory(paths)); + return Directory(files[0].path); } } diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 965f5cf..4b76545 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,12 +6,16 @@ #include "generated_plugin_registrant.h" +#include #include #include #include #include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) desktop_drop_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopDropPlugin"); + desktop_drop_plugin_register_with_registrar(desktop_drop_registrar); g_autoptr(FlPluginRegistrar) dynamic_color_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin"); dynamic_color_plugin_register_with_registrar(dynamic_color_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index dacf00d..ba5d50a 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + desktop_drop dynamic_color screen_retriever url_launcher_linux diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 8910f9e..b9ac399 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,7 @@ import FlutterMacOS import Foundation +import desktop_drop import dynamic_color import path_provider_foundation import screen_retriever @@ -12,6 +13,7 @@ import url_launcher_macos import window_manager func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin")) diff --git a/pubspec.lock b/pubspec.lock index d75568f..2084730 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -185,6 +185,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.1" + cross_file: + dependency: "direct main" + description: + name: cross_file + sha256: "445db18de832dba8d851e287aff8ccf169bed30d2e94243cb54c7d2f1ed2142c" + url: "https://pub.dev" + source: hosted + version: "0.3.3+6" crypto: dependency: transitive description: @@ -221,34 +229,34 @@ packages: dependency: "direct dev" description: name: dependency_validator - sha256: "08349175533ed0bd06eb9b6043cde66c45b2bfc7ebc222a7542cdb1324f1bf03" + sha256: f727a5627aa405965fab4aef4f468e50a9b632ba0737fd2f98c932fec6d712b9 url: "https://pub.dev" source: hosted - version: "3.2.2" - dotted_border: + version: "3.2.3" + desktop_drop: dependency: "direct main" description: - name: dotted_border - sha256: "07a5c5e8d4e6e992279e190e0352be8faa5b8f96d81c77a78b2d42f060279840" + name: desktop_drop + sha256: d55a010fe46c8e8fcff4ea4b451a9ff84a162217bdb3b2a0aa1479776205e15d url: "https://pub.dev" source: hosted - version: "2.0.0+3" - drag_and_drop_windows: + version: "0.4.4" + dotted_border: dependency: "direct main" description: - name: drag_and_drop_windows - sha256: bfeb04182ba9c0cd83955953a3e5eaa03ea146614cbfac4434cbcb0d99285ec1 + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" url: "https://pub.dev" source: hosted - version: "0.0.3" + version: "2.1.0" dynamic_color: dependency: "direct main" description: name: dynamic_color - sha256: de4798a7069121aee12d5895315680258415de9b00e717723a1bd73d58f0126d + sha256: "96bff3df72e3d428bda2b874c7a521e8c86f592cae626ea594922fcc8d166e0c" url: "https://pub.dev" source: hosted - version: "1.6.6" + version: "1.6.7" expandable: dependency: "direct main" description: @@ -285,10 +293,10 @@ packages: dependency: "direct main" description: name: file_picker - sha256: bdfa035a974a0c080576c4c8ed01cdf9d1b406a04c7daa05443ef0383a97bedc + sha256: "903dd4ba13eae7cef64acc480e91bf54c3ddd23b5b90b639c170f3911e489620" url: "https://pub.dev" source: hosted - version: "5.3.4" + version: "6.0.0" fixnum: dependency: transitive description: @@ -306,18 +314,18 @@ packages: dependency: "direct main" description: name: flutter_hooks - sha256: "9eab8fd7aa752c3c1c0a364f9825851d410eb935243411682f4b1b0a4c569d71" + sha256: "7c8db779c2d1010aa7f9ea3fbefe8f86524fcb87b69e8b0af31e1a4b55422dec" url: "https://pub.dev" source: hosted - version: "0.20.0" + version: "0.20.3" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4" + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -330,10 +338,10 @@ packages: dependency: "direct main" description: name: flutter_riverpod - sha256: b6cb0041c6c11cefb2dcb97ef436eba43c6d41287ac6d8ca93e02a497f53a4f3 + sha256: e667e406a74d67715f1fa0bd941d9ded49aff72f3a9f4440a36aece4e8d457a7 url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "2.4.3" flutter_speed_dial: dependency: "direct main" description: @@ -356,10 +364,10 @@ packages: dependency: "direct dev" description: name: freezed - sha256: "83462cfc33dc9680533a7f3a4a6ab60aa94f287db5f4ee6511248c22833c497f" + sha256: "21bf2825311de65501d22e563e3d7605dff57fb5e6da982db785ae5372ff018a" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.5" freezed_annotation: dependency: "direct main" description: @@ -396,10 +404,10 @@ packages: dependency: "direct main" description: name: hooks_riverpod - sha256: "2bb8ae6a729e1334f71f1ef68dd5f0400dca8f01de8cbdcde062584a68017b18" + sha256: "69dcb88acbc68c81fc27ec15a89a4e24b7812c83c13a6307a1a9366ada758541" url: "https://pub.dev" source: hosted - version: "2.3.8" + version: "2.4.3" http_multi_server: dependency: transitive description: @@ -468,10 +476,10 @@ packages: dependency: "direct main" description: name: logger - sha256: "66cb048220ca51cf9011da69fa581e4ee2bed4be6e82870d9e9baae75739da49" + sha256: "6bbb9d6f7056729537a4309bda2e74e18e5d9f14302489cc1e93f33b3fe32cac" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.2+1" logging: dependency: transitive description: @@ -548,10 +556,10 @@ packages: dependency: "direct main" description: name: path_provider - sha256: "909b84830485dbcd0308edf6f7368bc8fd76afa26a270420f34cabea2a6467a0" + sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" path_provider_android: dependency: transitive description: @@ -596,10 +604,10 @@ packages: dependency: "direct dev" description: name: pedantic_mono - sha256: c8e31e461c66d9f3c81d2d3383f0c787e1ae160b2f0450385c159ca27f3f66c5 + sha256: b7ac7d8a9f8824ab053773599918d6c99d643ed63ce20b440a19fed028a80d63 url: "https://pub.dev" source: hosted - version: "1.24.0" + version: "1.24.0+1" petitparser: dependency: transitive description: @@ -660,34 +668,34 @@ packages: dependency: transitive description: name: riverpod - sha256: b0657b5b30c81a3184bdaab353045f0a403ebd60bb381591a8b7ad77dcade793 + sha256: "494bf2cfb4df30000273d3052bdb1cc1de738574c6b678f0beb146ea56f5e208" url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "2.4.3" riverpod_analyzer_utils: dependency: transitive description: name: riverpod_analyzer_utils - sha256: aa216069d72f5478126029fa555874b4b38119f17e3f0f6c93fd63365f74502d + sha256: d72d7096964baf288b55619fe48100001fc4564ab7923ed0a7f5c7650e03c0d6 url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "0.3.4" riverpod_annotation: dependency: "direct main" description: name: riverpod_annotation - sha256: "8b3f7a54ddd5d53d6ea04bfb4ff77ee1b0816a1b563c0d9d43e73ce94bf2016d" + sha256: b724b2085405c4f62a1824a3fa3fb1e4858e09a4e2e8db92b7547c08d07a1377 url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.2.0" riverpod_generator: dependency: "direct dev" description: name: riverpod_generator - sha256: f668015d7b719c413c6001d4790689ea4a7bf76d5109118a1a98d5c23b20160d + sha256: "5b36ad2f2b562cffb37212e8d59390b25499bf045b732276e30a207b16a25f61" url: "https://pub.dev" source: hosted - version: "2.2.6" + version: "2.3.3" rxdart: dependency: transitive description: @@ -700,10 +708,10 @@ packages: dependency: transitive description: name: screen_retriever - sha256: "4931f226ca158123ccd765325e9fbf360bfed0af9b460a10f960f9bb13d58323" + sha256: "6ee02c8a1158e6dae7ca430da79436e3b1c9563c8cf02f524af997c201ac2b90" url: "https://pub.dev" source: hosted - version: "0.1.6" + version: "0.1.9" shelf: dependency: transitive description: @@ -833,10 +841,10 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "781bd58a1eb16069412365c98597726cd8810ae27435f04b3b4d3a470bacd61e" + sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27" url: "https://pub.dev" source: hosted - version: "6.1.12" + version: "6.1.14" url_launcher_android: dependency: transitive description: @@ -945,10 +953,10 @@ packages: dependency: "direct main" description: name: window_manager - sha256: "9eef00e393e7f9308309ce9a8b2398c9ee3ca78b50c96e8b4f9873945693ac88" + sha256: dcc865277f26a7dad263a47d0e405d77e21f12cb71f30333a52710a408690bd7 url: "https://pub.dev" source: hosted - version: "0.3.5" + version: "0.3.7" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d42f610..053cab4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,39 +10,40 @@ environment: dependencies: auto_size_text: ^3.0.0 - dotted_border: ^2.0.0+3 - drag_and_drop_windows: ^0.0.2 - dynamic_color: ^1.6.5 + cross_file: ^0.3.3+6 + desktop_drop: ^0.4.4 + dotted_border: ^2.1.0 + dynamic_color: ^1.6.7 expandable: ^5.0.1 - file_picker: ^5.3.2 + file_picker: ^6.0.0 flutter: sdk: flutter - flutter_hooks: ^0.20.0 - flutter_riverpod: ^2.3.6 + flutter_hooks: ^0.20.3 + flutter_riverpod: ^2.4.3 flutter_speed_dial: ^7.0.0 - freezed_annotation: ^2.2.0 - hooks_riverpod: ^2.3.6 + freezed_annotation: ^2.4.1 + hooks_riverpod: ^2.4.3 intl: ^0.18.1 - json_serializable: ^6.7.0 - logger: ^2.0.1 + json_serializable: ^6.7.1 + logger: ^2.0.2+1 path: ^1.8.3 - path_provider: ^2.0.15 + path_provider: ^2.1.1 reorderables: ^0.6.0 - riverpod_annotation: ^2.1.1 + riverpod_annotation: ^2.2.0 timelines: ^0.1.0 - url_launcher: ^6.1.11 - window_manager: ^0.3.4 + url_launcher: ^6.1.14 + window_manager: ^0.3.7 xml: ^6.3.0 dev_dependencies: - build_runner: ^2.4.5 - dependency_validator: 3.2.2 - flutter_lints: ^2.0.1 + build_runner: ^2.4.6 + dependency_validator: 3.2.3 + flutter_lints: ^2.0.3 flutter_test: sdk: flutter - freezed: ^2.3.5 - pedantic_mono: ^1.22.0 - riverpod_generator: ^2.2.3 + freezed: ^2.4.5 + pedantic_mono: ^1.24.0+1 + riverpod_generator: ^2.3.3 flutter: uses-material-design: true diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index df40aaa..ac04efd 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,15 +6,15 @@ #include "generated_plugin_registrant.h" -#include +#include #include #include #include #include void RegisterPlugins(flutter::PluginRegistry* registry) { - DragAndDropWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("DragAndDropWindowsPlugin")); + DesktopDropPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("DesktopDropPlugin")); DynamicColorPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); ScreenRetrieverPluginRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index e1a78ed..6675cdc 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,7 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST - drag_and_drop_windows + desktop_drop dynamic_color screen_retriever url_launcher_windows