title: Flutter SnackBar not showing
body: <p>I have implemented a function to form submitting.I want to have SnackBar Alert to after submitted. I have tried but it doesn't work.After I added SnackBar routing also doesn't work.</p>
  
  <pre><code>addTicket() async {
  if (_formKey.currentState.validate()) {
    _formKey.currentState.save();
  
    try{
      DocumentReference ref = await db.collection('CostalLineTicketDetails').
      document(ticketCato).collection("Tickets").add(
          {
            'startStation':startStation,
            'endStation':endStation,
            'price':price,
            'ticketType':ticketCato,
            'contactNo':contactNo,
            'dateTime':dateTime,
          });
      setState(() =&gt; id = ref.documentID);
      Navigator.push(context, new MaterialPageRoute(builder: (context) =&gt; CostalLine()));
  
      Scaffold.of(context).showSnackBar(SnackBar(content: Text('Ticket Added Sucessfully')));
  
    }catch(e){
      print(e);
    }
  }
  </code></pre>
  
  <p>}
  }</p>