-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filex to open files #2058
Filex to open files #2058
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useful addition to File management.
], | ||
return IconButton( | ||
icon: PhosphorIcon(PhosphorIcons.shareFat()), | ||
onPressed: () => onShareEvent(calendarEvent), | ||
); | ||
} | ||
|
||
Future<void> onShareEvent(CalendarEvent event) async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about putting ShareEvent on action folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could do, but it is single use case ... so I'll keep it here for now.
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
header ?? const SizedBox.shrink(), | ||
if (header != null) const SizedBox(height: 16.0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (header != null) const SizedBox(height: 16.0),
Not understanding purpose of this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there is a header, we want some padding between it and the items.
final List<Widget>? beforeOptions; | ||
final List<Widget>? afterOptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final List<Widget>? beforeOptions;
final List<Widget>? afterOptions;
Can I have more details about this options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like what? it allows you to inject further options in the list... either at the top or bottom. I ended up not using it, I can also remove it...
label: Text(lang.shareFile), | ||
icon: PhosphorIcon(PhosphorIcons.shareNetwork()), | ||
), | ||
if (!Platform.isAndroid) // crashes on Android for some reason ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// crashes on Android for some reason ...
This is probably due to new File system permission introduced in latest android OS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possibly. if you have an idea for a fix, the bug is reported here #1803
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is the case what I am thinking then it require bit of discussion on the same. I will cross check details and update you.
@@ -133,6 +133,7 @@ dependencies: | |||
shake_detector: | |||
path: ../packages/shake_detector | |||
open_filex: ^4.5.0 | |||
phosphor_flutter: ^2.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In recent past, I have explore this package and check with Acter app. Here is the my findings.
Advantages:
- Phosphor have better look and feel compare to Atlas
- Phosphor have more number of icons compare to Atlas
Disadvantages:
- Phosphor have less variety for single icon category
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phosphor have less variety for single icon category
I don't understand what that means. Can you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah. gotcha ... not sure that matter too much though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
built on top of #2048 this adds facilities to open or share files.
Specifically, this replaces the existing
DownloadButton
with a newShareFileButton
(from the newly addedfiles
feature) that will open a bottom up drawer for the file in question and allows the user to chose betweenSee it in action:
share-and-open.mp4
Fixes #1663.
Additionally this adds the Phosphor-Icons library as it had a nicer icon and we wanted to start using that anyways...