Spieler erstellen in CreateGroupView #43

Merged
flixcoo merged 9 commits from feature/42-spieler-erstellen-in-create-group-view-implementieren into development 2025-11-20 21:18:21 +00:00
Showing only changes of commit fa0e9a5dfd - Show all commits

View File

@@ -6,11 +6,17 @@ class CustomSearchBar extends StatelessWidget {
final String hintText; final String hintText;
final ValueChanged<String>? onChanged; final ValueChanged<String>? onChanged;
final BoxConstraints? constraints; final BoxConstraints? constraints;
final bool trailingButtonEnabled;
final bool trailingButtonShown;
final VoidCallback? onTrailingButtonPressed;
const CustomSearchBar({ const CustomSearchBar({
super.key, super.key,
required this.controller, required this.controller,
required this.hintText, required this.hintText,
this.trailingButtonShown = false,
this.trailingButtonEnabled = true,
this.onTrailingButtonPressed,
this.onChanged, this.onChanged,
this.constraints, this.constraints,
}); });
@@ -25,6 +31,20 @@ class CustomSearchBar extends StatelessWidget {
onChanged: onChanged, onChanged: onChanged,
hintStyle: WidgetStateProperty.all(const TextStyle(fontSize: 16)), hintStyle: WidgetStateProperty.all(const TextStyle(fontSize: 16)),
leading: const Icon(Icons.search), leading: const Icon(Icons.search),
trailing: trailingButtonShown
sneeex marked this conversation as resolved Outdated

Lieber mit Visibility() Widget lösen

Lieber mit `Visibility()` Widget lösen
? [
GestureDetector(
onTap: onTrailingButtonPressed,
child: Icon(
Icons.add_circle,
color: trailingButtonEnabled
? null
: Colors.grey.withValues(alpha: 0.2),
),
),
SizedBox(width: 5),
]
: null,
backgroundColor: WidgetStateProperty.all(CustomTheme.boxColor), backgroundColor: WidgetStateProperty.all(CustomTheme.boxColor),
side: WidgetStateProperty.all(BorderSide(color: CustomTheme.boxBorder)), side: WidgetStateProperty.all(BorderSide(color: CustomTheme.boxBorder)),
shape: WidgetStateProperty.all( shape: WidgetStateProperty.all(