CAB
CAB

Reputation: 39

Flutter - trouble making navigation bottom menu

PLEASE HELP ME - I have error in context navigation push script in my flutter project

Code :

FloatingActionButton(
  child: Icon(Icons.add),
  onPressed: () {
    Navigator.push(
        context,
        MaterialPageRoute(
            builder: (context) => FormTambahData(
                  paramData: null,
                  regid: 0,
                )));
  },
),

Upvotes: 0

Views: 64

Answers (1)

Hadi
Hadi

Reputation: 652

go to your item method and add BuildContext like this:

class _DashboardState extends State<Dashboard> {
//  _items = [
  List<Widget> item(BuildContext context) {...}

Upvotes: 1

Related Questions