rounded_path_builder 0.0.2 copy "rounded_path_builder: ^0.0.2" to clipboard
rounded_path_builder: ^0.0.2 copied to clipboard

A Flutter utility to create rounded polygon paths from a list of points.

example/rounded_path_builder_example.dart

import 'package:flutter/material.dart';
import 'package:rounded_path_builder/rounded_paint.dart';

class RoundedPathExample extends StatelessWidget {
  const RoundedPathExample({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Rounded Path Example'),
      ),
      body: Center(
        child: CustomPaint(
          size: const Size(300, 300),
          painter: RoundedPainter(
            fillColor: Colors.red,
            setOffsets: (Size size) {
              return [
                Offset(0, size.height * 0.2),
                Offset(size.width * 0.2, size.height * 0.4),
                Offset(size.width * 0.4, size.height * 0.6),
                Offset(size.width * 0.6, size.height * 0.4),
                Offset(size.width * 0.8, size.height * 0.2),
              ];
            },
            radius: 20,
          ),
        ),
      ),
    );
  }
}
4
likes
160
points
3
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter utility to create rounded polygon paths from a list of points.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on rounded_path_builder