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

Update examples to null safety #732

Merged
merged 3 commits into from
May 7, 2023

Conversation

timbotimbo
Copy link
Collaborator

Description

The example code can't simply be pasted into a modern flutter project. It will show errors, mainly due to null-safety changes.
Given that the plugin supports null-safety from version 4.2.0 (18 months ago), it's safe to update the example.

Besides some changes in the UnityWidget parameters, this example project is still compatible all the way back to plugin 4.2.0.

The last commit is a small cleanup by following most suggestions of flutter_lints.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@juicycleff
Copy link
Owner

@timbotimbo can you rebase on my draft PR. Would love to have this merged in

@dawiddszewczyk
Copy link
Collaborator

its ok but like @juicycleff said rebase on his draft PR

@timbotimbo
Copy link
Collaborator Author

timbotimbo commented Dec 24, 2022

@juicycleff
I created #737 based on the new branch. I've made it a separate request to allow people to still use this one while they use the plugin up to version 2022.2.0.

@timbotimbo
Copy link
Collaborator Author

Reopening this for visibility, as the global_unity_controller isn't making much progress.

@timbotimbo timbotimbo reopened this Apr 6, 2023
@timbotimbo timbotimbo marked this pull request as draft April 6, 2023 10:12
@RoyalCoder88 RoyalCoder88 marked this pull request as ready for review April 6, 2023 11:01
@timbotimbo
Copy link
Collaborator Author

Flutter will likely come with a new release next week, 3.10 (or maybe 3.12).
This will include Dart 3, and drop support for code that isn't null-safe.

Therefore I will merge this to keep the example working for people on the latest flutter version.

This might cause some small merge conflicts for #733 and #729. But i'd rather help to solve some small merge conflicts, than hastily merge a new feature that might not be stable yet.

@timbotimbo timbotimbo merged commit 654e66c into juicycleff:master May 7, 2023
@timbotimbo timbotimbo deleted the null-safe-example branch July 8, 2023 19:30
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

Successfully merging this pull request may close these issues.

5 participants