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

Error type 'String' is not a subtype of type 'bool' #217

Closed
fuyucn opened this issue Dec 12, 2019 · 6 comments
Closed

Error type 'String' is not a subtype of type 'bool' #217

fuyucn opened this issue Dec 12, 2019 · 6 comments

Comments

@fuyucn
Copy link

fuyucn commented Dec 12, 2019

Seems for new flutter version 1.12.13, got error "type 'String' is not a subtype of type 'bool'" when set header and footer text.

Error is when checking if text is 'null'

String get _refreshText {
    return widget.classicalHeader.refreshText ??
            GlobalEasyRefreshLocalizations.of(context) == null
        ? _localizations.pullToRefresh
        : GlobalEasyRefreshLocalizations.of(context).pullToRefresh;
  }
@fuyucn fuyucn changed the title Error : Error type 'String' is not a subtype of type 'bool' Dec 12, 2019
@ghost
Copy link

ghost commented Dec 13, 2019

String get _loadText {
return widget.classicalFooter.loadText ??
GlobalEasyRefreshLocalizations.of(context) == null

Same problem

@a642815311
Copy link

I also encountered this problem, please developers to solve it quickly, my boss is going to fire me,Pity the weak and helpless Chinese coder.

@xuelongqy
Copy link
Owner

v2.0.7 fixed it

@FullChargeComplete
Copy link

大佬升级2.0.7 报错
Compiler message:
/Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_easyrefresh-2.0.7/lib/src/header/refresh_indicator.dart:541:10:
Error: The method 'findAncestorStateOfType' isn't defined for the class 'BuildContext'.

  • 'BuildContext' is from 'package:flutter/src/widgets/framework.dart'
    ('/Applications/flutter/packages/flutter/lib/src/widgets/framework.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'findAncestorStateOfType'.
    .findAncestorStateOfType<_EasyRefreshSliverRefreshControlState>();
    ^^^^^^^^^^^^^^^^^^^^^^^
    /Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_easyrefresh-2.0.7/lib/src/footer/load_indicator.dart:519:17:
    Error: The method 'findAncestorStateOfType' isn't defined for the class 'BuildContext'.
  • 'BuildContext' is from 'package:flutter/src/widgets/framework.dart'
    ('/Applications/flutter/packages/flutter/lib/src/widgets/framework.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'fi

@yayxs
Copy link

yayxs commented Dec 16, 2019

是的 有遇到同样的问题
The following assertion was thrown building ClassicalHeaderWidget(dirty, state:
I/flutter ( 8920): ClassicalHeaderWidgetState#da85b(tickers: tracking 3 tickers)):
I/flutter ( 8920): type 'String' is not a subtype of type 'bool'
I/flutter ( 8920):
I/flutter ( 8920): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter ( 8920): more information in this error message to help you determine and fix the underlying cause.
I/flutter ( 8920): In either case, please report this assertion by filing a bug on GitHub:
I/flutter ( 8920): https://github.com/flutter/flutter/issues/new?template=BUG.md

@xuelongqy
Copy link
Owner

s

请升级版本

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

5 participants