Spieler erstellen in CreateGroupView #43
@@ -118,6 +118,7 @@ class _CreateGroupViewState extends State<CreateGroupView> {
|
||||
),
|
||||
hintText: 'Search for players',
|
||||
trailingButtonShown: true,
|
||||
trailingButtonicon: Icons.add_circle,
|
||||
trailingButtonEnabled: _searchBarController.text
|
||||
.trim()
|
||||
.isNotEmpty,
|
||||
|
||||
@@ -6,15 +6,17 @@ class CustomSearchBar extends StatelessWidget {
|
||||
final String hintText;
|
||||
final ValueChanged<String>? onChanged;
|
||||
final BoxConstraints? constraints;
|
||||
final bool trailingButtonEnabled;
|
||||
final bool trailingButtonShown;
|
||||
final bool trailingButtonEnabled;
|
||||
final VoidCallback? onTrailingButtonPressed;
|
||||
final IconData trailingButtonicon;
|
||||
|
||||
const CustomSearchBar({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.hintText,
|
||||
this.trailingButtonShown = false,
|
||||
this.trailingButtonicon = Icons.clear,
|
||||
this.trailingButtonEnabled = true,
|
||||
this.onTrailingButtonPressed,
|
||||
this.onChanged,
|
||||
@@ -37,7 +39,7 @@ class CustomSearchBar extends StatelessWidget {
|
||||
child: GestureDetector(
|
||||
onTap: trailingButtonEnabled ? onTrailingButtonPressed : null,
|
||||
child: Icon(
|
||||
Icons.add_circle,
|
||||
trailingButtonicon,
|
||||
color: trailingButtonEnabled
|
||||
? null
|
||||
: Colors.grey.withValues(alpha: 0.2),
|
||||
|
||||
Reference in New Issue
Block a user