polygon_clipper 1.0.0 copy "polygon_clipper: ^1.0.0" to clipboard
polygon_clipper: ^1.0.0 copied to clipboard

outdatedDart 1 only

A plugin to clip a Widget into a polygon shape. Works with any kind of Widget.

example/main.dart

import 'package:flutter/material.dart';
import 'package:polygon_clipper/polygon_clipper.dart';

void main() => runApp(new ExampleApp());

class ExampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Container(
      color: Colors.white,
      child: new Center(
        child: new ClipPolygon(
          child: new Container(
              decoration: new BoxDecoration(
                gradient: new LinearGradient(
                  begin: Alignment.topLeft,
                  end: Alignment.bottomRight,
                  colors: [
                    Colors.red[200],
                    Colors.red[800],
                  ],
                ),
              ),
              child: new Center(
                child: new Icon(
                  Icons.add_a_photo,
                  color: Colors.white,
                  size: 150.0,
                  textDirection: TextDirection.ltr,
                ),
              )
          ),
          boxShadows: [
            new PolygonBoxShadow(color: Colors.black, elevation: 5.0),
          ],
          sides: 6,
          borderRadius: 5.0,
        ),
      ),
    );
  }
}
67
likes
0
pub points
81%
popularity

Publisher

unverified uploader

A plugin to clip a Widget into a polygon shape. Works with any kind of Widget.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on polygon_clipper