diff --git a/lib/views/home_screen.dart b/lib/views/home_screen.dart index 1a04d7b..79e44fb 100644 --- a/lib/views/home_screen.dart +++ b/lib/views/home_screen.dart @@ -12,7 +12,8 @@ class _HomeScreenState extends State { final TextEditingController _controller = TextEditingController(); void _handleInput(BuildContext context, String input) { - // Replace with your desired logic + final regex = RegExp(r'^[a-zA-Z\-]+$'); + if (input.isEmpty || regex.hasMatch(input) == false) { return; } ScaffoldMessenger.of(context).showSnackBar( SnackBar(content: Text('Checking profile of: $input')), );