context property

BuildContext get context
inherited

Implementation

BuildContext get context {
  _InitBaseStateLessElement.context = null;
  assert(() {
    if (ContextList.getInstance.contextList.isEmpty) {
      throw FlutterError(
        'This widget has been unmounted, so the State no longer has a context (and should be considered defunct). \n'
        'Consider canceling any active work during "dispose" or using the "mounted" getter to determine if the State is still active.',
      );
    }
    return true;
  }());
  return _InitBaseStateLessElement.context ??=
      ContextList.getInstance.contextList.last;
  // return ContextList.getInstance.contextList.last;
}