mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
format code
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
///tabbar样式下方横条固定宽度
|
||||
class AbsUnderlineTabIndicator extends Decoration {
|
||||
const AbsUnderlineTabIndicator({
|
||||
@@ -44,7 +43,8 @@ class AbsUnderlineTabIndicator extends Decoration {
|
||||
}
|
||||
|
||||
class _UnderlinePainter extends BoxPainter {
|
||||
_UnderlinePainter(this.decoration, VoidCallback? onChanged) : super(onChanged);
|
||||
_UnderlinePainter(this.decoration, VoidCallback? onChanged)
|
||||
: super(onChanged);
|
||||
|
||||
final AbsUnderlineTabIndicator decoration;
|
||||
|
||||
@@ -56,7 +56,11 @@ class _UnderlinePainter extends BoxPainter {
|
||||
final Rect indicator = insets!.resolve(textDirection).deflateRect(rect);
|
||||
//取中间坐标
|
||||
double cw = (indicator.left + indicator.right) / 2;
|
||||
return Rect.fromLTWH(cw - decoration.wantWidth! / 2, indicator.bottom - borderSide!.width, decoration.wantWidth!, borderSide!.width);
|
||||
return Rect.fromLTWH(
|
||||
cw - decoration.wantWidth! / 2,
|
||||
indicator.bottom - borderSide!.width,
|
||||
decoration.wantWidth!,
|
||||
borderSide!.width);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -64,8 +68,9 @@ class _UnderlinePainter extends BoxPainter {
|
||||
assert(configuration.size != null);
|
||||
final Rect rect = offset & configuration.size!;
|
||||
final TextDirection textDirection = configuration.textDirection!;
|
||||
final Rect indicator = _indicatorRectFor(rect, textDirection).deflate(borderSide!.width / 2.0);
|
||||
final Rect indicator =
|
||||
_indicatorRectFor(rect, textDirection).deflate(borderSide!.width / 2.0);
|
||||
final Paint paint = borderSide!.toPaint()..strokeCap = StrokeCap.round;
|
||||
canvas.drawLine(indicator.bottomLeft, indicator.bottomRight, paint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ class EmptyWidget extends ConsumerWidget {
|
||||
const EmptyWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context,WidgetRef ref) {
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -16,7 +16,7 @@ class EmptyWidget extends ConsumerWidget {
|
||||
"暂无数据",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color:ref.watch(themeProvider).themeColor.descColor(),
|
||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -19,7 +19,7 @@ class QLCupertinoContextMenuAction extends StatefulWidget {
|
||||
this.isDestructiveAction = false,
|
||||
this.onPressed,
|
||||
this.trailingIcon,
|
||||
}) : assert(child != null),
|
||||
}) : assert(child != null),
|
||||
assert(isDefaultAction != null),
|
||||
assert(isDestructiveAction != null),
|
||||
super(key: key);
|
||||
@@ -45,10 +45,12 @@ class QLCupertinoContextMenuAction extends StatefulWidget {
|
||||
final IconData? trailingIcon;
|
||||
|
||||
@override
|
||||
State<QLCupertinoContextMenuAction> createState() => _QLCupertinoContextMenuActionState();
|
||||
State<QLCupertinoContextMenuAction> createState() =>
|
||||
_QLCupertinoContextMenuActionState();
|
||||
}
|
||||
|
||||
class _QLCupertinoContextMenuActionState extends State<QLCupertinoContextMenuAction> {
|
||||
class _QLCupertinoContextMenuActionState
|
||||
extends State<QLCupertinoContextMenuAction> {
|
||||
static const Color _kBackgroundColor = Color(0xFFEEEEEE);
|
||||
static const Color _kBackgroundColorPressed = Color(0xFFDDDDDD);
|
||||
static const double _kButtonHeight = 30.0;
|
||||
@@ -96,7 +98,6 @@ class _QLCupertinoContextMenuActionState extends State<QLCupertinoContextMenuAct
|
||||
return _kActionSheetActionStyle;
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
|
||||
Reference in New Issue
Block a user