I have made ListTiles in flutter. After this, where I use container in my code these list tiles render their too. Moreover, I am facing routing issue in this project. I am working with material-ui. This code contains a widget in which there are number of listtiles. All listtiles are child of column and and the main code is returning padding.
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Container(
height: 200.0,
decoration: BoxDecoration(
border: Border.all(width: 3.0, color: Colors.white),
shape: BoxShape.circle,
image: new DecorationImage(
image: new NetworkImage(
'https://pbs.twimg.com/profile_images/1341062843811160066/RbDTK2qa_400x400.jpg'),
),
),
),
SizedBox(
height: 20.0,
),
Container(
child: Text(
'Mohammad Hassan',
style: TextStyle(
fontSize: 30.0,
fontWeight: FontWeight.bold,
),
),
),
SizedBox(
height: 10.0,
),
Text(
'My name is Mohammad Hassan. \nI am from punjab. I have visited Sindh. I went to Quetta. I love traveling. I am happy to be a part of Travel Assistant.',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20.0,
),
),
SizedBox(
height: 20.0,
),
ListTile(
leading: Icon(
Icons.edit,
color: Colors.white,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
tileColor: Theme.of(context).primaryColor,
title: Text(
'Edit Profile',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20.0,
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
),
SizedBox(
height: 20.0,
),
Expanded(
child: ListView(
children: <Widget>[
ListTile(
tileColor: Color.fromARGB(255, 204, 202, 202),
leading: Icon(Icons.email),
title: Text('Email'),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0)),
subtitle: Text("${user!.email}"),
// ignore: unrelated_type_equality_checks
trailing: user!.emailVerified
? Icon(
Icons.verified_outlined,
color: Colors.blue,
)
: Icon(Icons.verified_outlined),
),
SizedBox(
height: 10.0,
),
ListTile(
tileColor: Color.fromARGB(255, 204, 202, 202),
leading: Icon(Icons.help_outline),
title: Text('Become a Guide'),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0)),
trailing: Icon(Icons.arrow_forward_ios),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => GuideRequest(),
),
);
},
),
SizedBox(
height: 10.0,
),
// SignOutButton(),
SizedBox(
height: 10.0,
),
MaterialButton(
height: 56.0,
minWidth: 350.0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0)),
child: Text(
'Sign Out',
style: TextStyle(
color: Colors.white,
fontSize: 20.0,
),
),
color: Theme.of(context).primaryColor,
onPressed: () {
AuthenticationHelper().signOut().then((valule) {
print('Outing');
});
// Navigator.popUntil(context, (route) => false);
// print('after');
},
)
],
),
)
],
),
);}
An other file that I am calling on OnTap function
import 'package:flutter/material.dart';
class GuideRequest extends StatefulWidget {
const GuideRequest({ Key? key }) : super(key: key);
@override
State<GuideRequest> createState() => _GuideRequestState();
}
class _GuideRequestState extends State<GuideRequest> {
@override
Widget build(BuildContext context) {
return Container();
}
}

