dart format

This commit is contained in:
2026-05-08 20:12:40 +02:00
parent 9e139b5704
commit 3b8da1d3d6
295 changed files with 6404 additions and 4161 deletions
+33 -9
View File
@@ -3,12 +3,17 @@ import 'package:flutter/material.dart';
enum BubbleNip { leftTop, rightBottom, none }
class BubbleEdges {
const BubbleEdges.only({this.top = 0, this.bottom = 0, this.left = 0, this.right = 0});
const BubbleEdges.only({
this.top = 0,
this.bottom = 0,
this.left = 0,
this.right = 0,
});
const BubbleEdges.all(double value)
: top = value,
bottom = value,
left = value,
right = value;
: top = value,
bottom = value,
left = value,
right = value;
final double top;
final double bottom;
@@ -53,9 +58,19 @@ class Bubble extends StatelessWidget {
final flat = Radius.zero;
switch (style.nip) {
case BubbleNip.leftTop:
return BorderRadius.only(topLeft: flat, topRight: r, bottomLeft: r, bottomRight: r);
return BorderRadius.only(
topLeft: flat,
topRight: r,
bottomLeft: r,
bottomRight: r,
);
case BubbleNip.rightBottom:
return BorderRadius.only(topLeft: r, topRight: r, bottomLeft: r, bottomRight: flat);
return BorderRadius.only(
topLeft: r,
topRight: r,
bottomLeft: r,
bottomRight: flat,
);
case BubbleNip.none:
return BorderRadius.all(r);
}
@@ -72,10 +87,19 @@ class Bubble extends StatelessWidget {
color: style.color,
borderRadius: radius,
border: style.borderWidth > 0
? Border.all(color: Theme.of(context).dividerColor, width: style.borderWidth)
? Border.all(
color: Theme.of(context).dividerColor,
width: style.borderWidth,
)
: null,
boxShadow: style.elevation > 0
? [BoxShadow(color: Colors.black26, blurRadius: style.elevation * 2, offset: Offset(0, style.elevation))]
? [
BoxShadow(
color: Colors.black26,
blurRadius: style.elevation * 2,
offset: Offset(0, style.elevation),
),
]
: null,
),
padding: style.padding.toEdgeInsets(),