ListView Switch Case In Flutter

ListView Switch Case In Flutter :

ListView Switch Case In Flutter
ListView.builder(
          padding: EdgeInsets.only(top: 1.0),
          physics: BouncingScrollPhysics(),
          itemCount: drawerMenuList.length,
          itemBuilder: (BuildContext context, int index) {
            return Material(child: InkWell(
              onTap: () {
                switch (index) {
                  case 0:
                    break;

                  case 1:

                    break;

                  case 2:

                    break;

                  case 3:

                    break;

                  case 4:
                    break;

                  case 5:

                    break;
                }
                Navigator.of(context).pop();
              },
              child: ListTile(
                  leading: drawerMenuList[index].icon,
                  title: drawerMenuList[index].title),
            ));
          })

import 'package:flutter/material.dart';

class DrawerMenuResponse {
  final Text title;
  final Icon icon;

  DrawerMenuResponse({this.title, this.icon});
}

The flutter tutorial  is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application

For more information about Flutter. visit www.fluttertutorial.in