flutter_polygon_clipper

Creator: coderz1093

Last updated:

Add to Cart

Description:

flutter polygon clipper

Flutter Polygon Clipper #
A Flutter package to create polygon shapes. From now on, you can create polygon shapes for you android and iOS app using Flutter & Flutter Polygon Cliper.
Installation #
Add this to your project's pubspec.yaml file:
dependencies:
flutter_polygon_clipper: ^1.0.0
copied to clipboard
Usage & Clipping #
Use the FlutterClipPolygon widget to clip a child widget.
import 'package:flutter_polygon_clipper/flutter_polygon_clipper.dart';

FlutterClipPolygon(
sides: 12,
borderRadius: 5.0, // Defaults to 0.0 degrees
rotate: 90.0, // Defaults to 0.0 degrees
boxShadows: [
PolygonBoxShadow(color: Colors.red, elevation: 1.0),
PolygonBoxShadow(color: Colors.grey, elevation: 5.0)
],
child: Container(color: Colors.green),
),
copied to clipboard
Borders #
Use the FlutterPolygonBorder shape with your favorites widgets!
import 'package:flutter_polygon_clipper/flutter_polygon_clipper.dart';

Container(
height: 100,
width: 100,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: FlutterPolygonBorder(
sides: 3,
borderRadius: 5.0, // Defaults to 0.0 degrees
rotate: 30.0, // Defaults to 0.0 degrees
side: BorderSide(
color: Colors.red,
width: 2.0), // Defaults to BorderSide.none
),
),
onPressed: () {},
child: Icon(Icons.star),
),
),
copied to clipboard
Other widgets:

TextButton,
Container,
Chip
...

License

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

Files:

Customer Reviews

There are no reviews.