refactor(ui): update DetailDevice screen layout
This commit is contained in:
30
lib/product/shared/shared_curve.dart
Normal file
30
lib/product/shared/shared_curve.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CuveEdgesCustom extends CustomClipper<Path> {
|
||||
@override
|
||||
getClip(Size size) {
|
||||
Path path = Path();
|
||||
path.lineTo(0, size.height);
|
||||
final firstCurve = Offset(0, size.height - 30);
|
||||
final lastCurve = Offset(30, size.height - 30);
|
||||
path.quadraticBezierTo(
|
||||
firstCurve.dx, firstCurve.dy, lastCurve.dx, lastCurve.dy);
|
||||
final secondFirstCurve = Offset(0, size.height - 30);
|
||||
final secondLastCurve = Offset(size.width - 30, size.height - 30);
|
||||
path.quadraticBezierTo(secondFirstCurve.dx, secondFirstCurve.dy,
|
||||
secondLastCurve.dx, secondLastCurve.dy);
|
||||
final thirdFirstCurve = Offset(size.width, size.height - 30);
|
||||
final thirdLastCurve = Offset(size.width, size.height);
|
||||
path.quadraticBezierTo(thirdFirstCurve.dx, thirdFirstCurve.dy,
|
||||
thirdLastCurve.dx, thirdLastCurve.dy);
|
||||
|
||||
path.lineTo(size.width, 0);
|
||||
path.close();
|
||||
return path;
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldReclip(covariant CustomClipper oldClipper) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user