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 · 4 comments
Open

history not exist #5

dengcqwqy opened this issue Sep 10, 2018 · 4 comments

Comments

@dengcqwqy
Copy link

@dengcqwqy 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

This comment has been minimized.

Copy link

@HansRove 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

This comment has been minimized.

Copy link

@HansRove HansRove commented Oct 9, 2018

老哥 history被私有了哟

@chaangliu

This comment has been minimized.

Copy link

@chaangliu chaangliu commented Oct 11, 2018

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

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

This comment has been minimized.

Copy link

@yituwangpeng yituwangpeng commented Dec 25, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.