Plant-App-Flutter-UI icon indicating copy to clipboard operation
Plant-App-Flutter-UI copied to clipboard

Changes for Flutter 2

Open AndrewM- opened this issue 3 years ago • 1 comments

To get the project to work in Flutter 2 I had to make a couple of changes to the supporting packages:

    • In picture_stream.dart, I changed the word 'DiagnosticableMixin' to 'Diagnosticable'
    • In picture_provider.dart I chanded line 49 or 50 to locale: context != null ? Localizations.localeOf(context) : null,

For item 2, Flutter 2 handles nulls differently and the NullOK flag has to be removed. More info here: https://docs.google.com/document/d/1LKBL0S1uyhACDiUXILhLKFZH8Cpl_w3mXjHgaE8_--U/edit#heading=h.pub7jnop54q0

To get at these files, find the import statement in home_screen.dart import 'package:flutter_svg/flutter_svg.dart'; and use the goto definition menu option (VS Code). This will take you to flutter_svg.dart which lists the packages in items 1 and 2. Open the definition to see the code.

AndrewM- avatar Mar 17 '21 00:03 AndrewM-

Hi! As I've said at #2, the author said the license it's MIT, so, if you have these changes working still and have the time, submit a pull request, maybe someone else wants them and it would be easier to find them. Or even just fork this repo and tell people about it.

FMorschel avatar May 11 '21 12:05 FMorschel