This commit is contained in:
Shawn 2023-01-01 12:58:24 -07:00
parent d30e2fc99c
commit b0601c29ab
8 changed files with 22 additions and 51 deletions

View File

@ -43,10 +43,8 @@ class WallPaperLogic {
final directory = (await getApplicationDocumentsDirectory()).path;
File imgFile = File('$directory/$name.png');
await imgFile.writeAsBytes(pngBytes);
Share.shareFiles([imgFile.path],
mimeTypes: ['image/png'],
subject: '$wonderName Wallpaper',
text: 'Check out this $wonderName wallpaper from the Wonderous app!');
Share.shareXFiles([XFile(imgFile.path)],
subject: '$wonderName Wallpaper', text: 'Check out this $wonderName wallpaper from the Wonderous app!');
}
}
}

View File

@ -3,8 +3,8 @@ import 'dart:ui';
import 'package:wonders/common_libs.dart';
import 'package:wonders/logic/data/highlight_data.dart';
import 'package:wonders/ui/common/app_icons.dart';
import 'package:wonders/ui/common/controls/app_page_indicator.dart';
import 'package:wonders/ui/common/controls/app_header.dart';
import 'package:wonders/ui/common/controls/app_page_indicator.dart';
import 'package:wonders/ui/common/static_text_scale.dart';
part 'widgets/_blurred_image_bg.dart';
@ -136,7 +136,7 @@ class _ArtifactScreenState extends State<ArtifactCarouselScreen> {
}
OverflowBox _buildBgCircle(double height) {
final double size = 2000;
const double size = 2000;
return OverflowBox(
maxWidth: size,
maxHeight: size,

View File

@ -9,6 +9,7 @@ class _BottomTextContent extends StatelessWidget {
final double height;
final _ArtifactScreenState state;
final bool shortMode;
int get _currentPage => state._currentPage.value.round();
@override
Widget build(BuildContext context) {
@ -30,9 +31,9 @@ class _BottomTextContent extends StatelessWidget {
ignoringSemantics: false,
child: Semantics(
button: true,
onIncrease: () => state._handleArtifactTap(state._currentPage.value.round() + 1),
onDecrease: () => state._handleArtifactTap(state._currentPage.value.round() - 1),
// onTap: () => _handleArtifactTap(_currentOffset.round()),
onIncrease: () => state._handleArtifactTap(_currentPage + 1),
onDecrease: () => state._handleArtifactTap(_currentPage - 1),
onTap: () => state._handleArtifactTap(_currentPage),
liveRegion: true,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,

View File

@ -8,7 +8,7 @@ import Foundation
import desktop_window
import package_info_plus_macos
import path_provider_macos
import share_plus_macos
import share_plus
import shared_preferences_macos
import url_launcher_macos

View File

@ -664,10 +664,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
url: "https://pub.dev"
source: hosted
version: "0.12.14"
version: "0.12.13"
material_color_utilities:
dependency: transitive
description:
@ -768,10 +768,10 @@ packages:
dependency: transitive
description:
name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
url: "https://pub.dev"
source: hosted
version: "1.8.3"
version: "1.8.2"
path_drawing:
dependency: transitive
description:
@ -944,26 +944,10 @@ packages:
dependency: "direct main"
description:
name: share_plus
sha256: f582d5741930f3ad1bf0211d358eddc0508cc346e5b4b248bd1e569c995ebb7a
sha256: e387077716f80609bb979cd199331033326033ecd1c8f200a90c5f57b1c9f55e
url: "https://pub.dev"
source: hosted
version: "4.5.3"
share_plus_linux:
dependency: transitive
description:
name: share_plus_linux
sha256: dc32bf9f1151b9864bb86a997c61a487967a08f2e0b4feaa9a10538712224da4
url: "https://pub.dev"
source: hosted
version: "3.0.1"
share_plus_macos:
dependency: transitive
description:
name: share_plus_macos
sha256: "44daa946f2845045ecd7abb3569b61cd9a55ae9cc4cbec9895b2067b270697ae"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "6.3.0"
share_plus_platform_interface:
dependency: transitive
description:
@ -972,22 +956,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.2.0"
share_plus_web:
dependency: transitive
description:
name: share_plus_web
sha256: eaef05fa8548b372253e772837dd1fbe4ce3aca30ea330765c945d7d4f7c9935
url: "https://pub.dev"
source: hosted
version: "3.1.0"
share_plus_windows:
dependency: transitive
description:
name: share_plus_windows
sha256: "3a21515ae7d46988d42130cd53294849e280a5de6ace24bae6912a1bffd757d4"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
shared_preferences:
dependency: "direct main"
description:
@ -1173,10 +1141,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: c9282698e2982b6c3817037554e52f99d4daba493e8028f8112a83d68ccd0b12
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
url: "https://pub.dev"
source: hosted
version: "0.4.17"
version: "0.4.16"
timing:
dependency: transitive
description:

View File

@ -46,7 +46,7 @@ dependencies:
provider: ^6.0.2
rnd: ^0.2.0
screenshot: ^1.2.3
share_plus: ^4.0.10
share_plus: ^6.3.0
shared_preferences: ^2.0.15
simple_rich_text: ^2.0.49
sized_context: ^1.0.0+1

View File

@ -7,11 +7,14 @@
#include "generated_plugin_registrant.h"
#include <desktop_window/desktop_window_plugin.h>
#include <share_plus/share_plus_windows_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
DesktopWindowPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DesktopWindowPlugin"));
SharePlusWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
}

View File

@ -4,6 +4,7 @@
list(APPEND FLUTTER_PLUGIN_LIST
desktop_window
share_plus
url_launcher_windows
)