icemanbsi / searchable_dropdown

MIT License
107 stars 162 forks source link

Compilation failed Flutter 2.5.0 #147

Closed aragonet closed 2 years ago

aragonet commented 2 years ago

Flutter 2.5.0 deprecated textTheme.subhead property in favor of textTheme.subtitle1.

lcuis commented 2 years ago

Thanks for reporting this @aragonet . Can you please let us know whether this also affects the search_choices plugin?

aragonet commented 2 years ago

It works like a charm!

(It would be great if you could add a comment in the readme for people to use search_choices)

bondjpf commented 2 years ago

Any way too get past this error? Can't compile either....

/C:/Flutter/.pub-cache/hosted/pub.dartlang.org/searchable_dropdown-1.1.3/lib/searchable_dropdown.dart:371:41: Error: The getter 'subhead' isn't defined for the class 'TextTheme'.

lcuis commented 2 years ago

@bondjpf have you tried with the search_choices plugin?

bondjpf commented 2 years ago

Will try thanks.

bondjpf commented 2 years ago

@bondjpf have you tried with the search_choices plugin?

Tried and it worked. No more error. Now the problem is that when I select an item I get:

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: This widget has been unmounted, so the State no longer has a context (and should be considered defunct). E/flutter (20030): Consider canceling any active work during "dispose" or using the "mounted" getter to determine if the State is still active. E/flutter (20030): #0 State.context. (package:flutter/src/widgets/framework.dart:909:9) E/flutter (20030): #1 State.context (package:flutter/src/widgets/framework.dart:915:6) E/flutter (20030): #2 _SearchChoicesState.showDialogOrMenu (package:search_choices/search_choices.dart:1196:39) E/flutter (20030): E/flutter (20030): #3 _SearchChoicesState.build. (package:search_choices/search_choices.dart:1277:21) E/flutter (20030): E/flutter (20030):

lcuis commented 2 years ago

Hi @bondjpf ,

Great that the search_choices plugin compiles without any problem.

Can you please open an issue here if your new issue relates to this plugin?

Also, can you please include a minimalist code to help me reproduce your issue?