diff --git a/README.md b/README.md index b9121bd..a5b4f2f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ ![sane_gallery logo](android/app/src/main/res/drawable-mdpi/android12splash.png) -

SaneGallery

+

saneGallery

-Sane**Gallery** is the Flutter reimplementation of [gallereasy](https://github.com/hoangph271/gallereasy), a web app for searching & saving GIFs. +sane**Gallery** is the Flutter reimplementation of [gallereasy](https://github.com/hoangph271/gallereasy), a web app for searching & saving GIFs. ## Deployed Web Version -Check out the live version of [SaneGallery on the Web.](https://sane-gallery.netlify.app/) +Check out the live version of [**saneGallery** on the Web.](https://sane-gallery.netlify.app/) ## Android Build diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e156d72..ea4e08b 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ ) +#import +#else +@import file_saver; +#endif + #if __has_include() #import #else @import flutter_native_splash; #endif +#if __has_include() +#import +#else +@import image_picker_ios; +#endif + #if __has_include() #import #else @import path_provider_foundation; #endif +#if __has_include() +#import +#else +@import share_plus; +#endif + #if __has_include() #import #else @@ -33,8 +51,11 @@ @implementation GeneratedPluginRegistrant + (void)registerWithRegistry:(NSObject*)registry { + [FileSaverPlugin registerWithRegistrar:[registry registrarForPlugin:@"FileSaverPlugin"]]; [FlutterNativeSplashPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterNativeSplashPlugin"]]; + [FLTImagePickerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTImagePickerPlugin"]]; [PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]]; + [FPPSharePlusPlugin registerWithRegistrar:[registry registrarForPlugin:@"FPPSharePlusPlugin"]]; [SharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"SharedPreferencesPlugin"]]; [SqflitePlugin registerWithRegistrar:[registry registrarForPlugin:@"SqflitePlugin"]]; } diff --git a/lib/src/magic_toolbox/magic_toolbox.dart b/lib/src/magic_toolbox/magic_toolbox.dart index 2e515ed..ca53240 100644 --- a/lib/src/magic_toolbox/magic_toolbox.dart +++ b/lib/src/magic_toolbox/magic_toolbox.dart @@ -1,4 +1,14 @@ +import 'dart:typed_data'; +import 'package:file_saver/file_saver.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:sane_gallery/src/widgets/fancy_elevated_button.dart'; +import 'package:sane_gallery/src/widgets/instax_card.dart'; +import 'package:sane_gallery/src/widgets/mobile_only_widget.dart'; +import 'package:sane_gallery/src/widgets/sane_padding.dart'; +import 'package:share_plus/share_plus.dart'; +import 'package:widgets_to_image/widgets_to_image.dart'; class MagicToolbox extends StatefulWidget { static const pathName = '/magic-toolbox'; @@ -10,12 +20,110 @@ class MagicToolbox extends StatefulWidget { } class _MagicToolboxState extends State { + Future? _imageBytes; + final widgetsToImageController = WidgetsToImageController(); + @override Widget build(BuildContext context) { - return const SafeArea( + return SafeArea( child: Scaffold( - body: Center(child: Text('Magic Toolbox')), + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.only(bottom: 16.0), + child: FancyElevatedButton( + label: const Text( + 'Instax Printer...!', + style: TextStyle(fontStyle: FontStyle.italic), + ), + onPressed: () async { + final ImagePicker picker = ImagePicker(); + final image = + await picker.pickImage(source: ImageSource.gallery); + + if (image != null) { + setState(() { + _imageBytes = image.readAsBytes(); + }); + } + }, + icon: const Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.add_a_photo), + ), + ), + ), + if (_imageBytes != null) + FutureBuilder( + future: _imageBytes, + builder: (context, snapshot) { + if (snapshot.hasData) { + final bytes = snapshot.data as Uint8List; + + return Column( + children: [ + WidgetsToImage( + controller: widgetsToImageController, + child: SizedBox( + width: 300, + height: 300, + child: + InstaxCard(imageProvider: MemoryImage(bytes)), + ), + ), + SanePadding( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton.outlined( + onPressed: _saveInstaxPng, + icon: const Icon(Icons.download_sharp), + ), + const SizedBox(width: 16), + MobileOnlyWidget( + child: IconButton.outlined( + icon: const Icon(Icons.share), + onPressed: () async { + final bytes = await widgetsToImageController + .capture(); + + Share.shareXFiles([ + XFile.fromData( + bytes!, + name: + 'saneGallery ${DateTime.now().toIso8601String()}.png', + mimeType: 'image/png', + ), + ]); + }, + )), + ], + ), + ), + ], + ); + } else { + return const CircularProgressIndicator(); + } + }) + ], + )), ), ); } + + void _saveInstaxPng() async { + final bytes = await widgetsToImageController.capture(); + + final res = await FileSaver.instance.saveFile( + name: 'saneGallery ${DateTime.now().toIso8601String()}', + bytes: bytes!, + mimeType: MimeType.png, + ext: 'png', + ); + + print(res); + } } diff --git a/lib/src/settings/settings_view.dart b/lib/src/settings/settings_view.dart index 1876bc2..6870ddc 100644 --- a/lib/src/settings/settings_view.dart +++ b/lib/src/settings/settings_view.dart @@ -4,6 +4,7 @@ import 'package:go_router/go_router.dart'; import 'package:sane_gallery/src/magic_toolbox/magic_toolbox.dart'; import 'package:sane_gallery/src/settings/settings_controller.dart'; +import 'package:sane_gallery/src/widgets/fancy_elevated_button.dart'; import 'package:sane_gallery/src/widgets/sane_padding.dart'; import 'package:sane_gallery/src/widgets/toggle_theme_buttons.dart'; @@ -72,36 +73,17 @@ class SettingsView extends StatelessWidget { ), SanePadding( child: UnconstrainedBox( - child: ElevatedButton( - style: ButtonStyle( - shape: MaterialStateProperty.all( - const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(0), - topRight: Radius.circular(8.0), - bottomLeft: Radius.circular(8.0), - bottomRight: Radius.circular(0), - ), - ), - ), - ), + child: FancyElevatedButton( + label: const Text('Magic Toolbox'), onPressed: () { context.go(MagicToolbox.pathName); }, - child: Padding( - padding: const EdgeInsets.only(top: 12, bottom: 12), - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.center, - spacing: 8, - children: [ - const Text('Magic Toolbox'), - SvgPicture.asset('assets/svg/magic-wand.svg', - width: 16, - height: 16, - colorFilter: ColorFilter.mode( - Theme.of(context).primaryColor, BlendMode.srcIn)), - ], - ), + icon: SvgPicture.asset( + 'assets/svg/magic-wand.svg', + width: 24, + height: 24, + colorFilter: ColorFilter.mode( + Theme.of(context).primaryColor, BlendMode.srcIn), ), ), )), diff --git a/lib/src/shared/platform_checks.dart b/lib/src/shared/platform_checks.dart new file mode 100644 index 0000000..488871a --- /dev/null +++ b/lib/src/shared/platform_checks.dart @@ -0,0 +1,3 @@ +import 'dart:io'; + +final bool isMobile = Platform.isAndroid || Platform.isIOS; diff --git a/lib/src/widgets/fancy_elevated_button.dart b/lib/src/widgets/fancy_elevated_button.dart new file mode 100644 index 0000000..e36875b --- /dev/null +++ b/lib/src/widgets/fancy_elevated_button.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; + +class FancyElevatedButton extends StatelessWidget { + final void Function()? onPressed; + final Widget? icon; + final Widget? label; + + const FancyElevatedButton({ + super.key, + required this.onPressed, + required this.icon, + required this.label, + }); + + @override + Widget build(BuildContext context) { + return ElevatedButton.icon( + onPressed: onPressed, + label: Padding( + padding: const EdgeInsets.only(top: 12, bottom: 12, left: 8), + child: label, + ), + icon: Padding( + padding: const EdgeInsets.only(left: 8.0), + child: icon, + ), + style: ButtonStyle( + shape: MaterialStateProperty.all( + const RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(0), + topRight: Radius.circular(8.0), + bottomLeft: Radius.circular(8.0), + bottomRight: Radius.circular(0), + ), + ), + ), + ), + ); + } +} diff --git a/lib/src/widgets/instax_card.dart b/lib/src/widgets/instax_card.dart index e91bf0f..aa81958 100644 --- a/lib/src/widgets/instax_card.dart +++ b/lib/src/widgets/instax_card.dart @@ -13,7 +13,7 @@ class InstaxCard extends StatelessWidget { return Align( alignment: Alignment.center, child: RotatedBox( - // TODO: calculate quarterTurns based on image orientation + // FIXME: calculate quarterTurns based on image orientation quarterTurns: 0, child: AspectRatio( aspectRatio: 2.1 / 3.4, @@ -36,6 +36,18 @@ class InstaxCard extends StatelessWidget { aspectRatio: 1.8 / 2.4, child: Container( decoration: BoxDecoration( + border: Border.all( + color: Theme.of(context).shadowColor.withAlpha(25), + width: 1, + ), + boxShadow: [ + BoxShadow( + color: Theme.of(context).shadowColor.withAlpha(125), + blurRadius: 4, + spreadRadius: -4, + offset: const Offset(0, 4), + ), + ], image: DecorationImage( image: imageProvider, fit: BoxFit.cover, diff --git a/lib/src/widgets/mobile_only_widget.dart b/lib/src/widgets/mobile_only_widget.dart new file mode 100644 index 0000000..2fdc8d4 --- /dev/null +++ b/lib/src/widgets/mobile_only_widget.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; +import 'package:sane_gallery/src/shared/platform_checks.dart'; + +class MobileOnlyWidget extends StatelessWidget { + final Widget child; + + const MobileOnlyWidget({super.key, required this.child}); + + @override + Widget build(BuildContext context) { + return isMobile ? child : const SizedBox.shrink(); + } +} diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index e71a16d..e1e2dbb 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,18 @@ #include "generated_plugin_registrant.h" +#include +#include +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) file_saver_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FileSaverPlugin"); + file_saver_plugin_register_with_registrar(file_saver_registrar); + g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); + file_selector_plugin_register_with_registrar(file_selector_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 2e1de87..03c564f 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,6 +3,9 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_saver + file_selector_linux + url_launcher_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index eefcc6d..e4fa25e 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,12 +5,18 @@ import FlutterMacOS import Foundation +import file_saver +import file_selector_macos import path_provider_foundation +import share_plus import shared_preferences_foundation import sqflite func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FileSaverPlugin.register(with: registry.registrar(forPlugin: "FileSaverPlugin")) + FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) } diff --git a/macos/Podfile.lock b/macos/Podfile.lock index fab3021..6c3168f 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -1,4 +1,8 @@ PODS: + - file_saver (0.0.1): + - FlutterMacOS + - file_selector_macos (0.0.1): + - FlutterMacOS - FlutterMacOS (1.0.0) - FMDB (2.7.5): - FMDB/standard (= 2.7.5) @@ -14,6 +18,8 @@ PODS: - FMDB (>= 2.7.5) DEPENDENCIES: + - file_saver (from `Flutter/ephemeral/.symlinks/plugins/file_saver/macos`) + - file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`) - FlutterMacOS (from `Flutter/ephemeral`) - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) @@ -24,6 +30,10 @@ SPEC REPOS: - FMDB EXTERNAL SOURCES: + file_saver: + :path: Flutter/ephemeral/.symlinks/plugins/file_saver/macos + file_selector_macos: + :path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos FlutterMacOS: :path: Flutter/ephemeral path_provider_foundation: @@ -34,6 +44,8 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/sqflite/macos SPEC CHECKSUMS: + file_saver: 44e6fbf666677faf097302460e214e977fdd977b + file_selector_macos: 468fb6b81fac7c0e88d71317f3eec34c3b008ff9 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index 08c3ab1..7b21413 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -10,5 +10,9 @@ com.apple.security.network.client + com.apple.security.files.user-selected.read-only + + com.apple.security.files.downloads.read-write + diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index ee95ab7..0989529 100644 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -6,5 +6,9 @@ com.apple.security.network.client + com.apple.security.files.user-selected.read-only + + com.apple.security.files.downloads.read-write + diff --git a/pubspec.lock b/pubspec.lock index e3faeb1..9e072d8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -113,6 +113,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + url: "https://pub.dev" + source: hosted + version: "0.3.3+8" crypto: dependency: transitive description: @@ -153,6 +161,46 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" + file_saver: + dependency: "direct main" + description: + name: file_saver + sha256: "8ffd91ae9f543c5ebbfec71a814ee5aa9e21176d31335133308abf63f4c42e8a" + url: "https://pub.dev" + source: hosted + version: "0.2.9" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + url: "https://pub.dev" + source: hosted + version: "0.9.2+1" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6 + url: "https://pub.dev" + source: hosted + version: "0.9.3+3" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 + url: "https://pub.dev" + source: hosted + version: "0.9.3+1" flip_card: dependency: "direct main" description: @@ -203,6 +251,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.8" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da + url: "https://pub.dev" + source: hosted + version: "2.0.17" flutter_staggered_grid_view: dependency: transitive description: @@ -269,6 +325,70 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.3" + image_picker: + dependency: "direct main" + description: + name: image_picker + sha256: "26222b01a0c9a2c8fe02fc90b8208bd3325da5ed1f4a2acabf75939031ac0bdd" + url: "https://pub.dev" + source: hosted + version: "1.0.7" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "1a27bf4cc0330389cebe465bab08fe6dec97e44015b4899637344bb7297759ec" + url: "https://pub.dev" + source: hosted + version: "0.8.9+2" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + url: "https://pub.dev" + source: hosted + version: "3.0.2" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: eac0a62104fa12feed213596df0321f57ce5a572562f72a68c4ff81e9e4caacf + url: "https://pub.dev" + source: hosted + version: "0.8.9" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + url: "https://pub.dev" + source: hosted + version: "2.9.3" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" infinite_scroll_pagination: dependency: "direct main" description: @@ -341,6 +461,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" nested: dependency: transitive description: @@ -377,10 +505,10 @@ packages: dependency: transitive description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" path_provider_android: dependency: transitive description: @@ -469,6 +597,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.27.7" + share_plus: + dependency: "direct main" + description: + name: share_plus + sha256: f74fc3f1cbd99f39760182e176802f693fa0ec9625c045561cfad54681ea93dd + url: "https://pub.dev" + source: hosted + version: "7.2.1" + share_plus_platform_interface: + dependency: transitive + description: + name: share_plus_platform_interface + sha256: df08bc3a07d01f5ea47b45d03ffcba1fa9cd5370fb44b3f38c70e42cced0f956 + url: "https://pub.dev" + source: hosted + version: "3.3.1" shared_preferences: dependency: "direct main" description: @@ -634,6 +778,38 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: a932c3a8082e118f80a475ce692fde89dc20fddb24c57360b96bc56f7035de1f + url: "https://pub.dev" + source: hosted + version: "2.3.1" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + url: "https://pub.dev" + source: hosted + version: "2.2.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + url: "https://pub.dev" + source: hosted + version: "3.1.1" uuid: dependency: transitive description: @@ -682,6 +858,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.0" + widgets_to_image: + dependency: "direct main" + description: + name: widgets_to_image + sha256: e32c7b77267c01d319dc97333d4f3d894e9d81c8b3a408fd33862fa7775ee398 + url: "https://pub.dev" + source: hosted + version: "0.0.2" win32: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 8875970..4ad73df 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,6 +23,10 @@ dependencies: flutter_svg: ^2.0.9 go_router: ^13.0.1 provider: ^6.1.1 + image_picker: ^1.0.7 + widgets_to_image: ^0.0.2 + file_saver: ^0.2.9 + share_plus: ^7.2.1 dev_dependencies: flutter_test: diff --git a/web/index.html b/web/index.html index acdc846..5910061 100644 --- a/web/index.html +++ b/web/index.html @@ -16,7 +16,7 @@ - + diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 8b6d468..68b33f1 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,18 @@ #include "generated_plugin_registrant.h" +#include +#include +#include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + FileSaverPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FileSaverPlugin")); + FileSelectorWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FileSelectorWindows")); + SharePlusWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); + UrlLauncherWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b93c4c3..e730c42 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,10 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_saver + file_selector_windows + share_plus + url_launcher_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST