FLUTTER ECOSYSTEM

leonardocaldas/flutter-polygon-clipper

बहुभुज आकृतियों के साथ Flutter कस्टम क्लिपर

flutter-बहुभुज क्लिपर प्रोजेक्ट कवर
Stars
96
Forks
31
अंतिम पुश (UTC)
12 जून 2023
प्रोजेक्ट स्थिति
सक्रिय
Leonardo Caldas GitHub avatar
GITHUB User

Leonardo Caldas ↗

CTO at PrecPago

PrecPago
भाषाएँDart

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 1 आइटम
  • flutter{"sdk":"flutter"}

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

flutter_polygon

A Flutter plugin to create views using regular polygon shapes (e.g. Pentagons and Hexagons).

Based on the polygon_clipper package by leonardocaldas.

Example1 Example2

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_polygon: ^0.2.0

Usage

Clipping

Use the ClipPolygon widget to clip a child widget.

import 'package:flutter_polygon/flutter_polygon.dart';

ClipPolygon(  
 sides: 6, 
 borderRadius: 5.0,     // Defaults to 0.0 degrees
 rotate: 90.0,          // Defaults to 0.0 degrees
 boxShadows: [  
  PolygonBoxShadow(color: Colors.black, elevation: 1.0),
  PolygonBoxShadow(color: Colors.grey, elevation: 5.0)
 ],
 child: Container(color: Colors.black),
);
Borders

Use the PolygonBorder shape with your favorites widgets!

import 'package:flutter_polygon/flutter_polygon.dart';

FloatingActionButton(
  shape: PolygonBorder(
    sides: 6,
    borderRadius: 5.0,                                      // Defaults to 0.0 degrees
    rotate: 30.0,                                           // Defaults to 0.0 degrees
    border: BorderSide(color: Colors.red, width: 2.0),      // Defaults to BorderSide.none
  ),
  onPressed: () {},
  child: Icon(Icons.star),
),

Other widgets:

  • TextButton, ElevatedButton, ...
  • Container
  • Chip
  • ...

Contributing

If you find an issue with this package, please open an issue on github.

If you wish to contribute to this project, I encourage you to open a pull request.

Credit

Based on the polygon_clipper package by leonardocaldas.