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/material.dart';
|
||||||
import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
|
import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
|
||||||
|
|
||||||
import '../../Controller/account_controller.dart';
|
import '../../Controller/account_controller.dart';
|
||||||
import '../../Controller/recurring_transaction_controller.dart';
|
import '../../Controller/recurring_transaction_controller.dart';
|
||||||
import '../../Controller/transaction_controller.dart';
|
import '../../Controller/transaction_controller.dart';
|
||||||
|
import '../../Services/navigation_service.dart';
|
||||||
|
|
||||||
/// Ein Floating Action Button, der beim Klicken ein expandierendes Menü öffnet,
|
/// Ein Floating Action Button, der beim Klicken ein expandierendes Menü öffnet,
|
||||||
/// um neue Transaktionen oder Konten anzulegen.
|
/// um neue Transaktionen oder Konten anzulegen.
|
||||||
@@ -80,15 +83,32 @@ class _FloatingCreationButtonState extends State<FloatingCreationButton> {
|
|||||||
required final String label,
|
required final String label,
|
||||||
required final IconData icon,
|
required final IconData icon,
|
||||||
required final VoidCallback onPressed,
|
required final VoidCallback onPressed,
|
||||||
}) => GestureDetector(
|
}) {
|
||||||
|
final ThemeData theme = Theme.of(
|
||||||
|
NavigationService.getCurrentBuildContext()!,
|
||||||
|
);
|
||||||
|
|
||||||
|
return GestureDetector(
|
||||||
onTap: onPressed,
|
onTap: onPressed,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
ClipRRect(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
decoration: BoxDecoration(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),
|
child: Text(label),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
FloatingActionButton.small(
|
FloatingActionButton.small(
|
||||||
heroTag: null,
|
heroTag: null,
|
||||||
@@ -105,4 +125,5 @@ class _FloatingCreationButtonState extends State<FloatingCreationButton> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user