I'm making up a profile page, and want to use sliver to for some eye candy in my application. and i want it to to circle shape

my code

         SliverAppBar(
            expandedHeight: 200.0,
            floating: true,
            pinned: true,
            snap: true,
            primary: false,
            backgroundColor: Colors.white,
            flexibleSpace: FlexibleSpaceBar(

                centerTitle: true,
                title: Text(empName,
                    style: TextStyle(
                      color: Colors.black,
                      fontSize: 16.0,
                    )),

                  background: Image.network('www.sample.com/profile.png',
                  fit: BoxFit.cover,
                )

            ),
          ),

1 Answers

0
Rubens Melo On

Use CircleAvatar in background.

CircleAvatar(
  radius: 40.0,
  backgroundImage: NetworkImage('www.sample.com/profile.png'),
)