This commit is contained in:
Leon Bösche
2026-01-25 19:11:04 +01:00
parent b041cd5440
commit f353e634d2
2 changed files with 21 additions and 17 deletions

View File

@@ -316,6 +316,7 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
child: ModernGlassButton( child: ModernGlassButton(
onPressed: _downloadFile, onPressed: _downloadFile,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
showShadows: false,
child: SizedBox( child: SizedBox(
width: 104, width: 104,
child: const Center(child: Icon(Icons.download, size: 26)), child: const Center(child: Icon(Icons.download, size: 26)),

View File

@@ -7,12 +7,14 @@ class ModernGlassButton extends StatefulWidget {
final Widget child; final Widget child;
final bool isLoading; final bool isLoading;
final EdgeInsets padding; final EdgeInsets padding;
final bool showShadows;
const ModernGlassButton({ const ModernGlassButton({
required this.onPressed, required this.onPressed,
required this.child, required this.child,
this.isLoading = false, this.isLoading = false,
this.padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 8), this.padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
this.showShadows = true,
super.key, super.key,
}); });
@@ -63,6 +65,7 @@ class _ModernGlassButtonState extends State<ModernGlassButton>
child: Stack( child: Stack(
children: [ children: [
// Shadow layer // Shadow layer
if (widget.showShadows)
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),