pixel_border

Last updated:

0 purchases

pixel_border Image
pixel_border Images
Add to Cart

Description:

pixel border

pixel_border #

A package to render shapes or borders of widgets with pixelated corners.
Usage #
PixelBorder can be used the same way built-in ShapeBorders are, by setting the shape property on any Widget supporting it.
Some examples include:
Drawing an orange square border where all corners are rounded and drawn with "pixels" of size 2.0
Container(
decoration: ShapeDecoration(
shape: PixelBorder(
borderRadius: BorderRadius.circular(4.0),
pixelSize: 2.0,
style: BorderStyle.solid,
borderColor: Colors.orange,
),
),
height: 42.0,
width: 42.0,
);
copied to clipboard
Setting the default button shape in MaterialApp:
MaterialApp(
theme: ThemeData(
buttonTheme: ButtonThemeData(
shape: PixelBorder(
borderRadius: BorderRadius.circular(10),
pixelSize: 5,
),
),
),
);
copied to clipboard
For corners to be drawn properly, PixelBorder requires the radii defined in borderRadius to be a multiple of pixelSize.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.