-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Native linux support #178
Native linux support #178
Conversation
I wanted to take a moment to express my gratitude for your contribution to the project. Your efforts in adding native Linux support are deeply appreciated. I've noticed that you've been putting in a lot of hard work. Remember, there's no need to overdo it. Adding support for a new platform is inherently challenging and time-consuming. Most importantly, as this is an open-source project, the best approach is to contribute whenever you feel passionate and inspired to do so. Your well-being and enthusiasm for the project are what truly matter. Thanks again for your valuable contribution! Best regards, |
Let's save the compliments when we are done with Linux support in peace :) Is there a way where I can contact with you in private? maybe discord or slack channel? anything |
|
I added the plugin interface for gal without new package or doing a breaking change |
OK. |
gal_linux is just a dart implementation package for Linux We can rename it to linux, but it's really not a big deal I named it like this to follow conversations of official flutter plugins Besides, the package will be used only in the Linux platform unlike the previous PR It's much easier and faster as we don't have to build the whole app again every time we make a change |
Two folders for linux is weird, so let's make it one. |
Actually, it's one But if you mean two folders The other one for the example and this can't be deleted. Otherwise, we can't run the example on Linux It is just for the example It won't affect the end developer who will use the library for linux |
All plugins have two folders for all platforms One for the example |
Then the linux_gal folder should be under linux. |
We only have a Linux folder under the example We can't put the platform specific code in the example Even if we did, the end developer won't get the changes in his own project |
When you add a platform, doesn't it generate a linux folder in the root? |
We did that previously, but now, since you wanted dart implementation and actual, I want that too I depleted the linux native code and created a new package and made some changes in the lib so we have an interface for the plugin without breaking changes In the gal_linux package, we override the impl of the interface And we used the package in the main gal package for linux only Simple as that The docs are not very clear about dart platform specific code, so I had to take a look at the path provider plugin from the flutter team |
There are several ways to add a linux platform, and there are many to choose from. My preference is as stated in the issue,
We do not have to write the code right away. We should discuss the best way these can be accomplished. Basically, We need to write native code like others, but if we can achieve this with Dart, Dart is easier. Anyway, there is no need to rush and don't feel you have to do it alone. To begin with, the demand for linux apps is low compared to other platforms. |
One idea is to publish the linux support as your extension package and introduce it in the gal readme. This way you are free to write your code. |
Don't worry. Even after this PR gets merged, I will still provide extra patches for a while I added new dependency in pubspec.yaml of gal_linux only |
natsuk4ze. is my username |
Was that the same profile icon? I don't seem to have received it. |
I’m not receiving that. my username is “natsuk4ze.” |
@@ -0,0 +1,43 @@ | |||
# Miscellaneous |
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.
This whole file is generated by flutter create . --platforms=linux
# example | ||
|
||
A new Flutter project. | ||
|
||
## Getting Started | ||
|
||
This project is a starting point for a Flutter application. | ||
|
||
A few resources to get you started if this is your first Flutter project: | ||
|
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.
This will be updated soon
example/lib/main.dart
Outdated
@@ -68,7 +68,7 @@ class _AppState extends State<App> { | |||
'https://github.com/natsuk4ze/gal/raw/main/example/assets/done.jpg', | |||
path, | |||
); | |||
await Gal.putImage(path); | |||
await Gal.putImage(path, album: album); |
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.
Bug fix in the example
example/lib/main.dart
Outdated
@@ -80,7 +80,7 @@ class _AppState extends State<App> { | |||
'https://github.com/natsuk4ze/gal/raw/main/example/assets/done.mp4', | |||
path, | |||
); | |||
await Gal.putVideo(path); | |||
await Gal.putVideo(path, album: album); |
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.
Same here
@@ -0,0 +1 @@ | |||
/home/freshtechtips/Desktop/gal/ |
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.
This should be deleted
@@ -25,6 +33,7 @@ environment: | |||
dependencies: | |||
flutter: | |||
sdk: flutter | |||
plugin_platform_interface: ^2.1.7 |
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.
This is used in all offical flutter plugins
pubspec.yaml
Outdated
platforms: | ||
android: | ||
ios: | ||
linux: | ||
macos: | ||
windows: |
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.
Just to avoid pubspec.yaml
from showing Linux as unsupported
No description provided.