- fix share - logo
This commit is contained in:
parent
f1eb52518b
commit
9a716018fc
@ -4,7 +4,8 @@
|
||||
<application
|
||||
android:label="f0ckapp"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:enableOnBackInvokedCallback="true">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
|
BIN
assets/images/f0ck_small.webp
Normal file
BIN
assets/images/f0ck_small.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
@ -1,4 +1,5 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
@ -105,25 +106,25 @@ class _DetailViewState extends State<DetailView> {
|
||||
),
|
||||
actions: [
|
||||
PopupMenuButton<String>(
|
||||
onSelected: (value) {
|
||||
onSelected: (value) async {
|
||||
final item = provider.mediaItems.elementAt(_currentIndex);
|
||||
switch (value) {
|
||||
case 'media':
|
||||
final params = ShareParams(
|
||||
files: [
|
||||
XFile.fromData(
|
||||
utf8.encode(item.mediaUrl),
|
||||
mimeType: item.mime,
|
||||
),
|
||||
],
|
||||
File file = await DefaultCacheManager().getSingleFile(
|
||||
item.mediaUrl,
|
||||
);
|
||||
SharePlus.instance.share(params);
|
||||
Uint8List bytes = await file.readAsBytes();
|
||||
|
||||
final params = ShareParams(
|
||||
files: [XFile.fromData(bytes, mimeType: item.mime)],
|
||||
);
|
||||
await SharePlus.instance.share(params);
|
||||
break;
|
||||
case 'direct_link':
|
||||
SharePlus.instance.share(ShareParams(text: item.mediaUrl));
|
||||
await SharePlus.instance.share(ShareParams(text: item.mediaUrl));
|
||||
break;
|
||||
case 'post_link':
|
||||
SharePlus.instance.share(ShareParams(text: item.postUrl));
|
||||
await SharePlus.instance.share(ShareParams(text: item.postUrl));
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -47,8 +47,10 @@ class _MediaGridState extends State<MediaGrid> {
|
||||
return Scaffold(
|
||||
key: scaffoldKey,
|
||||
appBar: AppBar(
|
||||
//centerTitle: true,
|
||||
title: Text('fApp v${AppVersion.version}'),
|
||||
title: Image.asset(
|
||||
'assets/images/f0ck_small.webp',
|
||||
fit: BoxFit.fitHeight,
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.1.0+30
|
||||
version: 1.1.1+31
|
||||
|
||||
environment:
|
||||
sdk: ^3.9.0-100.2.beta
|
||||
|
Loading…
x
Reference in New Issue
Block a user