mixinnetwork / flutter-plugins Goto Github PK
View Code? Open in Web Editor NEW🧱 Flutter plugins used in Mixin Messenger.
License: MIT License
🧱 Flutter plugins used in Mixin Messenger.
License: MIT License
Please add support for loadFile(..), loadFlutterAsset(..) and loadHtmlString(..) into the desktop_webview_window
similar to API provided by WebViewPlatformController.
No problem with windows,
It doesn't work on MacOS
可以让[desktop_webview_window] 当成控件显示在主界面 吗?我不想让它显示 在一个独立的窗口,类似于c#的cefsharp,可以放在winform的panel里使用
Can't run the app after installing desktop_webview_window: ^0.1.3
Launching lib/main.dart on macOS in debug mode...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `FlutterMacOS` from `Flutter/ephemeral`
-> Fetching podspec for `dart_vlc` from `Flutter/ephemeral/.symlinks/plugins/dart_vlc/macos`
-> Fetching podspec for `desktop_webview_window` from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`
-> Fetching podspec for `device_info_plus_macos` from `Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos`
-> Fetching podspec for `native_pdf_renderer` from `Flutter/ephemeral/.symlinks/plugins/native_pdf_renderer/macos`
-> Fetching podspec for `path_provider_macos` from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
CDN: trunk Relative path: all_pods_versions_5_f_4.txt exists! Returning local because checking is only perfomed in repo update
CDN: trunk Relative path: Specs/5/f/4/VLCKit/3.3.18b4/VLCKit.podspec.json exists! Returning local because checking is only perfomed in repo update
[!] CocoaPods could not find compatible versions for pod "desktop_webview_window":
In Podfile:
desktop_webview_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`)
Specs satisfying the `desktop_webview_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`)` dependency were found, but they required a higher minimum deployment target.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Exception: Error running pod install
Exited (sigterm)
pod install
output:
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "desktop_webview_window":
In Podfile:
desktop_webview_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`)
Specs satisfying the `desktop_webview_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`)` dependency were found, but they required a higher minimum deployment target.
flutter doctor
:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.3, on macOS 11.6.1 20G224 darwin-x64, locale ru-RU)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.62.3)
[✓] Connected device (2 available)
About desktop_drop
:
Flutter folks are now promoting XFile.
For better file system unification, is there any plan to implement cross-file.XFile?
If there are spaces in the path name of the file you are dropping, they get converted to %20. When making a new XFile on line 88, the %20 causes Exceptions (os error, file not found) when trying to look up details such as file length and modification time. If %20 is replaced with spaces here, then the XFile will have a valid path and not cause Exceptions when looking up file details.
files: paths.map((e) => XFile(e.replaceAll('%20', ' '))).toList(),
There is probably a more elegant solution than this, and I have only tested on a Linux desktop.
\appname\windows\flutter\ephemeral.plugin_symlinks\pasteboard\windows\pasteboard_plugin.cpp(8,10): fatal error C1083: Cannot open include file: 'atlimage.h': No such file or directory [F:\appname\build\windows\plugins\pasteboard\pasteboard_plugin.vcxproj]
Exception: Build process failed.
Hi, I am on linux and when I used bitsdojo plugin with desktop_multi_window package and whenever I closed any sub-window then all opened windows of that app would be closed too.
But when I used bitsdojo_window with multi_window plugin then that didn't happened.
Could it be fixed.
Hi,
I use auto_route for navigation and desktop_drop for file imports via drag and drop and have the following bug:
Reproducing steps:
working code example:
main.dart:
/// debugging desktop_drop package and auto_route
import 'package:auto_route/auto_route.dart';
import 'package:debug_desktop_drop/router/app_router.gr.dart';
import 'package:desktop_drop/desktop_drop.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
MyApp({Key? key}) : super(key: key);
final AppRouter _appRouter = AppRouter();
@override
Widget build(BuildContext context) {
return MaterialApp.router(
routerDelegate: _appRouter.delegate(),
routeInformationParser: _appRouter.defaultRouteParser(),
);
}
}
class MainPage extends StatefulWidget {
const MainPage({Key? key}) : super(key: key);
@override
_MainPageState createState() => _MainPageState();
}
class _MainPageState extends State<MainPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Main Page'),
actions: [
IconButton(
icon: const Icon(Icons.arrow_right),
onPressed: _pushToDropPage,
tooltip: 'push To drop Page',
),
IconButton(
icon: const Icon(Icons.close),
onPressed: _popMainPage,
tooltip: 'Pop Main Page',
),
],
),
body: Container(),
);
}
void _pushToDropPage() {
context.router.push(DropRouter());
}
void _popMainPage() {
Navigator.pop(context);
}
}
class DropPage extends StatefulWidget {
const DropPage({Key? key}) : super(key: key);
@override
_DropPageState createState() => _DropPageState();
}
class _DropPageState extends State<DropPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Drop Page'),
actions: [
IconButton(
icon: const Icon(Icons.arrow_right),
onPressed: _pushToMainPage,
tooltip: 'push To Main Page',
),
IconButton(
icon: const Icon(Icons.close),
onPressed: _popDropPage,
tooltip: 'Pop Drop Page',
),
],
),
body: DropTarget(
onDragDone: (details) {
print('dropped something on target');
},
child: Container(
color: Colors.green,
width: 200,
height: 200,
child: const Align(
alignment: Alignment.center,
child: Text('Drop Target'),
),
),
),
);
}
void _pushToMainPage() {
context.router.push(MainRouter());
}
void _popDropPage() {
Navigator.pop(context);
}
}
app_router.gr.dart:
// **************************************************************************
// AutoRouteGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// **************************************************************************
// AutoRouteGenerator
// **************************************************************************
//
// ignore_for_file: type=lint
import 'package:auto_route/auto_route.dart' as _i2;
import 'package:flutter/material.dart' as _i3;
import '../main.dart' as _i1;
class AppRouter extends _i2.RootStackRouter {
AppRouter([_i3.GlobalKey<_i3.NavigatorState>? navigatorKey])
: super(navigatorKey);
@override
final Map<String, _i2.PageFactory> pagesMap = {
MainRouter.name: (routeData) {
return _i2.CustomPage<dynamic>(
routeData: routeData,
child: const _i1.MainPage(),
opaque: true,
barrierDismissible: false);
},
DropRouter.name: (routeData) {
return _i2.CustomPage<dynamic>(
routeData: routeData,
child: const _i1.DropPage(),
opaque: true,
barrierDismissible: false);
}
};
@override
List<_i2.RouteConfig> get routes => [
_i2.RouteConfig(MainRouter.name, path: '/'),
_i2.RouteConfig(DropRouter.name, path: 'drop-page')
];
}
/// generated route for
/// [_i1.MainPage]
class MainRouter extends _i2.PageRouteInfo<void> {
const MainRouter() : super(MainRouter.name, path: '/');
static const String name = 'MainRouter';
}
/// generated route for
/// [_i1.DropPage]
class DropRouter extends _i2.PageRouteInfo<void> {
const DropRouter() : super(DropRouter.name, path: 'drop-page');
static const String name = 'DropRouter';
}
to generate the file above:
import 'package:auto_route/auto_route.dart';
import 'package:debug_desktop_drop/main.dart';
@CustomAutoRouter(
replaceInRouteName: 'Page,Route',
routes: <AutoRoute>[
AutoRoute(
page: MainPage,
name: "MainRouter",
path: '/',
initial: true,
),
AutoRoute(
path: 'drop-page',
page: DropPage,
name: 'DropRouter',
),
],
)
class $AppRouter {}
Hi,
Dragging a single audio file directly from Apple Music inside my DropTarget works fine.
However, dropping multiple audio files at once directly from Apple Music yields only the first from the multiple selected in the DropDoneDetails files that i get in onDragDone()
Dragging multiple audio files from Apple Music to any other destination (a directory, terminal, other app) works fine.
This feature is super important for any kind of music app. Is it possible that you have a look at it?
Thanks!
I'm having a problem using this plugin with bitsdojo_window
1.The three control buttons are only effective in the first window
2.The three control buttons of the newly opened window are not proxied
3.The proxy button click in the new window will make the first window react, such as closing
Is there any documentation or solution that supports this library, or this library will add functions like window proxy
dependencies:
flutter:
sdk: flutter
bitsdojo_window: ^0.1.1+1
flutter_acrylic: ^1.0.0
#include <flutter/dart_project.h>
#include <flutter/flutter_view_controller.h>
#include <windows.h>
#include "flutter_window.h"
#include "utils.h"
#include <bitsdojo_window_windows/bitsdojo_window_plugin.h>
auto bdw = bitsdojo_window_configure(BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP);
...
import 'dart:convert';
import 'package:bitsdojo_window/bitsdojo_window.dart';
import 'package:collection/collection.dart';
import 'package:desktop_lifecycle/desktop_lifecycle.dart';
import 'package:desktop_multi_window/desktop_multi_window.dart';
import 'package:flutter/material.dart';
import 'event_widget.dart';
void main(List args) async {
WidgetsFlutterBinding.ensureInitialized();
if (args.firstOrNull == 'multi_window') {
final windowId = int.parse(args[1]);
final argument = args[2].isEmpty
? const {}
: jsonDecode(args[2]) as Map<String, dynamic>;
// await Window.initialize();
runApp(_ExampleMainWindow());
} else {
// await Window.initialize();
runApp(const _ExampleMainWindow());
}
// Add this code below
doWhenWindowReady(() {
final initialSize = Size(600, 450);
appWindow.minSize = initialSize;
appWindow.size = initialSize;
appWindow.alignment = Alignment.center;
appWindow.title = "test";
appWindow.show();
});
}
class _ExampleMainWindow extends StatefulWidget {
const _ExampleMainWindow({Key? key}) : super(key: key);
@OverRide
State<_ExampleMainWindow> createState() => _ExampleMainWindowState();
}
class _ExampleMainWindowState extends State<_ExampleMainWindow> {
@OverRide
void initState() {
// TODO: implement initState
super.initState();
}
final buttonColors = WindowButtonColors(
iconNormal: Color(0xFF805306),
mouseOver: Color(0xFFF6A00C),
mouseDown: Color(0xFF805306),
iconMouseOver: Color(0xFF805306),
iconMouseDown: Color(0xFFFFD500));
final closeButtonColors = WindowButtonColors(
mouseOver: Color(0xFFD32F2F),
mouseDown: Color(0xFFB71C1C),
iconNormal: Color(0xFF805306),
iconMouseOver: Colors.white);
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
backgroundColor: Colors.transparent,
body: WindowBorder(
color: const Color(0xFFF6A00C),
child: Column(
children: [
SizedBox(
height: 30,
child: Container(
color: const Color(0xFFF6A00C),
child: WindowTitleBarBox(
child: Row(children: [
Expanded(child: MoveWindow()),
Row(
children: [
MinimizeWindowButton(colors: buttonColors),
MaximizeWindowButton(colors: buttonColors),
CloseWindowButton(colors: closeButtonColors),
],
)
])),
),
),
TextButton(
onPressed: () async {
final window =
await DesktopMultiWindow.createWindow(jsonEncode({
'args1': 'Sub window',
'args2': 100,
'args3': true,
'bussiness': 'bussiness_test',
}));
window
..setFrame(const Offset(0, 0) & const Size(1280, 720))
..center()
..setTitle('Another window')
..show();
},
child: const Text('Create a new World!'),
),
Expanded(
child:
EventWidget(controller: WindowController.fromWindowId(0)),
)
],
),
),
),
);
}
}
class _ExampleSubWindow extends StatelessWidget {
const _ExampleSubWindow({
Key? key,
required this.windowController,
required this.args,
}) : super(key: key);
final WindowController windowController;
final Map? args;
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Column(
children: [
if (args != null)
Text(
'Arguments: ${args.toString()}',
style: const TextStyle(fontSize: 20),
),
ValueListenableBuilder(
valueListenable: DesktopLifecycle.instance.isActive,
builder: (context, active, child) {
if (active) {
return const Text('Window Active');
} else {
return const Text('Window Inactive');
}
},
),
TextButton(
onPressed: () async {
windowController.close();
},
child: const Text('Close this window'),
),
Expanded(child: EventWidget(controller: windowController)),
],
),
),
);
}
}
It is useful package that help me run web on macos.
Is it possiable implemnt onWebLoadError for some error handling?
Hi, I'm using this plugin, on windows it works perfectly but on linux the "drop zone" is not detected and the related events don't work
OS: Ubuntu 21.04
Plugin version: 0.1.0
Code:
bool entered = false;
@override
Widget build(BuildContext context) => DropTarget(
onDragEntered: (details) => setState(() {
entered = true;
}),
child: Container(
color: entered ? Colors.lime : Colors.blue,
child: const Text("Text"),
),
);
Can we rendered as widget rather than opening in another window?
Hello,
I developed a flutter app for Windows 10 and I am using win_toast for the notification.
It seemed to be working fine while I was developing, but after I installed the application with the msix the notifications are not working anymore.
I can still see the image and the text but the action buttons do not appear anymore and the title of the notification is not the one that should be displayed, instead I see the identifier of the app with a code as you can see in the image below.
First of all big thanks for the plugin! I would like to use it for an authentication flow in which I have to fetch a secret from a callback url. In order to do that I would need to be able to listen to url changes to identify the callback url and extract the secret.
I tried to find a way to implement that with this plugin but had no success so far. Could you maybe point me to a solution for that?
Hi, thanks for maintaining this plugin :)
I've just started using the desktop_drop
library, and I'm kind of missing a feature that I've seen in a lot of drop implementation in other ecosystems.
When a user drags a file over the drop area, it is very helpful for the application to reject the drag based on e.g. the type of the file that is being dragged. This helps users understand which files can be accepted by the application.
If possible, I would love to see this feature added to this already great plugin.
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `FlutterMacOS` from `Flutter/ephemeral`
-> Fetching podspec for `desktop_webview_window` from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
[!] CocoaPods could not find compatible versions for pod "desktop_webview_window":
In Podfile:
desktop_webview_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`)
Specs satisfying the `desktop_webview_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`)` dependency were found, but they
required a higher minimum deployment target.
It is very crucial to allow access of file bytes and metadata like name, size, extension, etc for it to be usable properly. Our app uses drop_zone
for web and it allows us to access html.file
which is not ideal as it should be abstracted away behind a platform but it still makes our job easier.
I tried the web support of this package and came to know that it only provides blob uri which is not much useful. I tried to look into ways of retrieving file bytes and metadata from it but I couldn't.
A possible solution could be abstracting away the file implementation by creating a platform independent File
class that allows to access various file properties and bytes. This allows to use it on any platform.
file_picker
plugin seems to do the same thing and it is quite convenient.
These could be the basic info any app/developer would want to access.
If this package can support this, it would a huge help to any developers out there.
Is there a way to listen to clipboard paste events and then read image? How do I use this plugin in situation where whenever an image is pasted from clipboard, I need a callback to handle the event?
WebviewWindow.isWebviewAvailable()
return true when the user not installed WebView2 Runtime yet
and when i run
final webView = await WebviewWindow.create();
webView.launch(url);
it will just show new window with white screen and then not responding
flutter doctor -v
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1466], locale en-ID)
• Flutter version 2.8.1 at C:\sdk\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (6 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\Users\rizal\AppData\Local\Android\sdk
• Platform android-32, build-tools 32.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.9)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.11.32106.194
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.1466]
• Chrome (web) • chrome • web-javascript • Google Chrome 97.0.4692.99
• Edge (web) • edge • web-javascript • Microsoft Edge 97.0.1072.55
• No issues found!
Are there plans for implementing desktop dragging of content outside of the window?
Scenario: I have an app that I need to be able to drag text from the Flutter desktop app to another desktop application that is a drop target; the drop target is a text field in a browser window.
Other drag scenarios could be images as well as text.
I'm doing this in a C# WPF app that I use every day that I'm converting to Flutter. This is the last feature I've not been able to figure out how to do.
Thank you and have a great day, Karl
In the created window can not call other plug-ins, it will throw MissingPluginException, but the main window can be called.
operating system: ubuntu 21.10
can i use this plugin to load url hidden from user?
like how flutter_webview_plugin does ?
I got file:///Users/xxx/dir
on macOS, expect /User/xxx/dir
.
desktop_drop: 0.1.2
Flutter 2.5.3
macOS 12.0.1
Is it possible to put the webview in the main window?
We found a exception when we cann webview.close then call webview.create.
I can reproduce this issue on macos on 0.16
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(0, can not find webview for id: 0, null, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18)
<asynchronous suspension>
desktop_webview_window, Macos
I can use CreateConfiguration() with a big windowHeight and i obtain a window that fit exactly the screen vertically.
But if i give a too big windowWidth the window is bigger than the screen.
Is there a way to get the screen resolution?
I had some problem
about project-archive process
No such module 'desktop_drop'
The readme of desktop_multi_window is titled flutter_multi_window
Crashes in Safari when calling the "File.lastModifiedDate" getter. Root cause seems to be a Flutter (actually dart-sdk) bug.
html.window.onDrop.listen((event) {
event.preventDefault();
final results = <WebDropItem>[];
try {
final items = event.dataTransfer.files;
if (items != null) {
for (var index = 0; index < items.length; index++) {
results.add(WebDropItem(
uri: html.Url.createObjectUrl(items[index]),
name: items[index].name,
size: items[index].size,
type: items[index].type,
relativePath: items[index].relativePath,
lastModified: items[index].lastModifiedDate,
));
}
}
} catch (e, s) {
debugPrint('desktop_drop_web: $e $s');
} finally {
channel.invokeMethod(
"performOperation_web",
results.map((e) => e.toJson()).toList(),
);
}
});
It would be awesome if onDragDone
could provide the pointer location on the screen. The usecase is for drawboard applications like Figma or Adobe XD where it allows to drag and drop images and shows them at pointer location.
e.g.
onDragDone: (List<Uri> urls, Offset position) {
// dx = x coordinate
// dy = y coordinate
}
Is it possible to read files dropped directly from an email without having to first store it in computer?
In the windows desktop environment, an accidental appearance after quitting the example program cannot delete the desktop_lifecycle_plugin.dll
Where is event_widget.dart located or how can I install it? It's mentioned in the imprt-section as the last import, in the example code, but I can't find any related file to that neither inside the project nor on pub-dev nor on google.
Im getting /C:/Users/New%20User/Desktop/Test%20File%001.json
when I use detail.urls[0].path.toString()
on onDragDone
. How do I get the proper path? I want to get the path as C:\Users\New User\Desktop\Test File 001.json
I can see there's a print out from the package that actually printts the correct path after I drag a file but I cant tell how to access that
Flutter is already up to date on channel stable
Flutter 2.10.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5f105a6ca7 (8 days ago) • 2022-02-01 14:15:42 -0800
Engine • revision 776efd2034
Tools • Dart 2.16.0 • DevTools 2.9.2
Exception
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(0, failed to show window, null, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177)
<asynchronous suspension>
#2 WebviewWindow.create (package:desktop_webview_window/desktop_webview_window.dart:67)
<asynchronous suspension>
#3 BotoesDeOpcoesDesktop.build.<anonymous closure> (package:app/app.dart:52)
<asynchronous suspension>
packages/desktop_multi_window/example
But this doesn't happen after I generate the release version
hi
now use onSend to communicate with each other window, this machanism cann't suitable for broadcast.
a data changed in windows a, windows b, c, d need to update ui. it convenient to use broadcast .
so need a get. allWindowIds api.
Won't run on macos
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
[!] CocoaPods could not find compatible versions for pod "desktop_webview_window":
In Podfile:
desktop_webview_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`)
Specs satisfying the `desktop_webview_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`)` dependency were
found, but they required a higher minimum deployment target.
[✓] Flutter (Channel master, 2.6.0-12.0.pre.89, on macOS 11.6 20G165 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
I want to grab the cookies from the loaded page with the package desktop_webview_window: ^0.1.6 . Request you to add a function for it.
I want to catch html from webview on windows destop.
is it possible support :
https://pub.dev/documentation/webview_flutter/latest/webview_flutter/WebViewController/runJavascriptReturningResult.html
or is there have other solution ?
I want to listen to the page loaded in the Webiew to parse its content
I get content by
final content = await webview.evaluateJavaScript(
"document.documentElement.outerHTML.toString()");
but it prints
flutter: <html><head></head><body></body></html>
I know you have used Future.delay
in your example but It is better to listen to the page loaded
if i try to see http://localhost pages (served by shelf) i have a blank page and these xcode logs:
<desktop_webview_window.WebviewWindowController: 0x6000006b91e0> deinited
"load url: http://localhost/"
2021-11-29 18:07:15.179862+0100 elios_viewer_mac[21196:4026205] [Process] 0x7fd5cd0f2220 - [pageProxyID=23, webPageID=24, PID=21403] WebPageProxy::didFailProvisionalLoadForFrame: frameID = 3, domain = NSURLErrorDomain, code = -1022
flutter: args: [web_view_title_bar, 2, 24]
flutter: runWebViewTitleBarWidget: 2, 24
i think it's a security problem, is there a way to let it work from flutter? is it a macOs setting?
Our app has a typical master-detail setup, where dragging files into the master page will create a new entry, and doing it on the detail page will add to the existing entry.
The problem we're having is that when we drag items into the detail page, the master page also reacts to the drag-and-drop events, despite being in the background.
I believe this is due to how the Flutter Navigator works. We're using Navigator.push() to load the detail page, but it seems the master page is still active in the background. Normally this isn't an issue since touch events are captured by the topmost page.
Is there any recommendation on how to get around this? Better would be if the DropTarget could capture and consume those events itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.