最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

flutter - flutter_bloc persistent errors - Stack Overflow

programmeradmin5浏览0评论

I have been working on an a Flutter app using Flutter_bloc, testing it multiple times per day no problem, tonight and after performing 'flutter pub upgrade' I got this errors; no matter what I do, the errors persist, created totally fresh project with sample counter to test - the same errors, I deleted the entire cache where packages are kept - nothing worked ... what is happening? I am totally stuck

:
 Superclass has no constructor named 'MultiProvider'.
  }) 
:
 super(key
:
 key, providers
:
 listeners, child
:
 child);
       ^^^^^
pub-cache/hosted/pub.dev/flutter_bloc-9.1.0/lib/src/multi_bloc_provider.dart:57:8: Error
:
 Superclass has no constructor named 'MultiProvider'.
  }) 
:
 super(key
:
 key, providers
:
 providers, child
:
 child);
       ^^^^^
pub-cache/hosted/pub.dev/flutter_bloc-9.1.0/lib/src/multi_repository_provider.dart:51:8: Error
:
 Superclass has no constructor named 'MultiProvider'.
  }) 
:
 super(key
:
 key, providers
:
 providers, child
:
 child);
       ^^^^^```

I have been working on an a Flutter app using Flutter_bloc, testing it multiple times per day no problem, tonight and after performing 'flutter pub upgrade' I got this errors; no matter what I do, the errors persist, created totally fresh project with sample counter to test - the same errors, I deleted the entire cache where packages are kept - nothing worked ... what is happening? I am totally stuck

:
 Superclass has no constructor named 'MultiProvider'.
  }) 
:
 super(key
:
 key, providers
:
 listeners, child
:
 child);
       ^^^^^
pub-cache/hosted/pub.dev/flutter_bloc-9.1.0/lib/src/multi_bloc_provider.dart:57:8: Error
:
 Superclass has no constructor named 'MultiProvider'.
  }) 
:
 super(key
:
 key, providers
:
 providers, child
:
 child);
       ^^^^^
pub-cache/hosted/pub.dev/flutter_bloc-9.1.0/lib/src/multi_repository_provider.dart:51:8: Error
:
 Superclass has no constructor named 'MultiProvider'.
  }) 
:
 super(key
:
 key, providers
:
 providers, child
:
 child);
       ^^^^^```
Share Improve this question asked Mar 27 at 0:29 seza seza 235 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 3

Just do a flutter pub upgrade again.

The provider 6.1.4 version has a fix for this, the previous version had the error. You can check here:
https://pub.dev/packages/provider/changelog

Or set the provider: ^6.1.4 in your pubspec.yaml file.

发布评论

评论列表(0)

  1. 暂无评论