40 lines
871 B
Dart
40 lines
871 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ClipInfoClass extends CustomClipper<Path> {
|
|
@override
|
|
Path getClip(Size size) {
|
|
Path path = Path();
|
|
path.lineTo(0, size.height);
|
|
path.lineTo(size.width - 80, size.height);
|
|
path.lineTo(size.width, size.height - 80);
|
|
path.lineTo(size.width, 0);
|
|
path.close();
|
|
|
|
return path;
|
|
}
|
|
|
|
@override
|
|
bool shouldReclip(covariant CustomClipper<Path> oldClipper) => false;
|
|
}
|
|
|
|
class ClipPathClass extends CustomClipper<Path> {
|
|
@override
|
|
Path getClip(Size size) {
|
|
Path path = Path();
|
|
path.lineTo(0, size.height - 60);
|
|
path.quadraticBezierTo(
|
|
size.width / 2,
|
|
size.height,
|
|
size.width,
|
|
size.height - 60,
|
|
);
|
|
path.lineTo(size.width, 0);
|
|
path.close();
|
|
|
|
return path;
|
|
}
|
|
|
|
@override
|
|
bool shouldReclip(covariant CustomClipper<Path> oldClipper) => false;
|
|
}
|