Skip to content

method 'setMockMethodCallHandler' isn't defined ; & The getter 'subhead' and 'body2' isn't defined for the class 'TextTheme'. #34

@RajuNarula369

Description

@RajuNarula369

/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/lib/shared_preferences.dart:146:15:
Error: The method 'setMockMethodCallHandler' isn't defined for the class 'MethodChannel'.

  • 'MethodChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/services/platform_channel.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'setMockMethodCallHandler'.
    _kChannel.setMockMethodCallHandler((MethodCall methodCall) async {
    ^^^^^^^^^^^^^^^^^^^^^^^^
    lib/tabs.dart:206:32: Error: The getter 'body2' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/src/flutter/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 'body2'.
    .body2
    ^^^^^
    lib/tabs.dart:288:62: Error: The getter 'subhead' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/src/flutter/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'.
    style: Theme.of(context).textTheme.subhead,
    ^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions