may-andro / flutter-resume-making-and-sharing-app

A resume creating application in flutter for android and ios
MIT License
24 stars 11 forks source link

Trouble with context.inheritFromWidgetOfExactType #1

Open sashicus opened 3 years ago

sashicus commented 3 years ago

Please help to run application

Waiting for connection from debug service on Chrome...
lib/screen/resume_maker/bloc/bloc_provider.dart:18:21: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
 - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/C:/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
    return (context.inheritFromWidgetOfExactType(ResumeMakerBlocProvider) as ResumeMakerBlocProvider).bloc;
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/screen/add_education/bloc/bloc_provider.dart:18:21: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
 - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/C:/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
    return (context.inheritFromWidgetOfExactType(AddEducationBlocProvider) as AddEducationBlocProvider).bloc;
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/screen/add_experience/bloc/bloc_provider.dart:18:21: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
 - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/C:/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
    return (context.inheritFromWidgetOfExactType(AddExperienceBlocProvider) as AddExperienceBlocProvider).bloc;
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/screen/add_language/bloc/bloc_provider.dart:18:21: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
 - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/C:/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
    return (context.inheritFromWidgetOfExactType(AddLanguageBlocProvider) as AddLanguageBlocProvider).bloc;
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/screen/add_project/bloc/bloc_provider.dart:18:21: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
 - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/C:/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
    return (context.inheritFromWidgetOfExactType(AddProjectBlocProvider) as AddProjectBlocProvider).bloc;
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Failed to compile application.
yassalahmad commented 3 years ago

same... any solution for this?