diff --git a/lib/stateManagement/openFiles/types/xml/sync/syncServer.dart b/lib/stateManagement/openFiles/types/xml/sync/syncServer.dart index 96217566..32dd6e1c 100644 --- a/lib/stateManagement/openFiles/types/xml/sync/syncServer.dart +++ b/lib/stateManagement/openFiles/types/xml/sync/syncServer.dart @@ -110,7 +110,11 @@ bool _startupCompleted() { } void startSyncServer() async { - final server = await HttpServer.bind("localhost", wsPort); - server.transform(WebSocketTransformer()).listen(_handleWebSocket); - serverStartTime = DateTime.now(); + try { + final server = await HttpServer.bind("localhost", wsPort); + server.transform(WebSocketTransformer()).listen(_handleWebSocket); + serverStartTime = DateTime.now(); + } catch (e) { + print("Failed to start local server. Maybe already running"); + } } diff --git a/lib/stateManagement/preferencesData.dart b/lib/stateManagement/preferencesData.dart index 03916737..5817a8f5 100644 --- a/lib/stateManagement/preferencesData.dart +++ b/lib/stateManagement/preferencesData.dart @@ -96,7 +96,7 @@ class PreferencesData extends OpenFileData { SavableProp? lastWwiseProjectDir; SavableProp? lastWwiseProjectSettings; SavableProp? lastHierarchyFiles; - // SavableProp>? lastOpenedFiles; + SavableProp? lastColorPickerMode; PreferencesData._() : prefsFuture = SharedPreferences.getInstance(), @@ -149,7 +149,7 @@ class PreferencesData extends OpenFileData { lastWwiseProjectDir = SavableProp("lastWwiseProjectDir", _prefs!, ""); lastWwiseProjectSettings = SavableProp("lastWwiseProjectSettings", _prefs!, {}); lastHierarchyFiles = SavableProp("lastHierarchyFiles", _prefs!, []); - // lastOpenedFiles = SavableProp("lastOpenedFiles", _prefs!, []); + lastColorPickerMode = SavableProp("lastColorPickerMode", _prefs!, 0); await super.load(); _loadingState = LoadingState.loaded; diff --git a/lib/widgets/filesView/types/effect/ColorPicker.dart b/lib/widgets/filesView/types/effect/ColorPicker.dart new file mode 100644 index 00000000..d8522c90 --- /dev/null +++ b/lib/widgets/filesView/types/effect/ColorPicker.dart @@ -0,0 +1,319 @@ + +import 'dart:math'; + +import 'package:flutter/material.dart'; + +import '../../../../stateManagement/Property.dart'; +import '../../../../utils/utils.dart'; +import '../../../misc/ChangeNotifierWidget.dart'; +import 'RgbColorModeFields.dart'; + +class ColorPicker extends ChangeNotifierWidget { + final VectorProp rgb; + final bool showTextFields; + + ColorPicker({super.key, required this.rgb, required this.showTextFields}) : super(notifier: rgb); + + @override + State createState() => _ColorPickerState(); +} + +class _ColorPickerState extends ChangeNotifierState { + late final double svAreaHeight; + double desiredHue = 0.0; + double desiredSaturation = 0.0; + + @override + void initState() { + super.initState(); + svAreaHeight = 200 - 25 - (widget.showTextFields ? 40 : 0); + } + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + SizedBox( + height: svAreaHeight, + child: GestureDetector( + onPanStart: (details) => onSvDrag(details.localPosition), + onPanUpdate: (details) => onSvDrag(details.localPosition), + child: CustomPaint( + painter: _SvPainter(widget.rgb, desiredHue, desiredSaturation), + ), + ), + ), + GestureDetector( + onPanStart: (details) => onHueDrag(details.localPosition), + onPanUpdate: (details) => onHueDrag(details.localPosition), + child: Container( + height: 25, + padding: const EdgeInsets.symmetric(vertical: 2), + child: CustomPaint( + painter: _HuePainter(widget.rgb, desiredHue), + ), + ), + ), + if (widget.showTextFields) + Padding( + padding: const EdgeInsets.all(4.0), + child: RgbColorModeFields(rgb: widget.rgb), + ), + ], + ); + } + + void onHueDrag(Offset pos) { + var renderBox = context.findRenderObject() as RenderBox; + var size = renderBox.size; + var hue = clamp(pos.dx / size.width, 0.0, 0.999); + var sat = _rgbToSaturation(widget.rgb.map((e) => e.value.toDouble()).toList()); + var val = _rgbToValue(widget.rgb.map((e) => e.value.toDouble()).toList()); + var rgb = _hsvToRgb(hue, sat, val); + var oldRgb = widget.rgb.map((e) => e.value.toDouble()).toList(); + var brightness = _scaleFactor(oldRgb); + for (var i = 0; i < 3; i++) { + widget.rgb[i].value = rgb[i] * brightness; + } + desiredHue = hue; + setState(() {}); + } + + void onSvDrag(Offset pos) { + var renderBox = context.findRenderObject() as RenderBox; + var size = renderBox.size; + var sat = clamp(pos.dx / size.width, 0.0, 1.0); + var val = 1.0 - clamp(pos.dy / svAreaHeight, 0.0, 1.0); + var hue = _rgbToHue(widget.rgb.map((e) => e.value.toDouble()).toList()); + var oldRgb = widget.rgb.map((e) => e.value.toDouble()).toList(); + hue = _hueOrDesired(hue, _rgbToSaturation(oldRgb), _rgbToValue(oldRgb), desiredHue); + var rgb = _hsvToRgb(hue, sat, val); + var brightness = _scaleFactor(oldRgb); + var newTempBrightness = rgb.reduce(max); + var brightnessFactor = brightness > 1 && val > 0.9 && newTempBrightness > 0 ? brightness / newTempBrightness : 1; + for (var i = 0; i < 3; i++) { + widget.rgb[i].value = rgb[i] * brightnessFactor; + } + desiredSaturation = sat; + setState(() {}); + } +} + +class _HuePainter extends CustomPainter { + final VectorProp rgb; + final double desiredHue; + double lastHue = -1; + + _HuePainter(this.rgb, this.desiredHue); + + @override + void paint(Canvas canvas, Size size) { + const colors = [ + (0, Color.fromARGB(255, 255, 0, 0)), + (60, Color.fromARGB(255, 255, 255, 0)), + (120, Color.fromARGB(255, 0, 255, 0)), + (180, Color.fromARGB(255, 0, 255, 255)), + (240, Color.fromARGB(255, 0, 0, 255)), + (300, Color.fromARGB(255, 255, 0, 255)), + (360, Color.fromARGB(255, 255, 0, 0)), + ]; + + const barHeight = 10.0; + var centerRect = Rect.fromLTWH(0, (size.height - barHeight) / 2, size.width, barHeight); + + var gradientPaint = Paint() + ..shader = LinearGradient( + colors: colors.map((e) => e.$2).toList(), + stops: colors.map((e) => e.$1 / 360).toList(), + ).createShader(centerRect); + + canvas.drawRect(centerRect, gradientPaint); + + var hue = _getHue(); + var rgbHue = _hueToRgb(hue).map((e) => (e * 255).round()).toList(); + var radius = size.height / 2 - 2; + var circleOffset = Offset(hue * size.width, size.height / 2); + canvas.drawCircle( + circleOffset, + radius + 2, + Paint()..color = Colors.white + ); + canvas.drawCircle( + circleOffset, + radius, + Paint()..color = Color.fromARGB(255, rgbHue[0], rgbHue[1], rgbHue[2]) + ); + + + lastHue = hue; + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) => _getHue() != lastHue; + + double _getHue() { + var rgb = this.rgb.map((e) => e.value.toDouble()).toList(); + var hue = _hueOrDesired(_rgbToHue(rgb), _rgbToSaturation(rgb), _rgbToValue(rgb), desiredHue); + return hue; + } +} + +class _SvPainter extends CustomPainter { + final VectorProp rgb; + final double desiredHue; + final double desiredSaturation; + String lastValue = ""; + + _SvPainter(this.rgb, this.desiredHue, this.desiredSaturation); + + @override + void paint(Canvas canvas, Size size) { + var rgb = this.rgb.map((e) => e.value.toDouble()).toList(); + var scale = _scaleFactor(rgb); + rgb = rgb.map((e) => e / scale).toList(); + var hue = _hueOrDesired(_rgbToHue(rgb), _rgbToSaturation(rgb), _rgbToValue(rgb), desiredHue); + var hueRgb = _hueToRgb(hue).map((e) => (e * 255).round()).toList(); + var rect = Rect.fromLTWH(0, 0, size.width, size.height); + var whiteHueGradient = LinearGradient( + colors: [ + Colors.white, + Color.fromARGB(255, hueRgb[0], hueRgb[1], hueRgb[2]), + ], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ).createShader(rect); + var blackMaskGradient = LinearGradient( + colors: [ + Colors.white, + Colors.black, + ], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ).createShader(rect); + + canvas.drawRect( + rect, + Paint() + ..shader = whiteHueGradient + ); + canvas.drawRect( + rect, + Paint() + ..shader = blackMaskGradient + ..blendMode = BlendMode.multiply + ); + + var value = _rgbToValue(rgb); + var saturation = _saturationOrDesired(_rgbToSaturation(rgb), value, desiredSaturation); + var circleOffset = Offset(saturation * size.width, (1 - value) * size.height); + var radius = 10.5; + canvas.drawCircle( + circleOffset, + radius, + Paint()..color = Colors.white + ); + var rgb255 = rgb.map((e) => (e * 255).round()).toList(); + canvas.drawCircle( + circleOffset, + radius - 2, + Paint()..color = Color.fromARGB(255, rgb255[0], rgb255[1], rgb255[2]) + ); + + lastValue = this.rgb.toString(); + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) => rgb.toString() != lastValue; +} + +double _rgbToHue(List rgb) { + var scale = _scaleFactor(rgb); + rgb = rgb.map((e) => e / scale).toList(); + var maxVal = rgb.reduce(max); + var minVal = rgb.reduce(min); + var delta = maxVal - minVal; + if (delta == 0) { + return 0; + } + var hue = 0.0; + if (maxVal == rgb[0]) { + hue = (rgb[1] - rgb[2]) / delta; + } else if (maxVal == rgb[1]) { + hue = 2 + (rgb[2] - rgb[0]) / delta; + } else { + hue = 4 + (rgb[0] - rgb[1]) / delta; + } + hue *= 60; + if (hue < 0) { + hue += 360; + } + return hue / 360; +} + +double _rgbToSaturation(List rgb) { + var maxVal = rgb.reduce(max); + var minVal = rgb.reduce(min); + if (maxVal == 0) { + return 0; + } + return (maxVal - minVal) / maxVal; +} + +double _rgbToValue(List rgb) { + var scale = _scaleFactor(rgb); + return rgb.reduce(max) / scale; +} + +List _hueToRgb(double h) { + var kr = (5 + h * 6) % 6; + var kg = (3 + h * 6) % 6; + var kb = (1 + h * 6) % 6; + + var r = 1.0 - max(min(min(kr, 4-kr), 1), 0); + var g = 1.0 - max(min(min(kg, 4-kg), 1), 0); + var b = 1.0 - max(min(min(kb, 4-kb), 1), 0); + + return [r, g, b]; +} + +List _hsvToRgb(double h, double s, double v) { + double r, g, b; + + var i = (h * 6).floor(); + double f = h * 6 - i; + double p = v * (1 - s); + double q = v * (1 - f * s); + double t = v * (1 - (1 - f) * s); + + switch(i % 6){ + case 0: r = v; g = t; b = p; break; + case 1: r = q; g = v; b = p; break; + case 2: r = p; g = v; b = t; break; + case 3: r = p; g = q; b = v; break; + case 4: r = t; g = p; b = v; break; + case 5: r = v; g = p; b = q; break; + default: r = 0; g = 0; b = 0; break; + } + + return [r, g, b]; +} + +double _hueOrDesired(double hue, double sat, double val, double desiredHue) { + if (hue == 0 && desiredHue != 0 && (sat == 0 || val == 0)) { + return desiredHue; + } + return hue; +} + +double _saturationOrDesired(double sat, double val, double desiredSaturation) { + if (sat == 0 && desiredSaturation != 0 && val == 0) { + return desiredSaturation; + } + return sat; +} + +double _scaleFactor(Iterable rgb) { + var maxVal = rgb.reduce(max); + return max(maxVal, 1.0); +} diff --git a/lib/widgets/filesView/types/effect/RgbColorModeFields.dart b/lib/widgets/filesView/types/effect/RgbColorModeFields.dart new file mode 100644 index 00000000..29ee1357 --- /dev/null +++ b/lib/widgets/filesView/types/effect/RgbColorModeFields.dart @@ -0,0 +1,190 @@ + +import 'dart:math'; + +import 'package:flutter/material.dart'; + +import '../../../../stateManagement/Property.dart'; +import '../../../../stateManagement/preferencesData.dart'; +import '../../../misc/ChangeNotifierWidget.dart'; +import '../../../propEditors/primaryPropTextField.dart'; +import '../../../propEditors/propEditorFactory.dart'; + +class RgbColorModeFields extends ChangeNotifierWidget { + final VectorProp rgb; + + RgbColorModeFields({super.key, required this.rgb}) : super(notifier: rgb); + + @override + State createState() => _RgbColorModeFieldsState(); +} + +class _RgbColorModeFieldsState extends ChangeNotifierState { + late _ColorMode colorMode; + + @override + void initState() { + super.initState(); + + var prefs = PreferencesData(); + colorMode = _ColorMode.values[prefs.lastColorPickerMode!.value]; + } + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, constraints) { + var compact = constraints.maxWidth < 300; + return Row( + children: [ + PopupMenuButton<_ColorMode>( + initialValue: colorMode, + onSelected: (v) { + setState(() => colorMode = v); + var prefs = PreferencesData(); + prefs.lastColorPickerMode!.value = v.index; + }, + itemBuilder: (context) => _ColorMode.values.map((e) => PopupMenuItem( + value: e, + height: 20, + child: Align( + alignment: Alignment.centerRight, + child: Text(e.name) + ), + )).toList(), + position: PopupMenuPosition.under, + constraints: BoxConstraints.tightFor(width: 60), + popUpAnimationStyle: AnimationStyle(duration: Duration.zero), + tooltip: "", + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + colorMode.name, + style: const TextStyle(fontWeight: FontWeight.bold), + ), + const Icon(Icons.arrow_drop_down), + ], + ), + ), + if (colorMode == _ColorMode.raw) + ...makeRawFields(context, compact) + else if (colorMode == _ColorMode.rgb) + ...makeRgbFields(context, compact) + else if (colorMode == _ColorMode.hex) + ...makeHexFields(context, compact) + , + if (colorMode != _ColorMode.raw) ...[ + ...makeBrightnessField(context, compact), + ], + ], + ); + } + ); + } + + List makeRawFields(BuildContext context, bool compact) { + return [ + for (int i = 0; i < 3; i++) ...[ + SizedBox(width: compact ? 1 : 5), + Text("RGB"[i]), + SizedBox(width: compact ? 1 : 5), + Flexible( + child: makePropEditor(widget.rgb[i]) + ) + ] + ]; + } + + List makeRgbFields(BuildContext context, bool compact) { + return [ + for (int i = 0; i < 3; i++) ...[ + SizedBox(width: compact ? 1 : 5), + Text("RGB"[i]), + SizedBox(width: compact ? 1 : 5), + Flexible( + child: PrimaryPropTextField( + key: Key(widget.rgb[i].uuid), + prop: widget.rgb[i], + validatorOnChange: (str) => double.tryParse(str) == null ? "Invalid number" : null, + onValid: (str) { + var brightness = getBrightness(); + widget.rgb[i].value = double.parse(str) / 255 * brightness; + }, + getDisplayText: () { + var brightness = getBrightness(); + return (widget.rgb[i].value * 255 / brightness).toString(); + }, + ), + ) + ] + ]; + } + + List makeHexFields(BuildContext context, bool compact) { + return [ + Flexible( + child: PrimaryPropTextField( + key: Key(widget.rgb.uuid), + prop: widget.rgb, + validatorOnChange: (str) => RegExp(r"^(#|0x)?[a-fA-F\d]+$").hasMatch(str) ? null : "Invalid hex number", + onValid: (hexStr) { + if (hexStr.isNotEmpty && hexStr[0] == "#") + hexStr = hexStr.substring(1); + else if (hexStr.length > 2 && hexStr.startsWith("0x")) + hexStr = hexStr.substring(2); + var hexInt = int.parse(hexStr, radix: 16); + var r = (hexInt >> 16) & 0xFF; + var g = (hexInt >> 8) & 0xFF; + var b = hexInt & 0xFF; + var brightness = getBrightness(); + widget.rgb[0].value = r / 255 * brightness; + widget.rgb[1].value = g / 255 * brightness; + widget.rgb[2].value = b / 255 * brightness; + }, + getDisplayText: () { + var brightness = getBrightness(); + var rgb = widget.rgb + .map((e) => e.value * 255 ~/ brightness) + .map((e) => e.toRadixString(16).padLeft(2, "0")); + return rgb.join(); + }, + ), + ) + ]; + } + + List makeBrightnessField(BuildContext context, bool compact) { + return [ + SizedBox(width: compact ? 1 : 5), + Icon(Icons.light_mode, size: 16), + SizedBox(width: compact ? 1 : 5), + Flexible( + child: PrimaryPropTextField( + prop: widget.rgb, + validatorOnChange: (str) => double.tryParse(str) == null ? "Invalid number" : null, + onValid: (str) { + var prevBrightness = getBrightness(); + var newBrightness = double.parse(str); + for (var i = 0; i < 3; i++) { + widget.rgb[i].value = widget.rgb[i].value / prevBrightness * newBrightness; + } + }, + getDisplayText: () => getBrightness().toString(), + ), + ) + ]; + } + + double getBrightness() { + var maxVal = widget.rgb + .map((e) => e.value.toDouble()) + .reduce(max); + return max(maxVal, 1.0); + } +} + +enum _ColorMode { + raw, + rgb, + hex, +} diff --git a/lib/widgets/filesView/types/effect/RgbPropEditor.dart b/lib/widgets/filesView/types/effect/RgbPropEditor.dart index d08c86f3..f6ddb69b 100644 --- a/lib/widgets/filesView/types/effect/RgbPropEditor.dart +++ b/lib/widgets/filesView/types/effect/RgbPropEditor.dart @@ -5,57 +5,138 @@ import 'package:flutter/material.dart'; import '../../../../stateManagement/Property.dart'; import '../../../misc/ChangeNotifierWidget.dart'; -import '../../../propEditors/VectorPropEditor.dart'; -import '../../../propEditors/propEditorFactory.dart'; +import '../../../theme/customTheme.dart'; +import 'ColorPicker.dart'; +import 'RgbColorModeFields.dart'; -class RgbPropEditor extends StatelessWidget { +class RgbPropEditor extends StatefulWidget { final VectorProp prop; final bool showTextFields; const RgbPropEditor({super.key, required this.prop, this.showTextFields = true}); + @override + State createState() => _RgbPropEditorState(); +} + +class _RgbPropEditorState extends State { + OverlayEntry? overlayEntry; + Rect? overlayRect; + bool hasClickedOutside = false; + + @override + void dispose() { + overlayEntry?.remove(); + super.dispose(); + } + @override Widget build(BuildContext context) { - return Row( - mainAxisSize: MainAxisSize.min, - children: [ - ChangeNotifierBuilder( - notifier: prop, - builder: (context) { - double maxVal = prop - .map((e) => e.value.toDouble()) - .reduce(max); - maxVal = max(maxVal, 1.0); - return Container( - width: 20, - height: 20, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(5), - color: Color.fromARGB( - 255, - (prop[0].value.toDouble() / maxVal * 255).toInt(), - (prop[1].value.toDouble() / maxVal * 255).toInt(), - (prop[2].value.toDouble() / maxVal * 255).toInt(), + return Listener( + onPointerUp: (_) => showColorPicker(context), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + ChangeNotifierBuilder( + notifier: widget.prop, + builder: (context) { + double maxVal = widget.prop + .map((e) => e.value.toDouble()) + .reduce(max); + maxVal = max(maxVal, 1.0); + var color = Color.fromARGB( + 255, + (widget.prop[0].value.toDouble() / maxVal * 255).toInt(), + (widget.prop[1].value.toDouble() / maxVal * 255).toInt(), + (widget.prop[2].value.toDouble() / maxVal * 255).toInt(), + ); + return MouseRegion( + cursor: SystemMouseCursors.click, + child: AnimatedContainer( + duration: const Duration(milliseconds: 200), + width: 20, + height: 20, + decoration: BoxDecoration( + boxShadow: [ + if (maxVal > 1) + BoxShadow(color: color, blurRadius: 3 * maxVal, spreadRadius: 1 * maxVal) + ], + borderRadius: BorderRadius.circular(5), + color: color, + border: Border.all( + color: Colors.black, + ), + ), ), - border: Border.all( - color: Colors.black, + ); + } + ), + if (widget.showTextFields) ...[ + const SizedBox(width: 10), + Expanded( + child: RgbColorModeFields(rgb: widget.prop) + ), + ], + ], + ), + ); + } + + void showColorPicker(BuildContext context) { + if (overlayEntry != null) { + return; + } + const width = 350.0; + const height = 200.0; + var windowSize = MediaQuery.of(context).size; + var renderBox = context.findRenderObject() as RenderBox; + var selfPos = renderBox.localToGlobal(Offset.zero); + var selfSize = renderBox.size; + var top = selfPos.dy - height - 4 > 0 + ? selfPos.dy - height + : selfPos.dy + selfSize.height; + var left = selfPos.dx + width + 25 < windowSize.width + ? selfPos.dx + : windowSize.width - width - 25; + var selfRect = Rect.fromLTWH(selfPos.dx, selfPos.dy, selfSize.width, selfSize.height); + overlayRect = Rect.fromLTWH(left, top, width, height).expandToInclude(selfRect); + overlayEntry = OverlayEntry( + builder: (context) => Listener( + onPointerDown: (event) { + if (!overlayRect!.contains(event.position)) { + hasClickedOutside = true; + } + }, + onPointerUp: (event) { + if (hasClickedOutside && !overlayRect!.contains(event.position)) { + overlayEntry?.remove(); + overlayEntry = null; + setState(() {}); + } + hasClickedOutside = false; + }, + behavior: HitTestBehavior.translucent, + child: Stack( + children: [ + Positioned( + top: top, + left: left, + width: width, + height: height, + child: Material( + color: getTheme(context).sidebarBackgroundColor, + elevation: 8, + child: ColorPicker( + rgb: widget.prop, + showTextFields: !widget.showTextFields, ), ), - ); - } - ), - if (showTextFields) ...[ - const SizedBox(width: 10), - Flexible( - child: makePropEditor( - prop, - const VectorPropTFOptions( - chars: ["R", "G", "B"], - ) ), - ), - ], - ], + ], + ), + ) ); + Overlay.of(context).insert(overlayEntry!); + setState(() {}); } } diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 25cf60f9..fa9759a4 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include @@ -23,9 +23,9 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) flutter_window_close_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterWindowClosePlugin"); flutter_window_close_plugin_register_with_registrar(flutter_window_close_registrar); - g_autoptr(FlPluginRegistrar) screen_retriever_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin"); - screen_retriever_plugin_register_with_registrar(screen_retriever_registrar); + g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin"); + screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar); g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 3cfe2080..8f0139cc 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -6,7 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST audioplayers_linux desktop_drop flutter_window_close - screen_retriever + screen_retriever_linux url_launcher_linux window_manager ) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 3a7af7fa..082b029e 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -9,7 +9,7 @@ import audioplayers_darwin import desktop_drop import flutter_window_close import path_provider_foundation -import screen_retriever +import screen_retriever_macos import shared_preferences_foundation import url_launcher_macos import window_manager @@ -19,7 +19,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin")) FlutterWindowClosePlugin.register(with: registry.registrar(forPlugin: "FlutterWindowClosePlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin")) + ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin")) diff --git a/pubspec.lock b/pubspec.lock index f98389d3..712f9cf5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -29,58 +29,58 @@ packages: dependency: "direct main" description: name: audioplayers - sha256: c05c6147124cd63e725e861335a8b4d57300b80e6e92cea7c145c739223bbaef + sha256: c346ba5a39dc208f1bab55fc239855f573d69b0e832402114bf0b793622adc4d url: "https://pub.dev" source: hosted - version: "5.2.1" + version: "6.1.0" audioplayers_android: dependency: transitive description: name: audioplayers_android - sha256: b00e1a0e11365d88576320ec2d8c192bc21f1afb6c0e5995d1c57ae63156acb5 + sha256: de576b890befe27175c2f511ba8b742bec83765fa97c3ce4282bba46212f58e4 url: "https://pub.dev" source: hosted - version: "4.0.3" + version: "5.0.0" audioplayers_darwin: dependency: transitive description: name: audioplayers_darwin - sha256: "3034e99a6df8d101da0f5082dcca0a2a99db62ab1d4ddb3277bed3f6f81afe08" + sha256: e507887f3ff18d8e5a10a668d7bedc28206b12e10b98347797257c6ae1019c3b url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "6.0.0" audioplayers_linux: dependency: transitive description: name: audioplayers_linux - sha256: "60787e73fefc4d2e0b9c02c69885402177e818e4e27ef087074cf27c02246c9e" + sha256: "3d3d244c90436115417f170426ce768856d8fe4dfc5ed66a049d2890acfa82f9" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "4.0.0" audioplayers_platform_interface: dependency: transitive description: name: audioplayers_platform_interface - sha256: "365c547f1bb9e77d94dd1687903a668d8f7ac3409e48e6e6a3668a1ac2982adb" + sha256: "6834dd48dfb7bc6c2404998ebdd161f79cd3774a7e6779e1348d54a3bfdcfaa5" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "7.0.0" audioplayers_web: dependency: transitive description: name: audioplayers_web - sha256: "22cd0173e54d92bd9b2c80b1204eb1eb159ece87475ab58c9788a70ec43c2a62" + sha256: "3609bdf0e05e66a3d9750ee40b1e37f2a622c4edb796cc600b53a90a30a2ace4" url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "5.0.1" audioplayers_windows: dependency: transitive description: name: audioplayers_windows - sha256: "9536812c9103563644ada2ef45ae523806b0745f7a78e89d1b5fb1951de90e1a" + sha256: "8605762dddba992138d476f6a0c3afd9df30ac5b96039929063eceed416795c2" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "4.0.0" boolean_selector: dependency: transitive description: @@ -141,10 +141,10 @@ packages: dependency: "direct main" description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" crclib: dependency: "direct main" description: @@ -165,10 +165,10 @@ packages: dependency: transitive description: name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" csv: dependency: "direct main" description: @@ -181,10 +181,10 @@ packages: dependency: "direct main" description: name: desktop_drop - sha256: d55a010fe46c8e8fcff4ea4b451a9ff84a162217bdb3b2a0aa1479776205e15d + sha256: "03abf1c0443afdd1d65cf8fa589a2f01c67a11da56bbb06f6ea1de79d5628e94" url: "https://pub.dev" source: hosted - version: "0.4.4" + version: "0.5.0" dotted_border: dependency: "direct main" description: @@ -221,26 +221,26 @@ packages: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" file_picker: dependency: "direct main" description: name: file_picker - sha256: "1bbf65dd997458a08b531042ec3794112a6c39c07c37ff22113d2e7e4f81d4e4" + sha256: aac85f20436608e01a6ffd1fdd4e746a7f33c93a2c83752e626bdfaea139b877 url: "https://pub.dev" source: hosted - version: "6.2.1" + version: "8.1.3" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -258,26 +258,26 @@ packages: dependency: "direct main" description: name: flutter_launcher_icons - sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" + sha256: "619817c4b65b322b5104b6bb6dfe6cda62d9729bd7ad4303ecc8b4e690a67a77" url: "https://pub.dev" source: hosted - version: "0.13.1" + version: "0.14.1" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "5.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "9d98bd47ef9d34e803d438f17fd32b116d31009f534a6fa5ce3a1167f189a6de" + sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" url: "https://pub.dev" source: hosted - version: "2.0.21" + version: "2.0.23" flutter_test: dependency: "direct dev" description: flutter @@ -292,10 +292,10 @@ packages: dependency: "direct main" description: name: flutter_window_close - sha256: ed1cb3fb88dac6f5247252f05d25caef75300f1ad6f1332a8412bd5719026403 + sha256: bbdd1ec57259cbffc3f978c1709a3314a0991f042490d9d0a02c5fd70ac8dff6 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.2.0" fluttertoast: dependency: "direct main" description: @@ -332,18 +332,10 @@ packages: dependency: "direct main" description: name: image - sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" + sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d url: "https://pub.dev" source: hosted - version: "4.2.0" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" + version: "4.3.0" json_annotation: dependency: transitive description: @@ -356,18 +348,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -388,10 +380,10 @@ packages: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "5.0.0" matcher: dependency: transitive description: @@ -404,18 +396,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" mutex: dependency: "direct main" description: @@ -444,10 +436,10 @@ packages: dependency: transitive description: name: path_parsing - sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + sha256: "45f7d6bba1128761de5540f39d5ca000ea8a1f22f06b76b61094a60a2997bd0e" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" path_provider: dependency: transitive description: @@ -460,10 +452,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a url: "https://pub.dev" source: hosted - version: "2.2.10" + version: "2.2.12" path_provider_foundation: dependency: transitive description: @@ -508,10 +500,10 @@ packages: dependency: transitive description: name: permission_handler_android - sha256: "76e4ab092c1b240d31177bb64d2b0bea43f43d0e23541ec866151b9f7b2490fa" + sha256: "71bbecfee799e65aff7c744761a57e817e73b738fedf62ab7afd5593da21f9f1" url: "https://pub.dev" source: hosted - version: "12.0.12" + version: "12.0.13" permission_handler_apple: dependency: transitive description: @@ -524,18 +516,18 @@ packages: dependency: transitive description: name: permission_handler_html - sha256: d220eb8476b466d58b161e10b3001d93999010a26228a3fb89c4280db1249546 + sha256: af26edbbb1f2674af65a8f4b56e1a6f526156bc273d0e65dd8075fab51c78851 url: "https://pub.dev" source: hosted - version: "0.1.3+1" + version: "0.1.3+2" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: fe0ffe274d665be8e34f9c59705441a7d248edebbe5d9e3ec2665f88b79358ea + sha256: e9c8eadee926c4532d0305dff94b85bf961f16759c3af791486613152af4b4f9 url: "https://pub.dev" source: hosted - version: "4.2.2" + version: "4.2.3" permission_handler_windows: dependency: transitive description: @@ -556,10 +548,10 @@ packages: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: @@ -572,10 +564,42 @@ packages: dependency: transitive description: name: screen_retriever - sha256: "6ee02c8a1158e6dae7ca430da79436e3b1c9563c8cf02f524af997c201ac2b90" + sha256: "570dbc8e4f70bac451e0efc9c9bb19fa2d6799a11e6ef04f946d7886d2e23d0c" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_linux: + dependency: transitive + description: + name: screen_retriever_linux + sha256: f7f8120c92ef0784e58491ab664d01efda79a922b025ff286e29aa123ea3dd18 url: "https://pub.dev" source: hosted - version: "0.1.9" + version: "0.2.0" + screen_retriever_macos: + dependency: transitive + description: + name: screen_retriever_macos + sha256: "71f956e65c97315dd661d71f828708bd97b6d358e776f1a30d5aa7d22d78a149" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_platform_interface: + dependency: transitive + description: + name: screen_retriever_platform_interface + sha256: ee197f4581ff0d5608587819af40490748e1e39e648d7680ecf95c05197240c0 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_windows: + dependency: transitive + description: + name: screen_retriever_windows + sha256: "449ee257f03ca98a57288ee526a301a430a344a161f9202b4fcc38576716fe13" + url: "https://pub.dev" + source: hosted + version: "0.2.0" shared_preferences: dependency: "direct main" description: @@ -588,18 +612,18 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: a7e8467e9181cef109f601e3f65765685786c1a738a83d7fbbde377589c0d974 + sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.3" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f + sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d" url: "https://pub.dev" source: hosted - version: "2.5.2" + version: "2.5.3" shared_preferences_linux: dependency: transitive description: @@ -681,10 +705,10 @@ packages: dependency: transitive description: name: synchronized - sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" + sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" url: "https://pub.dev" source: hosted - version: "3.1.0+1" + version: "3.3.0+3" term_glyph: dependency: transitive description: @@ -697,10 +721,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" tuple: dependency: "direct main" description: @@ -713,26 +737,26 @@ packages: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" url_launcher: dependency: "direct main" description: name: url_launcher - sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + sha256: "0dea215895a4d254401730ca0ba8204b29109a34a99fb06ae559a2b60988d2de" url: "https://pub.dev" source: hosted - version: "6.3.9" + version: "6.3.13" url_launcher_ios: dependency: transitive description: @@ -753,10 +777,10 @@ packages: dependency: transitive description: name: url_launcher_macos - sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.1" url_launcher_platform_interface: dependency: transitive description: @@ -777,18 +801,18 @@ packages: dependency: transitive description: name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" uuid: dependency: "direct main" description: name: uuid - sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "4.4.2" + version: "4.5.1" vector_math: dependency: transitive description: @@ -801,18 +825,18 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.5" web: dependency: transitive description: name: web - sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" webview_windows: dependency: "direct main" description: @@ -826,26 +850,26 @@ packages: dependency: transitive description: name: win32 - sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + sha256: e1d0cc62e65dc2561f5071fcbccecf58ff20c344f8f3dc7d4922df372a11df1f url: "https://pub.dev" source: hosted - version: "5.5.4" + version: "5.7.1" window_manager: dependency: "direct main" description: name: window_manager - sha256: "8699323b30da4cdbe2aa2e7c9de567a6abd8a97d9a5c850a3c86dcd0b34bbfbf" + sha256: "732896e1416297c63c9e3fb95aea72d0355f61390263982a47fd519169dc5059" url: "https://pub.dev" source: hosted - version: "0.3.9" + version: "0.4.3" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: "direct main" description: @@ -863,5 +887,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index a122bfe8..92d0491a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,21 +11,21 @@ environment: dependencies: archive: ^3.4.9 - audioplayers: ^5.2.1 + audioplayers: ^6.1.0 code_text_field: ^1.1.0 convert: ^3.1.1 crclib: ^3.0.0 cross_file: ^0.3.3+1 csv: ^6.0.0 - desktop_drop: ^0.4.4 + desktop_drop: ^0.5.0 dotted_border: ^2.1.0 euc: ^1.0.6+8 - file_picker: ^6.1.1 + file_picker: ^8.1.3 flutter: sdk: flutter flutter_highlight: ^0.7.0 - flutter_launcher_icons: ^0.13.1 + flutter_launcher_icons: ^0.14.1 flutter_window_close: ^1.0.0 fluttertoast: ^8.2.4 highlight: ^0.7.0 @@ -42,14 +42,14 @@ dependencies: git: url: https://github.com/Channing-dong/flutter-webview-windows ref: 999601052534f30fb50045819ef3813dbb04b9b8 - window_manager: ^0.3.7 + window_manager: ^0.4.3 xml: ^6.3.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^5.0.0 flutter: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 7138ebf5..98770a59 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -24,8 +24,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("FlutterWindowClosePlugin")); PermissionHandlerWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); - ScreenRetrieverPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ScreenRetrieverPlugin")); + ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); WebviewWindowsPluginRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index ed0217d1..918a81af 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -7,7 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST desktop_drop flutter_window_close permission_handler_windows - screen_retriever + screen_retriever_windows url_launcher_windows webview_windows window_manager