Feat: Macht Hintergrund der FloatingCreationButtons leicht geblurrt für bessere Lesbarkeit
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
|
||||
|
||||
import '../../Controller/account_controller.dart';
|
||||
import '../../Controller/recurring_transaction_controller.dart';
|
||||
import '../../Controller/transaction_controller.dart';
|
||||
import '../../Services/navigation_service.dart';
|
||||
|
||||
/// Ein Floating Action Button, der beim Klicken ein expandierendes Menü öffnet,
|
||||
/// um neue Transaktionen oder Konten anzulegen.
|
||||
@@ -80,15 +83,32 @@ class _FloatingCreationButtonState extends State<FloatingCreationButton> {
|
||||
required final String label,
|
||||
required final IconData icon,
|
||||
required final VoidCallback onPressed,
|
||||
}) => GestureDetector(
|
||||
}) {
|
||||
final ThemeData theme = Theme.of(
|
||||
NavigationService.getCurrentBuildContext()!,
|
||||
);
|
||||
|
||||
return GestureDetector(
|
||||
onTap: onPressed,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 6, sigmaY: 6),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 8,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.onPrimary.withValues(alpha: 0.15),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Text(label),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
FloatingActionButton.small(
|
||||
heroTag: null,
|
||||
@@ -106,3 +126,4 @@ class _FloatingCreationButtonState extends State<FloatingCreationButton> {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user