You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
608 B
Dart
24 lines
608 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class CarveInImage extends CustomClipper<Path> {
|
|
final double gab;
|
|
var radius = 10.0;
|
|
|
|
CarveInImage(this.gab);
|
|
|
|
@override
|
|
Path getClip(Size size) {
|
|
Path path = Path();
|
|
path.lineTo(0, size.height);
|
|
path.lineTo(size.width / 2 - gab / 2, size.height);
|
|
path.arcToPoint(Offset(size.width / 2 + gab / 2, size.height), radius: Radius.circular(gab / 2));
|
|
path.lineTo(size.width, size.height);
|
|
path.lineTo(size.width, 0);
|
|
path.lineTo(0, 0);
|
|
return path;
|
|
}
|
|
|
|
@override
|
|
bool shouldReclip(CustomClipper<Path> oldClipper) => true;
|
|
}
|