Skip to content
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

Migrate to null-safety #40

Open
Zeswen opened this issue Mar 11, 2021 · 6 comments
Open

Migrate to null-safety #40

Zeswen opened this issue Mar 11, 2021 · 6 comments

Comments

@Zeswen
Copy link

Zeswen commented Mar 11, 2021

Migrate existing code to null-safety.

Full Description
Since last week, Flutter 2.0 hit stable branch. With 2.0 we've received Dart 2.12 with new sound null safety mechanism. Current transformer_page_view package doesn't support null-safety yet therefore migration is a must.

Example Code
Migration will touch most of the code. Key objectives here is to utilise dart migrate so all of the heavy lifting is done. And after that, run the build and fix places, that were fixed incorrectly by the tool.

Platforms
Migration will touch all of the platforms.

Research Resources
null-safety is unavoidable thus sooner or later it must be done.
https://dart.dev/null-safety

Additional
This will be a heavy migration therefore careful code review is a must from one or more developers, after everything is done.

@Zeswen
Copy link
Author

Zeswen commented Mar 15, 2021

In case anyone is interested, I've forked the repository and added null-safety to it.

@namangor04
Copy link

Hey, how do i include your fork in my app ?

In case anyone is interested, I've forked the repository and added null-safety to it.

how do i include your fork in my app brother ?

@Zeswen
Copy link
Author

Zeswen commented May 22, 2021

@namangor04 Add the following to your pubspec.yaml:

dependencies: 
  transformer_page_view: 
    git: 
      url: git://github.com/zeswen/transformer_page_view.git
      ref: master

@namangor04
Copy link

namangor04 commented May 23, 2021

Thank you, did it and works like a charm. I wanted to ask one more question, can we start of from a plugin which is not null safe, make it null safe, and also add some more features, and then upload it to pub.dev while giving the credit to the original author ? i have seen 1 plugin that uses native APIs on iOS/Android to display PDFs in the app itself and is not null safe, and also the code doesn't give much flexibility, and I presume it isnt maintained now as the plugin is last updated 15 months ago, the said plugin I am talking about is flutter_full_pdf_viewer ? Is it right to do that ?

@Zeswen
Copy link
Author

Zeswen commented May 23, 2021

@namangor04 it's completely normal! I've seen it done in many abandoned projects and with my fork of autocomplete_textfield.

I don't have the time to maintain a package, but feel free to use my fork to create a new one!

Just re-fork my fork and start working on the new functionalities, re-add the current example (which I removed for time-purposes) and that's it :)

@namangor04
Copy link

@Zeswen thank you, i will probably add that package to pub.dev as soon as i am able to ensure it has no bugs. Thank you for your assistance, appreciate it😃.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants