app bar made ontap materialpageroute made but cannont find a page i have made path LIB/pages/first_page.dart
I was thinking i need some code in the linked page maybe.
i tried to add line :
import 'lib/pages/First_Page.dart';
IconButton(
icon: const Icon(Icons.notifications),
onPressed: () {},
)
],
backgroundColor: Colors.orangeAccent,
),
drawer: Drawer(
child: Container(
color: Color(0xFFFF9000),
child: ListView(
children: [
DrawerHeader(
child: Center(
child: Text(
'TCB',
style: TextStyle(fontSize: 45),
),
)),
ListTile(
leading: Icon(Icons.home),
title: Text(
'Page 1',
style: TextStyle(fontSize: 30),
),
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(builder: (context) => First_Page()));
},
),
i went with a slighty diffent aproach and did this:
I found this worked my mistake was the named class "addtwonumbers"was the connector thanks all ListTile( leading: Icon(Icons.file_upload), title: Text('Rules'), onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => AddTwoNumbers()))),