Answers for "drawer profile flutter"

5

flutter drawer

Scaffold(
   drawer: Drawer(
      child: ListView(
        padding: EdgeInsets.zero,
        children: [
              DrawerHeader(
                   child: Text("Header")),
              ListTile(
                  title: Text("Home"))
        ]),
  ), 
);
Posted by: Guest on June-26-2020
0

make drawer with profile image flutter

import 'package:flutter/material.dart';

class AppDrawer extends StatefulWidget {
  @override
  _AppDrawerState createState() => new _AppDrawerState();
}

class _AppDrawerState extends State<AppDrawer> {
  @override
  Widget build(BuildContext context) {
    return new Drawer(
      child: Center(
        child: Column(
          children: <Widget>[
            new UserAccountsDrawerHeader(
              decoration: BoxDecoration(color: Colors.white),
              currentAccountPicture: new CircleAvatar(
                radius: 50.0,
                backgroundColor: const Color(0xFF778899),
                backgroundImage:
                    NetworkImage("http://tineye.com/images/widgets/mona.jpg"),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
Posted by: Guest on March-10-2021

Browse Popular Code Answers by Language