I'm new to flutter and dart language and this is my first real project which basically have lots of screen, I was wondering if it possible to use onTap from ListTile to go to new screen? if not I hope someone direct me. Thanks
here's my code so far:
import 'package:flutter/material.dart';
import 'package:rate_your_professor/screens/firstScreen.dart';
void main() {
runApp(MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Rate ',
home: Scaffold(
appBar: AppBar(
title: Text("XXXXXXXXXX", textDirection: TextDirection.rtl),
),
body: RaisedBookButton(),
),
));
}
Widget getListView(){
var listView = ListView(
children: <Widget>[
Text("XXXXXXXXXXXXXXX", textDirection: TextDirection.rtl,textAlign: TextAlign.center,),
ListTile(
leading: Icon(Icons.location_city),
title: Text("XXXXX ", textDirection: TextDirection.rtl),
subtitle: Text("XXXXXXXXXX", textDirection: TextDirection.rtl,),
onTap: (){
//Here where I would like to go to new screen
},
),
],
);
return listView;
}