Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border Radius to Foil Container #1

Closed
rajaarav0 opened this issue Nov 26, 2021 · 1 comment
Closed

Border Radius to Foil Container #1

rajaarav0 opened this issue Nov 26, 2021 · 1 comment

Comments

@rajaarav0
Copy link

Is there a way I can provide border radius or alter the shape of Foil widget?

@Zabadam
Copy link
Owner

Zabadam commented Dec 1, 2021

Any widget that you create with rounded corners may then be provided as the child of a new Foil widget.

Consider

return Foil(
  child: SizedBox(
    width: 300,
    height: 300,
    child: DecoratedBox(
      decoration: BoxDecoration(
        // there has to be *something* with which to mask the Foil
        color: Colors.black,
        borderRadius: BorderRadius.circular(25),
      ),
    ),
  ),
);

or even

return Foil(
  child: Text(
    '🔴', // red circle emoji
    style: const TextStyle(fontSize: 200),
  ),
);

If the red circle emoji does not appear in the above code, the referenced character is 🔴.

I wrote this comment on mobile without verifying the code.

@Zabadam Zabadam closed this as completed Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants