How to use ListTile class in Flutter App

0 votes

Hi Guys,

I have created a Navigation menu in Flutter App. I want to use ListTile class to this App. How can I do that?

Aug 26, 2020 in Others by akhtar
• 38,180 points
436 views

1 answer to this question.

0 votes

Hi@akhtar,

A list tile contains one to three lines of text optionally flanked by icons or other widgets, such as checkboxes. The icons (or other widgets) for the tile are defined with the leading and trailing parameters. The first line of text is not optional and is specified with a title. I have attached the code below. You can go through once.

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        drawer: Drawer(
          child: ListView(
            // Important: Remove any padding from the ListView.
            padding: EdgeInsets.zero,
            children: <Widget>[
              DrawerHeader(
                child: Text('Drawer Header'),
                decoration: BoxDecoration(
                  color: Colors.blue,
                ),
              ),
              ListTile(
                title: Text('Item 1'),
                onTap: () {},
              ),
              ListTile(
                title: Text('Item 2'),
                onTap: () {},
              ),
            ],
          ),
        ),
answered Aug 26, 2020 by MD
• 95,220 points

Related Questions In Others

0 votes
1 answer

How to add one image in Flutter App?

Hi@akhtar, You can use Image.network() method to add ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,220 points
106 views
0 votes
1 answer

How to use hexadecimal color strings in Flutter?

Hi@akhtar, In Flutter the Color class only accepts integers as parameters, or there ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,220 points
132 views
0 votes
1 answer

How to create a navigation bar in Flutter app?

Hi@akhtar, To add a drawer to the app, ...READ MORE

answered Aug 24, 2020 in Others by MD
• 95,220 points
261 views
0 votes
1 answer

How to deploy card banners in flutter app?

Hi, If you are trying to create a ...READ MORE

answered Sep 2, 2020 in Others by MD
• 95,220 points
356 views
0 votes
1 answer

What is the future of flutter?

Hi@MD, Flutter is a rather new cross-platform framework ...READ MORE

answered Jul 17, 2020 in Others by akhtar
• 38,180 points
184 views
0 votes
1 answer

What is Flutter?

Hi@akhtar, Flutter is an app SDK for building ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,220 points
290 views
0 votes
1 answer

How to install Flutter in Windows system?

Hi@akhtar, You can follow the below-given steps to ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,220 points
453 views
0 votes
1 answer

How to use Card Widget in Flutter App?

Hi@akhtar, A card is a sheet of material used to ...READ MORE

answered Aug 26, 2020 in Others by MD
• 95,220 points
174 views
0 votes
1 answer

How to create a Volume Icon in Flutter App?

Hi@akhtar, You can use Icon Widget to create ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,220 points
404 views