Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: The getter 'primaryColorBrightness' isn't defined for the type 'ThemeData'. #112

Open
SenayGebre opened this issue Sep 22, 2023 · 2 comments

Comments

@SenayGebre
Copy link

No description provided.

@askankit
Copy link

askankit commented Oct 6, 2023

./../.pub-cache/hosted/pub.dev/hashtagable-2.3.0+1/lib/widgets/hashtag_text_field.dart:1202:44: Error: The getter 'primaryColorBrightness' isn't defined for the class 'ThemeData'.
 - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../Downloads/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'primaryColorBrightness'.
        widget.keyboardAppearance ?? theme.primaryColorBrightness;
                                           ^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

* Where:
Script '/Users/parasmac/Downloads/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1297

This Is what I get My Flutter version-
Flutter (Channel stable, 3.13.6, on macOS 14.0 23A344 darwin-arm64, locale en-IN)

@margorski
Copy link

With Flutter 3.10 ThemeData.primaryColorBrightness was removed. An easy fix is to change it to ThemeData.brightness.

I've created a pull request with the fix. I hope the author will pull that and prepare a new version with fix. If not I'll fork this repository for further usage.

Here is PR: #115
Until author release new version you may use fixed version from my repository: https://github.com/margorski/hashtagable
As this library is not published in pub.dev you need to point in your pubspec.yaml directly to repository.

It should looks like this in your pubspec.yaml:
hashtagable: git: url: https://github.com/margorski/hashtagable.git ref: 69ae9bbf7985c3dfd9b0617767fe4b09e7bb0664

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants