Skip to content

Instantly share code, notes, and snippets.

@rayliverified
Last active November 3, 2019 17:42
Show Gist options
  • Save rayliverified/c8b22f7ce523ad694e956d4828550416 to your computer and use it in GitHub Desktop.
Save rayliverified/c8b22f7ce523ad694e956d4828550416 to your computer and use it in GitHub Desktop.
Material(
elevation: 4.0,
shape: CircleBorder(),
clipBehavior: Clip.hardEdge,
color: Colors.transparent,
child: Ink.image(
image: AssetImage('assets/profile_default.jpg'),
fit: BoxFit.cover,
width: 120.0,
height: 120.0,
child: InkWell(
onTap: () {},
),
),
)
@amreniouinnovent
Copy link

@searchy2
onTap: onTap: () {},
remove the dublicate onTap:

@amreniouinnovent
Copy link

@searchy
to remove the rectangle shape use clipBehavior: Clip.antiAliasWithSaveLayer,

Card(
      clipBehavior: Clip.antiAliasWithSaveLayer,
      elevation: 3,
      borderOnForeground: false,
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(80.0),
      ),
      child: Ink.image(
        image: AssetImage(IMAGE_START),
        fit: BoxFit.cover,
        width: _progress.value * (80),
        height: _progress.value * (80),
        child: InkWell(
          onTap: () {},
          child: null,
        ),
      ),
    )

@rayliverified
Copy link
Author

Thanks for the catch @amreniouinnovent !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment