We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isRunningOnBot
1 parent 1bdbfe7 commit 37ffb2dCopy full SHA for 37ffb2d
packages/flutter_tools/lib/src/base/utils.dart
@@ -45,10 +45,8 @@ class BotDetector {
45
}
46
47
bool get isRunningOnBot {
48
- if (context == null) {
49
- return _kBotDetector.isRunningOnBot;
50
- }
51
- return context[BotDetector].isRunningOnBot;
+ final BotDetector botDetector = context?.getVariable(BotDetector) ?? _kBotDetector;
+ return botDetector.isRunningOnBot;
52
53
54
String hex(List<int> bytes) {
0 commit comments