getContext method

BuildContext? getContext({
  1. bool root = false,
})

Returns BuildContext of this Widget or 'root' context from ControlRootScope.

Implementation

BuildContext? getContext({bool root = false}) =>
    root ? ControlScope.root.context ?? context : context;