Error compiling with Flutter v2.3
katutxakurra opened this issue · comments
Trying to test this project, latest flutter gave me errors so I downgraded flutter to a version close to the last commit in this repo, June 2020, commit 15a28159bcf4b3db13411cbc8d9b5fc51adc0a93.
I'm still getting the following compilation error, any help to solve them would be much appreciated.
katu@jeff:~/src/katutxakurra/multi_camera_dashboard$ flutter run
Running "flutter pub get" in multi_camera_dashboard... 621ms
Launching lib/main.dart on Chrome in debug mode...
lib/ui/views/HomeView.dart:35:7: Error: No named parameter with the name
'resizeToAvoidBottomPadding'.
resizeToAvoidBottomPadding: false,
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/google/flutter/packages/flutter/lib/src/material/scaffold.dart:1643:9: Context: Found this
candidate, but the arguments don't match.
const Scaffold({
^^^^^^^^
../../../.pub-cache/hosted/pub.dartlang.org/provider-3.2.0/lib/src/delegate_widget.dart:194:18:
Error: Superclass has no method named 'inheritFromElement'.
return super.inheritFromElement(ancestor, aspect: aspect);
^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dartlang.org/provider-3.2.0/lib/src/provider.dart:259:19: Error:
The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
- 'BuildContext' is from 'package:flutter/src/widgets/framework.dart'
('/opt/google/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'.
? context.inheritFromWidgetOfExactType(type) as InheritedProvider
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dartlang.org/provider-3.2.0/lib/src/provider.dart:260:19: Error:
The method 'ancestorInheritedElementForWidgetOfExactType' isn't defined for the class
'BuildContext'. - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart'
('/opt/google/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named
'ancestorInheritedElementForWidgetOfExactType'.
: context.ancestorInheritedElementForWidgetOfExactType(type)?.widget
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unhandled exception:
NoSuchMethodError: The getter 'name' was called on null.
Receiver: null
Tried calling: name
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:63:5)
#1 ProgramCompiler._emitSuperTarget
(package:dev_compiler/src/kernel/compiler.dart:5254:41)
#2 ProgramCompiler.visitSuperMethodInvocation
(package:dev_compiler/src/kernel/compiler.dart:5247:24)
#3 SuperMethodInvocation.accept (package:kernel/ast.dart:6200:44)
#4 ProgramCompiler._visitExpression
(package:dev_compiler/src/kernel/compiler.dart:3755:20)
#5 ProgramCompiler.visitAsExpression
(package:dev_compiler/src/kernel/compiler.dart:5832:18)
#6 AsExpression.accept (package:kernel/ast.dart:7392:44)
#7 ProgramCompiler._visitExpression
(package:dev_compiler/src/kernel/compiler.dart:3755:20)
#8 ProgramCompiler.visitReturnStatement
(package:dev_compiler/src/kernel/compiler.dart:4285:38)
#9 ReturnStatement.accept (package:kernel/ast.dart:9664:43)
#10 ProgramCompiler._visitStatement (package:dev_compiler/src/kernel/compiler.dart:3661:20)
#11 MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31)
#12 ListIterator.moveNext (dart:_internal/iterable.dart:342:26)
#13 new _GrowableList._ofEfficientLengthIterable
(dart:core-patch/growable_array.dart:188:27)
#14 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#15 new List.of (dart:core-patch/array_patch.dart:50:28)
#16 ListIterable.toList (dart:_internal/iterable.dart:213:44)
#17 ProgramCompiler.visitBlock (package:dev_compiler/src/kernel/compiler.dart:3849:62)
#18 Block.accept (package:kernel/ast.dart:8685:43)
#19 ProgramCompiler._visitStatement (package:dev_compiler/src/kernel/compiler.dart:3661:20)
#20 ProgramCompiler._emitFunctionScopedBody
(package:dev_compiler/src/kernel/compiler.dart:3694:18)
#21 ProgramCompiler._emitSyncFunctionBody.
(package:dev_compiler/src/kernel/compiler.dart:3465:17)
#22 ProgramCompiler._withLetScope (package:dev_compiler/src/kernel/compiler.dart:2274:25)
#23 ProgramCompiler._withCurrentFunction
(package:dev_compiler/src/kernel/compiler.dart:3499:18)
#24 ProgramCompiler._emitSyncFunctionBody
(package:dev_compiler/src/kernel/compiler.dart:3461:17)
#25 ProgramCompiler._emitFunction (package:dev_compiler/src/kernel/compiler.dart:3278:11)
#26 ProgramCompiler._emitMethodDeclaration
(package:dev_compiler/src/kernel/compiler.dart:1882:12)
#27 ProgramCompiler._emitClassMethods
(package:dev_compiler/src/kernel/compiler.dart:1823:23)
#28 ProgramCompiler._emitClassDeclaration
(package:dev_compiler/src/kernel/compiler.dart:670:21)
#29 ProgramCompiler._emitClass (package:dev_compiler/src/kernel/compiler.dart:592:21)
#30 List.forEach (dart:core-patch/growable_array.dart:403:8)
#31 ProgramCompiler._emitLibrary (package:dev_compiler/src/kernel/compiler.dart:541:23)
#32 List.forEach (dart:core-patch/growable_array.dart:403:8)
#33 ProgramCompiler.emitModule (package:dev_compiler/src/kernel/compiler.dart:401:15)
#34 JavaScriptBundler.compile (package:frontend_server/src/javascript_bundle.dart:152:33)
• No issues found!
@katutxakurra Can you try now. I fixed this.