buildDrawerMenuWithoutIcon method
Widget
buildDrawerMenuWithoutIcon(
)
Implementation
Widget buildDrawerMenuWithoutIcon(BuildContext context) {
return Expanded(
child: Container(
color: widget.backgroundColorForDrawerPane ?? Colors.white,
width: MediaQuery.of(context).size.width / widget.drawerWidth,
height: MediaQuery.of(context).size.height,
child: MediaQuery.removePadding(
context: context,
removeTop: widget.isDrawerHeaderRequired ? true : false,
child: ListView(
padding: EdgeInsets.zero,
children: [
ListView.builder(
shrinkWrap: true,
physics: const ClampingScrollPhysics(),
itemCount: widget.tileList.length,
itemBuilder: (BuildContext context, int index) {
return Column(
children: [
GestureDetector(
onTap: () {
setState(() {
widget.initialSelectionIndex = index;
widget.onTap(widget.tileList[index],
widget.initialSelectionIndex);
Navigator.of(context).pop();
});
},
child: Container(
color: widget.initialSelectionIndex == index
? Colors.red
: widget.menuNotSelectedColor,
height: widget.drawerMenuHeight,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Center(
child: Text(
widget.tileList[index],
style: TextStyle(
color: widget.menuFontColor,
fontWeight: FontWeight.w500,
fontSize: widget.menuFontSize ?? 10.0),
),
),
Container()
],
),
),
),
const Divider(height: 0.3)
],
);
},
),
],
),
),
),
);
}