Reputation: 21
I just had to take over a Flutter project from some devs I have no contact with ... Flutter doctor all checks out ... The error are all in pub-cache. I tried flutter clean, flutter pub get ... Here is the start of the errors ...
"Note:
C:\Users\justi\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\agora_rtc_engine-1.0.15\android\src\main\java\io\agora\agorartcengine\AgoraRtcEnginePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\justi\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\agora_rtc_engine-1.0.15\android\src\main\java\io\agora\agorartcengine\AgoraRtcEnginePlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. /C:/Users/justi/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/circular_check_box-1.0.4/lib/circular_check_box.dart:328:39: Error: Type 'RenderToggleable' not found. class _RenderCircularCheckBox extends RenderToggleable { ^^^^^^^^^^^^^^^^ /C:/Users/justi/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/photo-0.4.8/lib/src/ui/widget/check_box_copy.dart:216:31: Error: Type 'RenderToggleable' not found. class _RenderCheckbox extends RenderToggleable { ^^^^^^^^^^^^^^^^ /C:/Users/justi/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/photo-0.4.8/lib/src/ui/widget/check_box_copy.dart:187:19: Error: The return type of the method '_CheckboxRenderObjectWidget.createRenderObject' is '_RenderCheckbox', which does not match the return type, 'RenderObject', of the overridden method, 'RenderObjectWidget.createRenderObject'.
- '_RenderCheckbox' is from 'package:photo/src/ui/widget/check_box_copy.dart' ('/C:/Users/justi/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/photo-0.4.8/lib/src/ui/widget/check_box_copy.dart').
- 'RenderObject' is from 'package:flutter/src/rendering/object.dart' ('/C:/flutter/packages/flutter/lib/src/rendering/object.dart')."
Upvotes: 2
Views: 4522
Reputation: 188
You can try different things:
flutter pub cache repair
C:/Users/justi/AppData/Local/Pub/Cache
folder. (You can create a backup folder if you feel hesitant).Upvotes: 3
Reputation: 1
In newer version of flutter RenderToggleable class was removed and this causing problem.
https://github.com/flutter/flutter/pull/76745
Upvotes: 0