mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 12:57:24 +00:00
fix ui
This commit is contained in:
@@ -30,11 +30,11 @@ class ToastOverlay extends StatelessWidget {
|
|||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
child: PhysicalModel(
|
child: PhysicalModel(
|
||||||
color: ColorScheme.of(context).surface.withOpacity(1),
|
color: FluentTheme.of(context).cardColor.withOpacity(1),
|
||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 16),
|
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
@@ -132,7 +132,7 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
|
|||||||
if(file != null){
|
if(file != null){
|
||||||
var fileName = file.path.split('/').last;
|
var fileName = file.path.split('/').last;
|
||||||
String ext;
|
String ext;
|
||||||
if(!file.path.split('.').last.contains('.')){
|
if(!fileName.contains('.')){
|
||||||
ext = 'jpg';
|
ext = 'jpg';
|
||||||
fileName += '.jpg';
|
fileName += '.jpg';
|
||||||
} else {
|
} else {
|
||||||
@@ -146,7 +146,11 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
|
|||||||
'webp' => 'image/webp',
|
'webp' => 'image/webp',
|
||||||
_ => 'application/octet-stream'
|
_ => 'application/octet-stream'
|
||||||
};
|
};
|
||||||
Share.shareXFiles([XFile(file.path, mimeType: mediaType, name: fileName)]);
|
Share.shareXFiles([XFile.fromData(
|
||||||
|
await file.readAsBytes(),
|
||||||
|
mimeType: mediaType,
|
||||||
|
name: fileName)]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user