-
Notifications
You must be signed in to change notification settings - Fork 387
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
Web Support and Refactoring #155
Web Support and Refactoring #155
Conversation
Supporting multiple icon setsThe Ways support might be added
Suggestions are welcome! |
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 introduced app icon generation for web and also updated the example app. Although I'd like to see a lot of that introduced in a separate ticket, I understand why they were bundled here.
When I run the example, it works. However, when I run it on one of my own icons, android and ios work, but web gives this error:
RangeError (index): Index out of range: index must not be negative: -8
pub finished with exit code 2
@personalizedrefrigerator This looks good to me, but I'm not approved to approve and merge. Also, I'm wondering why iOS and Android can handle my icon, but web cannot. Maybe I've formatted my main icon incorrectly? |
Fixed!@bean5 Thank you! There was an error in |
Looks good to me! Web build fine this time! |
@MarkOSullivan94 was there something you wanted changed before merging this? |
…on 0.8.0. Please change this to a more-appliccable version if one exists!
I actually haven't got round to testing out Flutter Web yet and feel merging this PR would require someone from the community to step up and keep an eye on any Web related issues / suggestions Happy to merge in after reviewing this PR if either @bean5 or @personalizedrefrigerator be happy to do this? |
@MarkOSullivan94 I would be happy to help! Consider Before Merging
|
|
@MarkOSullivan94 whenever I start make a new project, I'm going to be generating an icon for web, so testing will happen naturally for web. While for most projects I believe that a |
@MarkOSullivan94 feel free to add me as a contributor if it helps. I can't commit to an official amount of time, but adding me shouldn't hurt anything. :) |
Whoops! My fault! The version code was |
Oh, LGTM |
Until this gets merged in, I'm relegated to using the fork instead. Just sayin'. |
Love it, but I did get the following error when I tried it:
Creating the icons folder in the web directory fixed it though! |
Does the web icon come out really pixelated for anyone else?
Am I doing something wrong? |
Thanks! I'm looking into it! Are you referring to the |
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.
Left a couple of comments for you to check out!
Got a feeling it wont be long until this is merged 🙌
{bool verbose, String cwd}) { | ||
verbose ??= false; | ||
final String configFile = argResults[fileOption]; | ||
cwd ??= './'; | ||
|
||
String configFile = argResults[fileOption]; | ||
final String fileOptionResult = argResults[fileOption]; | ||
|
||
if (configFile != null) { | ||
configFile = path.join(cwd, configFile); | ||
} |
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.
Nice catch!
It'd be worthwhile putting a brief explanation above the declaration of the loadConfigFileFromArgResults
so others contributing will be made aware of why cwd
parameter was added
@@ -14,4 +14,4 @@ environment: | |||
sdk: '>=2.3.0 <3.0.0' | |||
|
|||
dev_dependencies: | |||
test: ^1.11.1 | |||
test: '^1.11.1' |
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.
Yep this is definitely a good idea! Will add in the future 👍
GitHub's diff was showing every deleted file — I added copies of the old example projects to limit the size of the diff GitHub displays. |
Size of the diff is fine don't worry 😃 |
Last change I'd recommend: Probably best to go ahead and execute the This would mean one less step to run the web example 🙂 |
Co-authored-by: Mark O'Sullivan <mos182@hotmail.co.uk>
Done! 78 commits is a lot. Would you like me to try to clean up the commit history (i.e. using |
At present, unlike the Android and iOS launcher icon generators, Would you like me to try to add this functionality? |
Yep that would be appreciated!
I agree this is better to leave for a follow up PR |
Co-authored-by: Mark O'Sullivan <mos182@hotmail.co.uk>
@personalizedrefrigerator heads up your commits removes some important files for the default example - guessing you done this before adjusting the |
I think the default example only needs |
Less steps needed for anyone to run the examples the better 🙂 |
Flutter 2.0 was announced today. It officially supports web, Linux, and other platforms. At pub.dev this project promises to be compatible for web at but I don't think it is--unless this is a duplicate branch and it was already done. I just checked. The default is not building for web. How can I help get this done? What is blocking this from being finished up? |
The package is stated as compatible as your web project will not be broken by it (in my understanding) however, it does not generate the web favicons. |
Is there any update/progress on this? Is there anything I could do to help? Would really love some web support :) |
I haven't been using Flutter recently! I'll try to resolve conflicts for this PR (but might have to close it & open another -- resolving conflicts will probably involve a rebase and users of the fork may be having Flutter fetch a specific commit). Edit: Sorry! I've been busier than expected recently. I hope to find time to do this over the weekend! |
Just got here coming from Issue #126. I think it would be interesting to link the issue to this PR since they are definitely related and there are other user asking about this there. |
Closing in favor of #189 |
Overview
This pull request adds support for web-based favicons and Progressive Web App launcher icons.
Summary of Changes
web.dart
. This script crops, resizes, and copies icons specified in configuration files.web.dart
. Additional tests were necessary for the new configuration script.Notes
flutter run -d chrome
orflutter run -d web-server
. The project must first be built for web, then served from the build directory (see the README).flutter create .
have been removed from the example projects and added to the project's.gitignore
file. This minimizes the number of changes committed by PRs that modify the example projects, but does mean users will have to runflutter create .
in each of the example project directories (see the README in the default example project).264
files GitHub lists as "changed" are deleted files! Most were in the example project'sios
andandroid
directories! Please, don't let this large number stop you from reviewing this PR!