I currently using the scrollController.position.activity on the function that deside some action depend on this attribution.But the hint said :
The member 'activity' can only be used within 'package:flutter/src/widgets/scroll_position.dart' or a test.
so I wonder if its ok to use it at scrollController listener or some place like the normal function?
thanks for seeing the question and hopefully to have your kindly answer.
CodePudding user response:
That's a warning and you can still run your application correctly. It's because that function is annotated with @protected
and @visibleForTesting
which means that this piece of code (function or getter) is written to be used by that file or it's tests only. It's there to indicate developers intention for that code.