brianegan / flutter_architecture_samples

TodoMVC for Flutter
http://fluttersamples.com/
BSD 3-Clause "New" or "Revised" License
8.74k stars 1.71k forks source link

Samples don't run with latest Flutter #208

Open jinalskothari opened 2 years ago

jinalskothari commented 2 years ago

Many (if not all) samples do not compile/run with the latest Flutter (Flutter 2.5.0).

One set of issues is related to the change of font names. See open PR.

StanevPrime commented 2 years ago

@brianegan, are they any plans for migration of the code base to the latest Flutter, including null-safety ? I assume this will be huge amount of work, since there are a lot of braking changes in bloc, redux etc, so how we can help you ?

brianegan commented 2 years ago

@StanevPrime Thanks for writing in! Was busy for holidays & catching up on work. Right now, I've been going through the following plan:

  1. Update the shared packages to null-safety: todos_app_core, integration_tests, todos_repository_core, todos_repository_local_storage. I'm most of the way through this and could publish my branch shortly.
  2. Identify which Samples should be updated. Some of the apps are based on libraries that have not been updated to support null-safety. I plan on dropping those apps.
  3. Go through and update them! I'd start with the vanilla example, then probably go by popularity on pub.dev (provider, bloc, etc being prioritized over redux for example)

However, long-term I wonder if this project should actually change a bit. It's been very hard to keep each app up-to-date, not only with Null-safety but also with changes to the libraries themselves. Many of the samples are still perfectly valid, but some of them, such as the bloc examples, are probably a bit out of date since they've updated and improved things over time. Unfortunately, I've found it tough to keep up-to-date with all of these changes.

Instead, I wonder if this project should merely export the core packages listed above, and any package could implement a "Flutter Architecture Sample Todo App" by writing a Flutter app that passes the integration tests suite. Then, any author could merely submit a pull request to this project to update the README pointing to the Todo app in their own repository.

What do you think?

StanevPrime commented 2 years ago

This is great idea!

Speaking of scalability and maintainability challenges this approach will definitely help in long-term.

A assume there will be two packages

flutter_architecture_samples with the following libraries

and flutter_architecture_samples_integration_test

Looking into the bloc library there is already a self-hosted copy of the todos sample, which in future can install and use those packages as follows

pubspec.yaml


dependencies:
    ...
    flutter_architecture_samples: ^1.0.0

dev_dependencies:
    ...
    flutter_architecture_samples_integration_test: ^1.0.0

dependency_overrides:
...

Also you can go further by uploading those packages to pub.dev so that it will be easier for each sample to adapt any breaking changes.

bhargavraviya commented 9 months ago

Hello

This does not support Flutter's latest version.

sample flutter max version
mvc 3.0.0

etc

@brianegan

contfedorov commented 3 weeks ago

Hey, any updated on this?