Slide 1
Most trusted JOB oriented professional program
DevOps Certified Professional (DCP)

Take your first step into the world of DevOps with this course, which will help you to learn about the methodologies and tools used to develop, deploy, and operate high-quality software.

Slide 2
DevOps to DevSecOps – Learn the evolution
DevSecOps Certified Professional (DSOCP)

Learn to automate security into a fast-paced DevOps environment using various open-source tools and scripts.

Slide 2
Get certified in the new tech skill to rule the industry
Site Reliability Engineering (SRE) Certified Professional

A method of measuring and achieving reliability through engineering and operations work – developed by Google to manage services.

Slide 2
Master the art of DevOps
Master in DevOps Engineering (MDE)

Get enrolled for the most advanced and only course in the WORLD which can make you an expert and proficient Architect in DevOps, DevSecOps and Site Reliability Engineering (SRE) principles together.

Slide 2
Gain expertise and certified yourself
Azure DevOps Solutions Expert

Learn about the DevOps services available on Azure and how you can use them to make your workflow more efficient.

Slide 3
Learn and get certified
AWS Certified DevOps Professional

Learn about the DevOps services offered by AWS and how you can use them to make your workflow more efficient.

previous arrow
next arrow

[Solved] Flutter : Error: The getter ‘subhead’ isn’t defined for the class ‘TextTheme’ from package:flutter/src/material/text_theme.dart’ – searchable_dropdown

Spread the Knowledge

ERROR

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/searchable_dropdown-1.1.3/lib/searchable_dropdown.dart:371:41: Error: The getter 'subhead' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/src/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subhead'.
          ? Theme.of(context).textTheme.subhead
                                        ^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/searchable_dropdown-1.1.3/lib/searchable_dropdown.dart:374:16: Error: The getter 'subhead' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/src/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subhead'.
              .subhead

FAILURE: Build failed with an exception.

* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit v  alue 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 42s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

SOLUTION

There are Two Solutions for this error

  1. Use Alternative Package
  2. Do some changes in .pub-cache

Use Alternative Package

I switched from searchable_dropdown to search_choices and it works OK. Since both packages show similar functionality, should we keep this issue open?

Source (githubmemory.com) :- https://githubmemory.com/repo/icemanbsi/searchable_dropdown/issues/15

Do some changes in .pub-cache

To fix this issue you have to make some changes in searchable_dropdown.dart

First, go to C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/searchable_dropdown-1.1.3/lib/searchable_dropdown.dart

Click CTRL + Mouse Left Go To The “.subhead” And Replace It With “.subtitle1” Or Just Copy Paste This

TextStyle get _textStyle =>
widget.style ??
(_enabled && !(widget.readOnly ?? false)
? Theme.of(context).textTheme.subtitle1
: Theme.of(context)
.textTheme
.subtitle1
.copyWith(color: _disabledIconColor));