mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-01-11 22:40:36 +00:00
Fix share params to avoid Text file
- avoids extra text file - simplify RenderBox lookup
This commit is contained in:
parent
c8328fa347
commit
922582b270
1 changed files with 4 additions and 8 deletions
|
|
@ -175,17 +175,13 @@ Future<void> doBackUp(
|
|||
alignment: Alignment.topLeft,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
final box = () {
|
||||
try {
|
||||
return context.findRenderObject() as RenderBox?;
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}();
|
||||
final RenderBox? box =
|
||||
context.findRenderObject() as RenderBox?;
|
||||
SharePlus.instance.share(
|
||||
ShareParams(
|
||||
files: [XFile(p.join(path, "$name.backup"))],
|
||||
text: "$name.backup",
|
||||
subject: "$name.backup",
|
||||
title: "Share Mangayomi backup file",
|
||||
sharePositionOrigin: box == null
|
||||
? null
|
||||
: box.localToGlobal(Offset.zero) & box.size,
|
||||
|
|
|
|||
Loading…
Reference in a new issue