Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

2.2: TextFormField's Suffix , Prefix, Icon and Label don't respond to Primary Color's Change. #83002

Closed
Assignees
HansMuller
Labels
a: typographyText rendering, possibly libtxtc: regressionIt was better in the past than it is nowf: material designflutter/packages/flutter/material repository.found in release: 2.2Found to occur in 2.2frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: solvedIssue is closed as solved
@berkbb

Description

@berkbb

Hi,

Changing the primary color for main theme in main. dart linke this , affects TextFormField's Suffix , Prefix, Icon and Label focus color normally in previous versions:

theme: ThemeData(        visualDensity: VisualDensity.adaptivePlatformDensity,        primaryColor:            Color.fromRGBO(181, 82, 158, 1), // https://www.colorhexa.com/b5529e),

My example TextFormField is:

TextFormField(                                    controller: idController,                                    // The validator receives the text that the user has entered.                                    validator: (value) {                                      if (value == null ||                                          value.isEmpty ||                                          int.tryParse(value) == null ||                                          value.length != 11) {                                        return 'Hello.';                                      }                                      return null;                                    },                                    obscureText: obscureID,                                    inputFormatters: [                                      FilteringTextInputFormatter.digitsOnly                                    ],                                    maxLength: 11,                                    keyboardType: TextInputType.number,                                    textInputAction: TextInputAction.next,                                    onEditingComplete: () =>                                        node.nextFocus(), // Move focus to next                                    decoration: InputDecoration(                                                                            icon: Icon(Icons.badge),                                                                         labelText: 'Hello',                                      suffixIcon: Tooltip(                                        message: 'Show Hello',                                        child: IconButton(                                          onPressed: () {                                            setState(() {                                              obscureID = !obscureID;                                            });                                          },                                          icon: Icon(Icons.remove_red_eye),                                        ),                                      ),                                    ),                                  ),

However, always blue color comes while focusing, I can change border color of field with modifying the InputDecorationTheme like this, but it not run on Suffix , Prefix, Icon and Label focused colors:

   inputDecorationTheme: InputDecorationTheme(  focusedBorder:OutlineInputBorder(          borderSide: const BorderSide(color:    Color.fromRGBO(181, 82, 158, 1),               width: 2.0),        ),hoverColor: Color.fromRGBO(226,226, 226, 0.3),          filled: true,          fillColor: Colors.white,          border: OutlineInputBorder(),        ),

Screenshots (You can see the blue color, I expected that a purple-ish color based on primary color)

image
image

Flutter Analyze (Caused from web file picker):

 info • Don't import implementation files from another package • lib/generated_plugin_registrant.dart:7:8 • implementation_imports1 issue found. (ran in 3.7s)

Flutter Doctor:

[✓] Flutter (Channel stable, 2.2.0, on Mac OS X 10.15.7 19H1030 darwin-x64, locale tr-TR)    • Flutter version 2.2.0 at /Users/berkbabadogan/FlutterSDK    • Framework revision b22742018b (5 days ago), 2021-05-14 19:12:57 -0700    • Engine revision a9d88a4d18    • Dart version 2.13.0[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)    • Android SDK at /Users/berkbabadogan/AndroidSDK    • Platform android-S, build-tools 30.0.3    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)    • All Android licenses accepted.[✓] Xcode - develop for iOS and macOS    • Xcode at /Applications/Xcode.app/Contents/Developer    • Xcode 12.4, Build version 12D4e    • CocoaPods version 1.10.0[✓] Chrome - develop for the web    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome[✓] Android Studio (version 4.1)    • Android Studio at /Applications/Android Studio.app/Contents    • Flutter plugin can be installed from:      🔨 https://plugins.jetbrains.com/plugin/9212-flutter    • Dart plugin can be installed from:      🔨 https://plugins.jetbrains.com/plugin/6351-dart    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)[✓] VS Code (version 1.56.2)    • VS Code at /Applications/Visual Studio Code.app/Contents    • Flutter extension version 3.22.0[✓] Connected device (2 available)    • macOS (desktop) • macos  • darwin-x64     • Mac OS X 10.15.7 19H1030 darwin-x64    • Chrome (web)    • chrome • web-javascript • Google Chrome 90.0.4430.212• No issues found!

Bug.zip athere.

Metadata

Metadata

Assignees

Labels

a: typographyText rendering, possibly libtxtc: regressionIt was better in the past than it is nowf: material designflutter/packages/flutter/material repository.found in release: 2.2Found to occur in 2.2frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: solvedIssue is closed as solved

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp