title: "Undefined name 'context'. Try correcting the name to one that is defined, or defining the name." Flutter
body: <p>This is a snippet of my widgets.dart file where I defined a widget called see_all_cards and its only purpose is to show an extended list of all cards that I was initially displaying. It should just <strong>redirect to Trending.dart</strong>. That's my main goal here.</p>
  
  <pre><code>Widget see_all_cards(){
    return  Container(
          child: FlatButton(
                    child: Text(
                      "See all (43)",               
                      style: TextStyle(
                        color: Theme.of(context).accentColor, // error
                      ),
                      ),
  
                    onPressed: (){
                      Navigator.push(
                        context,  // error
                        MaterialPageRoute(
                          builder: (BuildContext context){
                            return trending();     
                          },
                        ),
                      );
                    },       
          )
    );
  }
  </code></pre>
  
  <p>The following segment is my main page. I've called SlowlyApp from void main. </p>
  
  <pre><code>class SlowlyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'SlowlyApp',
        home: Scaffold(
          appBar: AppBar(
            title: Text('Search',
              style: TextStyle(
                color: Color.fromRGBO(0,0,0,1),
              ),
            ),
            backgroundColor: Color.fromRGBO(225,225,0,1),         
            actions: &lt;Widget&gt;[
              IconButton(
                icon: 
                  Icon(Icons.search), 
                  onPressed: (){
                    showSearch(context: context, delegate: data_search());
                  }
              ),
            ],
          ),
          body: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: &lt;Widget&gt;[       
              smallgap(), 
              current_cards_heading(),
              current_cards(),
              see_all_cards(),
              smallgap(),
            ],
          ),
        ),
      );   
    }
  }
  </code></pre>