self property
DartScript
get
self
Returns the instance of the currently running script.
If you are trying to load an instace of another script then use DartScript.fromFile; TODO(bsutton): for v2 change this to a ctor to aid with unit testing. @Throwing(ArgumentError) @Throwing(FormatException) @Throwing(RangeError) @Throwing(String)
Implementation
// ignore: flutter_style_todos
/// TODO(bsutton): for v2 change this to a ctor to aid with unit testing.
/// @Throwing(ArgumentError)
/// @Throwing(FormatException)
/// @Throwing(RangeError)
/// @Throwing(String)
// ignore: prefer_constructors_over_static_methods
static DartScript get self => _current ??= DartScript._self();