InputDecoration does not match InputDecorationTheme

A InputDecoration was provided to a TextField that does not match the InputDecorationTheme.

Quick Answer

The InputDecoration has properties that conflict with the theme's InputDecorationTheme.

Why This Happens

In Flutter, when you provide an InputDecoration to a TextField, it merges with the InputDecorationTheme from the theme. If there are conflicts (like setting both border and the theme's border differently), unexpected behavior or errors can occur. Use copyWith to extend the theme.

The Problem

TextField(
  decoration: InputDecoration(
    border: OutlineInputBorder(), // Conflicts with theme
    fillColor: Colors.white,
  ),
)

The Fix

TextField(
  decoration: InputDecoration(
    border: OutlineInputBorder(),
    fillColor: Colors.white,
    filled: true,
  ),
)

Step-by-Step Fix

  1. 1

    Identify the error

    Look at the InputDecoration mismatch warning or unexpected visual behavior in TextFields.

  2. 2

    Find the cause

    Check if the InputDecoration conflicts with the app's InputDecorationTheme defined in ThemeData.

  3. 3

    Apply the fix

    Use the theme's decoration as a base and override only the properties you need, or update the theme to match.

Bugsly catches this automatically

Bugsly's AI analyzes this error pattern in real-time, explains what went wrong in plain English, and suggests the exact fix — before your users even report it.

Try Bugsly free