upgrader icon indicating copy to clipboard operation
upgrader copied to clipboard

Added a Custom Dialog Builder 🛠

Open moazelsawaf opened this issue 2 years ago • 8 comments

Hello Dear 👋🏻

In this PR I have added a Custom Dialog Builder to build a customized upgrader dialog 🛠

Previously there were just two default styles which are Material & Cupertino with the ability to determine whether to use UpgradeDialogStyle.cupertino or UpgradeDialogStyle.material, now I am introduction a third style which is UpgradeDialogStyle.custom. 📱

When you set the UpgradeDialogStyle to be custom, you have to define a customDialogBuilder callback which receives 3 important pieces of information about the update which are: title, message, and releaseNotes and returns the custom built dialog 💪🏻

Example:

Example

moazelsawaf avatar Oct 10 '22 02:10 moazelsawaf

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (d1e5a77) 93.08% compared to head (f54610c) 92.33%. Report is 112 commits behind head on master.

:exclamation: Current head f54610c differs from pull request most recent head 15ed7ce. Consider uploading reports for the commit 15ed7ce to get more accurate results

Files Patch % Lines
lib/src/upgrader.dart 42.85% 8 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #224      +/-   ##
==========================================
- Coverage   93.08%   92.33%   -0.76%     
==========================================
  Files          10       10              
  Lines         984      991       +7     
==========================================
- Hits          916      915       -1     
- Misses         68       76       +8     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 10 '22 02:10 codecov[bot]

Any progress? I really need custom mode. Currently there will be many blank spaces: image

cipchk avatar Dec 14 '22 12:12 cipchk

@cipchk I am just very busy at this period of time, I will try hard to complete this PR in the next few days Insha'Allah.

moazelsawaf avatar Dec 14 '22 15:12 moazelsawaf

Hi @moazelsawaf any update? We also need this feature before our next major release. We can take over and finish this if you're still not able to work on this.

Nirajn2311 avatar Dec 23 '22 11:12 Nirajn2311

I have pushed the remaining parts of this feature and also applied all review requests, sorry for being late 🙏🏻

moazelsawaf avatar Dec 25 '22 01:12 moazelsawaf

Hi @larryaasen , any chance you could give this another review.

Nirajn2311 avatar Jan 10 '23 18:01 Nirajn2311

Hi @larryaasen, could you check it out?

StarProxima avatar May 06 '23 18:05 StarProxima

There is a new version https://pub.dev/packages/upgrader/versions/9.0.0-alpha.1 that is in test and provides a way to handle this. Look at the examples included with the package.

larryaasen avatar Dec 29 '23 22:12 larryaasen

@moazelsawaf Look at the latest version of this package with a latest customization options. I think it now meets your needs. If not, please open a new issue with your details.

larryaasen avatar Apr 05 '24 11:04 larryaasen