Init repo

This commit is contained in:
PartyDonut 2024-09-15 14:12:28 +02:00
commit 764b6034e3
566 changed files with 212335 additions and 0 deletions

View file

@ -0,0 +1,65 @@
import 'package:flutter/material.dart';
class AppBarShape extends OutlinedBorder {
@override
OutlinedBorder copyWith({BorderSide? side}) => this; //todo
@override
Path getInnerPath(Rect rect, {TextDirection? textDirection}) {
Path path = Path()
..fillType = PathFillType.evenOdd
..addRect(rect)
..addRRect(RRect.fromRectAndCorners(
Rect.fromLTWH(rect.left, rect.bottom - 14, rect.width, 14),
topLeft: Radius.circular(14),
topRight: Radius.circular(14),
));
return path;
}
@override
Path getOuterPath(Rect rect, {TextDirection? textDirection}) {
return getInnerPath(rect, textDirection: textDirection);
}
@override
void paint(Canvas canvas, Rect rect, {TextDirection? textDirection}) {
/// create shader linear gradient
canvas.drawPath(getInnerPath(rect), Paint()..color = Colors.transparent);
}
@override
ShapeBorder scale(double t) => this;
}
class BottomBarShape extends OutlinedBorder {
@override
OutlinedBorder copyWith({BorderSide? side}) => this; //todo
@override
Path getInnerPath(Rect rect, {TextDirection? textDirection}) {
Path path = Path()
..fillType = PathFillType.evenOdd
..addRect(rect)
..addRRect(RRect.fromRectAndCorners(
Rect.fromLTWH(rect.left, rect.top, rect.width, 14),
bottomLeft: Radius.circular(14),
bottomRight: Radius.circular(14),
));
return path;
}
@override
Path getOuterPath(Rect rect, {TextDirection? textDirection}) {
return getInnerPath(rect, textDirection: textDirection);
}
@override
void paint(Canvas canvas, Rect rect, {TextDirection? textDirection}) {
/// create shader linear gradient
canvas.drawPath(getInnerPath(rect), Paint()..color = Colors.transparent);
}
@override
ShapeBorder scale(double t) => this;
}