Initial commit

This commit is contained in:
admin1
2026-07-14 11:11:36 +08:00
commit 656499cf94
604 changed files with 119518 additions and 0 deletions
@@ -0,0 +1,75 @@
import 'package:flutter/material.dart';
import 'package:forui/forui.dart';
const kPanelBg = Color(0xE8181818);
const kPanelDivider = Color(0x33FFFFFF);
Widget panelDivider() => const FDivider(
style: .delta(color: kPanelDivider, padding: .value(EdgeInsets.zero)),
);
class PlayerPanelShell extends StatelessWidget {
final IconData icon;
final String title;
final double width;
final VoidCallback onClose;
final Widget child;
const PlayerPanelShell({
super.key,
required this.icon,
required this.title,
required this.width,
required this.onClose,
required this.child,
});
@override
Widget build(BuildContext context) {
return Material(
color: Colors.transparent,
child: Container(
width: width,
decoration: BoxDecoration(
color: kPanelBg,
borderRadius: BorderRadius.circular(12),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
_header(),
panelDivider(),
Flexible(child: child),
],
),
),
);
}
Widget _header() {
return Padding(
padding: const EdgeInsets.fromLTRB(16, 12, 8, 10),
child: Row(
children: [
Icon(icon, color: Colors.white70, size: 18),
const SizedBox(width: 8),
Text(
title,
style: const TextStyle(
color: Colors.white,
fontSize: 15,
fontWeight: FontWeight.w600,
),
),
const Spacer(),
IconButton(
icon: const Icon(Icons.close, color: Colors.white54, size: 18),
onPressed: onClose,
padding: EdgeInsets.zero,
constraints: const BoxConstraints(minWidth: 32, minHeight: 32),
),
],
),
);
}
}