buildDrawerHeader method
Implementation
Widget buildDrawerHeader(BuildContext context) {
return SizedBox(
width: MediaQuery.of(context).size.width / (widget.drawerWidth),
child: UserAccountsDrawerHeader(
margin: const EdgeInsets.only(bottom: 0.0),
decoration: const BoxDecoration(
color: Colors.tealAccent,
),
accountName: Text(widget.accountName.toString()),
accountEmail: Text(widget.accountEmail.toString()),
currentAccountPicture: CircleAvatar(
backgroundColor: Theme.of(context).platform == TargetPlatform.iOS
? Colors.blue
: Colors.white,
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
image: NetworkImage(widget.imageUrl.toString()),
fit: BoxFit.fill),
),
),
),
),
);
}