System begin share

This commit is contained in:
LittleSheep 2025-06-25 15:58:58 +08:00
parent b275b8328d
commit 434256e61e
8 changed files with 219 additions and 164 deletions

View File

@ -560,5 +560,6 @@
"failedToCopy": "Failed to copy: {}", "failedToCopy": "Failed to copy: {}",
"noChatRoomsAvailable": "No chat rooms available", "noChatRoomsAvailable": "No chat rooms available",
"failedToLoadChats": "Failed to load chats", "failedToLoadChats": "Failed to load chats",
"contentToShare": "Content to share:",
"unknownChat": "Unknown Chat" "unknownChat": "Unknown Chat"
} }

View File

@ -1,15 +1,17 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:island/widgets/alert.dart';
import 'package:island/widgets/content/sheet.dart'; import 'package:island/widgets/content/sheet.dart';
import 'package:material_symbols_icons/symbols.dart'; import 'package:material_symbols_icons/symbols.dart';
import 'package:cross_file/cross_file.dart';
import 'dart:io'; import 'dart:io';
import 'package:path/path.dart' as path; import 'package:path/path.dart' as path;
import 'package:island/models/chat.dart'; import 'package:island/models/chat.dart';
import 'package:island/screens/chat/chat.dart'; import 'package:island/screens/chat/chat.dart';
import 'package:island/widgets/content/cloud_files.dart'; import 'package:island/widgets/content/cloud_files.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:share_plus/share_plus.dart';
enum ShareContentType { text, link, file } enum ShareContentType { text, link, file }
@ -125,15 +127,9 @@ class _ShareSheetState extends ConsumerState<ShareSheet> {
try { try {
// TODO: Implement share to post functionality // TODO: Implement share to post functionality
// This would typically navigate to the post composer with pre-filled content // This would typically navigate to the post composer with pre-filled content
ScaffoldMessenger.of(context).showSnackBar( showSnackBar(context, 'Share to post functionality coming soon');
const SnackBar(
content: Text('Share to post functionality coming soon'),
),
);
} catch (e) { } catch (e) {
ScaffoldMessenger.of( showErrorAlert(e);
context,
).showSnackBar(SnackBar(content: Text('failedToShareToPost'.tr(args: [e.toString()]))));
} finally { } finally {
setState(() => _isLoading = false); setState(() => _isLoading = false);
} }
@ -141,18 +137,8 @@ class _ShareSheetState extends ConsumerState<ShareSheet> {
Future<void> _shareToChat() async { Future<void> _shareToChat() async {
setState(() => _isLoading = true); setState(() => _isLoading = true);
try { try {} catch (e) {
// TODO: Implement share to chat functionality showErrorAlert(e);
// This would typically show a chat selection dialog
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('shareToChatComingSoon'.tr()),
),
);
} catch (e) {
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text('failedToShareToChat'.tr(args: [e.toString()]))));
} finally { } finally {
setState(() => _isLoading = false); setState(() => _isLoading = false);
} }
@ -161,11 +147,13 @@ class _ShareSheetState extends ConsumerState<ShareSheet> {
Future<void> _shareToSpecificChat(SnChatRoom chatRoom) async { Future<void> _shareToSpecificChat(SnChatRoom chatRoom) async {
setState(() => _isLoading = true); setState(() => _isLoading = true);
try { try {
// TODO: Implement share to specific chat functionality
// This would send the content to the selected chat room
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(context).showSnackBar(
SnackBar( SnackBar(
content: Text('shareToSpecificChatComingSoon'.tr(args: [chatRoom.name ?? 'directChat'.tr()])), content: Text(
'shareToSpecificChatComingSoon'.tr(
args: [chatRoom.name ?? 'directChat'.tr()],
),
),
), ),
); );
} catch (e) { } catch (e) {
@ -182,17 +170,29 @@ class _ShareSheetState extends ConsumerState<ShareSheet> {
setState(() => _isLoading = true); setState(() => _isLoading = true);
try { try {
// TODO: Implement system share functionality switch (widget.content.type) {
// This would use platform-specific sharing APIs case ShareContentType.text:
ScaffoldMessenger.of(context).showSnackBar( if (widget.content.text?.isNotEmpty == true) {
SnackBar(content: Text('systemShareComingSoon'.tr())), await Share.share(widget.content.text!);
); }
break;
case ShareContentType.link:
if (widget.content.link?.isNotEmpty == true) {
await Share.share(widget.content.link!);
}
break;
case ShareContentType.file:
if (widget.content.files?.isNotEmpty == true) {
await Share.shareXFiles(widget.content.files!);
}
break;
}
} catch (e) { } catch (e) {
ScaffoldMessenger.of( showErrorAlert(e);
context,
).showSnackBar(SnackBar(content: Text('failedToShareToSystem'.tr(args: [e.toString()]))));
} finally { } finally {
setState(() => _isLoading = false); if (mounted) {
setState(() => _isLoading = false);
}
} }
} }
@ -213,13 +213,9 @@ class _ShareSheetState extends ConsumerState<ShareSheet> {
} }
await Clipboard.setData(ClipboardData(text: textToCopy)); await Clipboard.setData(ClipboardData(text: textToCopy));
ScaffoldMessenger.of( if (mounted) showSnackBar(context, 'copyToClipboard'.tr());
context,
).showSnackBar(SnackBar(content: Text('copyToClipboard'.tr())));
} catch (e) { } catch (e) {
ScaffoldMessenger.of( showErrorAlert(e);
context,
).showSnackBar(SnackBar(content: Text('failedToCopy'.tr(args: [e.toString()]))));
} }
} }
@ -227,6 +223,7 @@ class _ShareSheetState extends ConsumerState<ShareSheet> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SheetScaffold( return SheetScaffold(
titleText: widget.title ?? 'share'.tr(), titleText: widget.title ?? 'share'.tr(),
heightFactor: 0.75,
child: Column( child: Column(
children: [ children: [
// Content preview // Content preview
@ -241,7 +238,7 @@ class _ShareSheetState extends ConsumerState<ShareSheet> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
'Content to share:', 'contentToShare'.tr(),
style: Theme.of(context).textTheme.labelMedium?.copyWith( style: Theme.of(context).textTheme.labelMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant, color: Theme.of(context).colorScheme.onSurfaceVariant,
), ),
@ -254,77 +251,86 @@ class _ShareSheetState extends ConsumerState<ShareSheet> {
// Share options // Share options
Expanded( Expanded(
child: Column( child: SingleChildScrollView(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
// Quick actions row (horizontally scrollable) children: [
Padding( // Quick actions row (horizontally scrollable)
padding: const EdgeInsets.symmetric(horizontal: 16), Padding(
child: Column( padding: const EdgeInsets.symmetric(horizontal: 16),
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Text( children: [
'quickActions'.tr(), Text(
style: Theme.of(context).textTheme.titleSmall?.copyWith( 'quickActions'.tr(),
color: Theme.of(context).colorScheme.onSurfaceVariant, style: Theme.of(
context,
).textTheme.titleSmall?.copyWith(
color:
Theme.of(context).colorScheme.onSurfaceVariant,
),
), ),
), const SizedBox(height: 12),
const SizedBox(height: 12), SizedBox(
SizedBox( height: 80,
height: 80, child: ListView(
child: ListView( scrollDirection: Axis.horizontal,
scrollDirection: Axis.horizontal, children: [
children: [ _CompactShareOption(
_CompactShareOption( icon: Symbols.post_add,
icon: Symbols.post_add, title: 'post'.tr(),
title: 'post'.tr(), onTap: _isLoading ? null : _shareToPost,
onTap: _isLoading ? null : _shareToPost, ),
),
const SizedBox(width: 12),
_CompactShareOption(
icon: Symbols.content_copy,
title: 'copy'.tr(),
onTap: _isLoading ? null : _copyToClipboard,
),
if (widget.toSystem) ...<Widget>[
const SizedBox(width: 12), const SizedBox(width: 12),
_CompactShareOption( _CompactShareOption(
icon: Symbols.share, icon: Symbols.content_copy,
title: 'share'.tr(), title: 'copy'.tr(),
onTap: _isLoading ? null : _shareToSystem, onTap: _isLoading ? null : _copyToClipboard,
), ),
if (widget.toSystem) ...<Widget>[
const SizedBox(width: 12),
_CompactShareOption(
icon: Symbols.share,
title: 'share'.tr(),
onTap: _isLoading ? null : _shareToSystem,
),
],
], ],
], ),
), ),
), ],
], ),
), ),
),
const SizedBox(height: 24), const SizedBox(height: 24),
// Chat section // Chat section
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
'sendToChat'.tr(), 'sendToChat'.tr(),
style: Theme.of(context).textTheme.titleSmall?.copyWith( style: Theme.of(
color: Theme.of(context).colorScheme.onSurfaceVariant, context,
).textTheme.titleSmall?.copyWith(
color:
Theme.of(context).colorScheme.onSurfaceVariant,
),
), ),
), const SizedBox(height: 12),
const SizedBox(height: 12), _ChatRoomsList(
_ChatRoomsList( onChatSelected:
onChatSelected: _isLoading ? null : _shareToSpecificChat, _isLoading ? null : _shareToSpecificChat,
), ),
], ],
),
), ),
),
const SizedBox(height: 16), const SizedBox(height: 16),
], ],
),
), ),
), ),
@ -382,36 +388,39 @@ class _ChatRoomsList extends ConsumerWidget {
final room = rooms[index]; final room = rooms[index];
return _ChatRoomOption( return _ChatRoomOption(
room: room, room: room,
onTap: onChatSelected != null ? () => onChatSelected!(room) : null, onTap:
onChatSelected != null ? () => onChatSelected!(room) : null,
); );
}, },
), ),
); );
}, },
loading: () => SizedBox( loading:
height: 80, () => SizedBox(
child: Center( height: 80,
child: CircularProgressIndicator( child: Center(
strokeWidth: 2, child: CircularProgressIndicator(
color: Theme.of(context).colorScheme.primary, strokeWidth: 2,
), color: Theme.of(context).colorScheme.primary,
), ),
), ),
error: (error, stack) => Container( ),
height: 80, error:
decoration: BoxDecoration( (error, stack) => Container(
color: Theme.of(context).colorScheme.errorContainer, height: 80,
borderRadius: BorderRadius.circular(12), decoration: BoxDecoration(
), color: Theme.of(context).colorScheme.errorContainer,
child: Center( borderRadius: BorderRadius.circular(12),
child: Text( ),
'failedToLoadChats'.tr(), child: Center(
style: Theme.of(context).textTheme.bodyMedium?.copyWith( child: Text(
color: Theme.of(context).colorScheme.onErrorContainer, 'failedToLoadChats'.tr(),
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.onErrorContainer,
),
),
), ),
), ),
),
),
); );
} }
} }
@ -420,15 +429,13 @@ class _ChatRoomOption extends StatelessWidget {
final SnChatRoom room; final SnChatRoom room;
final VoidCallback? onTap; final VoidCallback? onTap;
const _ChatRoomOption({ const _ChatRoomOption({required this.room, this.onTap});
required this.room,
this.onTap,
});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final isDirect = room.type == 1; // Assuming type 1 is direct chat final isDirect = room.type == 1; // Assuming type 1 is direct chat
final displayName = room.name ?? final displayName =
room.name ??
(isDirect && room.members != null (isDirect && room.members != null
? room.members!.map((m) => m.account.nick).join(', ') ? room.members!.map((m) => m.account.nick).join(', ')
: 'unknownChat'.tr()); : 'unknownChat'.tr());
@ -439,9 +446,12 @@ class _ChatRoomOption extends StatelessWidget {
width: 72, width: 72,
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: onTap != null color:
? Theme.of(context).colorScheme.surfaceContainerHighest onTap != null
: Theme.of(context).colorScheme.surfaceContainerHighest.withOpacity(0.5), ? Theme.of(context).colorScheme.surfaceContainerHighest
: Theme.of(
context,
).colorScheme.surfaceContainerHighest.withOpacity(0.5),
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
border: Border.all( border: Border.all(
color: Theme.of(context).colorScheme.outline.withOpacity(0.2), color: Theme.of(context).colorScheme.outline.withOpacity(0.2),
@ -458,28 +468,32 @@ class _ChatRoomOption extends StatelessWidget {
color: Theme.of(context).colorScheme.primary.withOpacity(0.1), color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
), ),
child: room.picture != null child:
? ClipRRect( room.picture != null
borderRadius: BorderRadius.circular(16), ? ClipRRect(
child: CloudFileWidget( borderRadius: BorderRadius.circular(16),
item: room.picture!, child: CloudFileWidget(
fit: BoxFit.cover, item: room.picture!,
), fit: BoxFit.cover,
) ),
: Icon( )
isDirect ? Symbols.person : Symbols.group, : Icon(
size: 20, isDirect ? Symbols.person : Symbols.group,
color: Theme.of(context).colorScheme.primary, size: 20,
), color: Theme.of(context).colorScheme.primary,
),
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
// Chat room name // Chat room name
Text( Text(
displayName, displayName,
style: Theme.of(context).textTheme.labelSmall?.copyWith( style: Theme.of(context).textTheme.labelSmall?.copyWith(
color: onTap != null color:
? Theme.of(context).colorScheme.onSurface onTap != null
: Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.5), ? Theme.of(context).colorScheme.onSurface
: Theme.of(
context,
).colorScheme.onSurfaceVariant.withOpacity(0.5),
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
maxLines: 1, maxLines: 1,
@ -511,9 +525,12 @@ class _CompactShareOption extends StatelessWidget {
width: 72, width: 72,
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: onTap != null color:
? Theme.of(context).colorScheme.surfaceContainerHighest onTap != null
: Theme.of(context).colorScheme.surfaceContainerHighest.withOpacity(0.5), ? Theme.of(context).colorScheme.surfaceContainerHighest
: Theme.of(
context,
).colorScheme.surfaceContainerHighest.withOpacity(0.5),
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
border: Border.all( border: Border.all(
color: Theme.of(context).colorScheme.outline.withOpacity(0.2), color: Theme.of(context).colorScheme.outline.withOpacity(0.2),
@ -525,17 +542,23 @@ class _CompactShareOption extends StatelessWidget {
Icon( Icon(
icon, icon,
size: 24, size: 24,
color: onTap != null color:
? Theme.of(context).colorScheme.primary onTap != null
: Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.5), ? Theme.of(context).colorScheme.primary
: Theme.of(
context,
).colorScheme.onSurfaceVariant.withOpacity(0.5),
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Text(
title, title,
style: Theme.of(context).textTheme.labelSmall?.copyWith( style: Theme.of(context).textTheme.labelSmall?.copyWith(
color: onTap != null color:
? Theme.of(context).colorScheme.onSurface onTap != null
: Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.5), ? Theme.of(context).colorScheme.onSurface
: Theme.of(
context,
).colorScheme.onSurfaceVariant.withOpacity(0.5),
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
maxLines: 1, maxLines: 1,
@ -623,6 +646,8 @@ class _ContentPreview extends StatelessWidget {
} }
} }
const double kPreviewMaxHeight = 80;
class _TextPreview extends StatelessWidget { class _TextPreview extends StatelessWidget {
final String text; final String text;
@ -631,7 +656,7 @@ class _TextPreview extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
constraints: const BoxConstraints(maxHeight: 120), constraints: const BoxConstraints(maxHeight: kPreviewMaxHeight),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Text(text, style: Theme.of(context).textTheme.bodyMedium), child: Text(text, style: Theme.of(context).textTheme.bodyMedium),
), ),
@ -647,7 +672,7 @@ class _LinkPreview extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
constraints: const BoxConstraints(maxHeight: 120), constraints: const BoxConstraints(maxHeight: kPreviewMaxHeight),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -730,7 +755,7 @@ class _FilePreview extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
constraints: const BoxConstraints(maxHeight: 200), constraints: const BoxConstraints(maxHeight: kPreviewMaxHeight),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [

View File

@ -27,6 +27,7 @@ import package_info_plus
import pasteboard import pasteboard
import path_provider_foundation import path_provider_foundation
import record_macos import record_macos
import share_plus
import shared_preferences_foundation import shared_preferences_foundation
import sign_in_with_apple import sign_in_with_apple
import sqflite_darwin import sqflite_darwin
@ -59,6 +60,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin")) PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
RecordMacOsPlugin.register(with: registry.registrar(forPlugin: "RecordMacOsPlugin")) RecordMacOsPlugin.register(with: registry.registrar(forPlugin: "RecordMacOsPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin")) SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))

View File

@ -118,6 +118,8 @@ PODS:
- record_macos (1.0.0): - record_macos (1.0.0):
- FlutterMacOS - FlutterMacOS
- SAMKeychain (1.5.3) - SAMKeychain (1.5.3)
- share_plus (0.0.1):
- FlutterMacOS
- shared_preferences_foundation (0.0.1): - shared_preferences_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
@ -183,6 +185,7 @@ DEPENDENCIES:
- pasteboard (from `Flutter/ephemeral/.symlinks/plugins/pasteboard/macos`) - pasteboard (from `Flutter/ephemeral/.symlinks/plugins/pasteboard/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- record_macos (from `Flutter/ephemeral/.symlinks/plugins/record_macos/macos`) - record_macos (from `Flutter/ephemeral/.symlinks/plugins/record_macos/macos`)
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
- sign_in_with_apple (from `Flutter/ephemeral/.symlinks/plugins/sign_in_with_apple/macos`) - sign_in_with_apple (from `Flutter/ephemeral/.symlinks/plugins/sign_in_with_apple/macos`)
- sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`) - sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`)
@ -257,6 +260,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
record_macos: record_macos:
:path: Flutter/ephemeral/.symlinks/plugins/record_macos/macos :path: Flutter/ephemeral/.symlinks/plugins/record_macos/macos
share_plus:
:path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
shared_preferences_foundation: shared_preferences_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
sign_in_with_apple: sign_in_with_apple:
@ -310,6 +315,7 @@ SPEC CHECKSUMS:
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
record_macos: 295d70bd5fb47145df78df7b80e6697cd18403c0 record_macos: 295d70bd5fb47145df78df7b80e6697cd18403c0
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
share_plus: 510bf0af1a42cd602274b4629920c9649c52f4cc
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
sign_in_with_apple: 6673c03c9e3643f6c8d33601943fbfa9ae99f94e sign_in_with_apple: 6673c03c9e3643f6c8d33601943fbfa9ae99f94e
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0 sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0

View File

@ -1841,10 +1841,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: screen_brightness_android name: screen_brightness_android
sha256: "6ba1b5812f66c64e9e4892be2d36ecd34210f4e0da8bdec6a2ea34f1aa42683e" sha256: fb5fa43cb89d0c9b8534556c427db1e97e46594ac5d66ebdcf16063b773d54ed
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
screen_brightness_platform_interface: screen_brightness_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -1869,6 +1869,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.3.2" version: "0.3.2"
share_plus:
dependency: "direct main"
description:
name: share_plus
sha256: b2961506569e28948d75ec346c28775bb111986bb69dc6a20754a457e3d97fa0
url: "https://pub.dev"
source: hosted
version: "11.0.0"
share_plus_platform_interface:
dependency: transitive
description:
name: share_plus_platform_interface
sha256: "1032d392bc5d2095a77447a805aa3f804d2ae6a4d5eef5e6ebb3bd94c1bc19ef"
url: "https://pub.dev"
source: hosted
version: "6.0.0"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -119,6 +119,7 @@ dependencies:
local_auth: ^2.3.0 local_auth: ^2.3.0
flutter_secure_storage: ^4.2.1 flutter_secure_storage: ^4.2.1
flutter_math_fork: ^0.7.4 flutter_math_fork: ^0.7.4
share_plus: ^11.0.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

View File

@ -23,6 +23,7 @@
#include <media_kit_video/media_kit_video_plugin_c_api.h> #include <media_kit_video/media_kit_video_plugin_c_api.h>
#include <pasteboard/pasteboard_plugin.h> #include <pasteboard/pasteboard_plugin.h>
#include <record_windows/record_windows_plugin_c_api.h> #include <record_windows/record_windows_plugin_c_api.h>
#include <share_plus/share_plus_windows_plugin_c_api.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h> #include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
#include <super_native_extensions/super_native_extensions_plugin_c_api.h> #include <super_native_extensions/super_native_extensions_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h> #include <url_launcher_windows/url_launcher_windows.h>
@ -63,6 +64,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("PasteboardPlugin")); registry->GetRegistrarForPlugin("PasteboardPlugin"));
RecordWindowsPluginCApiRegisterWithRegistrar( RecordWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("RecordWindowsPluginCApi")); registry->GetRegistrarForPlugin("RecordWindowsPluginCApi"));
SharePlusWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
Sqlite3FlutterLibsPluginRegisterWithRegistrar( Sqlite3FlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin")); registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin"));
SuperNativeExtensionsPluginCApiRegisterWithRegistrar( SuperNativeExtensionsPluginCApiRegisterWithRegistrar(

View File

@ -20,6 +20,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
media_kit_video media_kit_video
pasteboard pasteboard
record_windows record_windows
share_plus
sqlite3_flutter_libs sqlite3_flutter_libs
super_native_extensions super_native_extensions
url_launcher_windows url_launcher_windows