Maximale Input in Textfelder gefixtx #176

Merged
sneeex merged 3 commits from hotifx/fix-input-length into development 2026-01-18 13:49:53 +00:00
Showing only changes of commit 94c3bad02b - Show all commits

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:game_tracker/core/custom_theme.dart'; import 'package:game_tracker/core/custom_theme.dart';
class TextInputField extends StatelessWidget { class TextInputField extends StatelessWidget {
@@ -33,11 +34,14 @@ class TextInputField extends StatelessWidget {
controller: controller, controller: controller,
onChanged: onChanged, onChanged: onChanged,
maxLength: maxLength, maxLength: maxLength,
maxLengthEnforcement: MaxLengthEnforcement.truncateAfterCompositionEnds,
decoration: InputDecoration( decoration: InputDecoration(
filled: true, filled: true,
fillColor: CustomTheme.boxColor, fillColor: CustomTheme.boxColor,
hintText: hintText, hintText: hintText,
hintStyle: const TextStyle(fontSize: 18), hintStyle: const TextStyle(fontSize: 18),
// Hides the character counter
counterText: '',
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: const BorderRadius.all(Radius.circular(12)), borderRadius: const BorderRadius.all(Radius.circular(12)),
borderSide: BorderSide(color: CustomTheme.boxBorder), borderSide: BorderSide(color: CustomTheme.boxBorder),