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

history not exist #5

Open
dengcqwqy opened this issue Sep 10, 2018 · 5 comments
Open

history not exist #5

dengcqwqy opened this issue Sep 10, 2018 · 5 comments

Comments

@dengcqwqy
Copy link

dengcqwqy commented Sep 10, 2018

Dart Error: Unhandled exception:
'package:hybrid_stack_manager/router.dart': error: line 118 pos 48: file:///Users/dengjinlong/Documents/5-Flutter/hybrid_stack_manager/lib/router.dart:118:48: Error: The getter 'history' isn't defined for the class '#lib1::NavigatorState'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'history'.
List<Route> navHistory = navState.history;
^
List<Route> navHistory = navState.history;
^

@HansRove
Copy link

HansRove commented Oct 9, 2018

class NavigatorState extends State with TickerProviderStateMixin {
final GlobalKey _overlayKey = new GlobalKey();
final List<Route> _history = <Route>[];
final Set<Route> _poppedRoutes = new Set<Route>();

@HansRove
Copy link

HansRove commented Oct 9, 2018

老哥 history被私有了哟

@chaangliu
Copy link

chaangliu commented Oct 11, 2018

navigator.dart里增加一个getter,获取私有的_history:

  List<Route<dynamic>> get history => _history;

@yituwangpeng
Copy link

yituwangpeng commented Dec 25, 2018

直接更改flutter源码的做法显然不是一个好的方案。

@madugula007
Copy link

madugula007 commented Aug 27, 2020

Where to add
List<Route> get history => _history;

in NavigatorState class?

I am getting following error after adding in NavigatorState.

Please guide

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