Update input.dart

little optimalization