diff --git a/lib/components/message.dart b/lib/components/message.dart index 9a8938c..b518d57 100644 --- a/lib/components/message.dart +++ b/lib/components/message.dart @@ -30,11 +30,11 @@ class ToastOverlay extends StatelessWidget { child: Align( alignment: Alignment.bottomCenter, child: PhysicalModel( - color: ColorScheme.of(context).surface.withOpacity(1), + color: FluentTheme.of(context).cardColor.withOpacity(1), borderRadius: BorderRadius.circular(4), elevation: 1, child: Container( - padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 16), + padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16), child: Row( mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/pages/image_page.dart b/lib/pages/image_page.dart index 858f5d2..f744418 100644 --- a/lib/pages/image_page.dart +++ b/lib/pages/image_page.dart @@ -132,7 +132,7 @@ class _ImagePageState extends State with WindowListener { if(file != null){ var fileName = file.path.split('/').last; String ext; - if(!file.path.split('.').last.contains('.')){ + if(!fileName.contains('.')){ ext = 'jpg'; fileName += '.jpg'; } else { @@ -146,7 +146,11 @@ class _ImagePageState extends State with WindowListener { 'webp' => 'image/webp', _ => 'application/octet-stream' }; - Share.shareXFiles([XFile(file.path, mimeType: mediaType, name: fileName)]); + Share.shareXFiles([XFile.fromData( + await file.readAsBytes(), + mimeType: mediaType, + name: fileName)] + ); } }), ],