How would I properly access the _runThisFunction(...) within the onTap()?

...

class _DealList extends State<DealList> with AutomaticKeepAliveClientMixin {

  void _runThisFunction() async {
    print('Run me')
  }

  @override
  Widget build(BuildContext context) {
    super.build(context);
    return FutureBuilder(
      future: _loadingDeals,
      builder: (BuildContext context, AsyncSnapshot snapshot) {
        return snapshot.connectionState == ConnectionState.done
            ? RefreshIndicator(
                onRefresh: _handleRefresh,
                child: ListView.builder(
                  physics: const AlwaysScrollableScrollPhysics(),
                  itemCount: snapshot.data['deals'].length,
                  itemBuilder: (context, index) {
                    final Map deal = snapshot.data['deals'][index];

                    return _getDealItem(deal, context);
                  },
                ),
              )
            : Center(
                child: CircularProgressIndicator(),
              );
      },
    );
  }
}

Container _getDealItem(Map deal, context) {
  return new Container(
    height: 90.0,
    child: Material(
      child: InkWell(
        child: _getDealRow(deal), // <-- this renders the row with the `deal` object
        onTap: () {
          // Below call fails
          // 'The function isn't defined'
          _runThisFunction();

        },
      ),
    ),
  );
}


Solution 1: creativecreatorormaybenot

The reason for that is that you are out of scope.
Little hint: The word "function" always indicates that the function you are trying to call is not part of a class and the keyword "method" shows you that the function you are trying to call is part of a class.

In your case, _runThisFunction is defined inside of _DealList, but you are trying to call it from outside.
You either need to move _getDealItem into _DealList or _runThisFunction out.

/// In this case both methods [_runThisFunction()] and [_getDealItem()] are defined inside [_DealList].
class _DealList extends State<DealList> with AutomaticKeepAliveClientMixin {
   void _runThisFunction() ...

   Container _getDealItem() ...
}

/// In this case both functions are defined globally.
void _runThisFunction() ...

Container _getDealItem() ...

You wil need to make sure that you also apply the same logic to _getDealRow and other nested calls.