dart-lang/path

global name 'context' may hit local widget BuildContext parameters

Closed this issue · 3 comments

My code broke after adding path library because I was using 'context' as BuildContext variable in my highest widget.

The README for path says:

The path library was designed to be imported with a prefix, though you don't have to if you don't want to:

import 'package:path/path.dart' as p;

So it has some top-level identifiers that are pretty short names, with the understanding that you'll use a prefix to avoid collisions. If you prefer not to use a prefix, you can also do:

import 'package:path/path.dart' hide context;

Thanks, I already had the feeling that I am posting a dart-NOOB issue :)

That's totally OK! Asking question is how you learn. :)