dart-archive / tflite_native

A Dart interface to TensorFlow Lite (tflite) through dart:ffi
https://pub.dev/packages/tflite_native
BSD 3-Clause "New" or "Revised" License
124 stars 18 forks source link

Not compatible with current dart:ffi #43

Open Khalid-Nowaf opened 4 years ago

Khalid-Nowaf commented 4 years ago
Compiler message:
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/utf8.dart:9:20: Error: Expected 0 type arguments.
class Utf8 extends Struct<Utf8> {                                       
                   ^                                                    
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/buffer.dart:10:22: Error: Expected 0 type arguments.
class Buffer extends Struct<Buffer> {                                   
                     ^                                                  
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/types.dart:8:31: Error: Expected 0 type arguments.
class TFL_Interpreter extends Struct<TFL_Interpreter> {}                
                              ^                                         
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/types.dart:11:38: Error: Expected 0 type arguments.
class TFL_InterpreterOptions extends Struct<TFL_InterpreterOptions> {}  
                                     ^                                  
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/types.dart:14:25: Error: Expected 0 type arguments.
class TFL_Model extends Struct<TFL_Model> {}                            
                        ^                                               
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/types.dart:17:26: Error: Expected 0 type arguments.
class TFL_Tensor extends Struct<TFL_Tensor> {}                          
                         ^                                              
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/bindings.dart:10:26: Error: Type argument 'Utf8' doesn't conform
to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'Utf8' is from 'package:tflite_native/src/bindings/utf8.dart'        
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/utf8.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
Pointer<Utf8> Function() TFL_Version = tflitelib                        
                         ^                                              
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/utf8.dart:14:30: Error: Type argument 'Utf8' doesn't conform to
the bound 'NativeType' of the type variable 'T' on 'Pointer' in the return type.
 - 'Utf8' is from 'package:tflite_native/src/bindings/utf8.dart'        
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/utf8.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
  static Pointer<Utf8> toUtf8(String str) {                             
                             ^                                          
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/utf8.dart:25:40: Error: Type argument 'Utf8' doesn't conform to
the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'Utf8' is from 'package:tflite_native/src/bindings/utf8.dart'        
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/utf8.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
  static String fromUtf8(Pointer<Utf8> ptr) {                           
                                       ^                                
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/model.dart:20:31: Error: Type argument 'TFL_Model' doesn't conform to the
bound 'NativeType' of the type variable 'T' on 'Pointer' in the return type.
 - 'TFL_Model' is from 'package:tflite_native/src/bindings/types.dart'  
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
  Pointer<TFL_Model> get base => _model;                                
                              ^                                         
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/model.dart:17:28: Error: Type argument 'TFL_Model' doesn't conform to the
bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Model' is from 'package:tflite_native/src/bindings/types.dart'  
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
  final Pointer<TFL_Model> _model;                                      
                           ^                                            
....
....
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/tensor.dart:18:29: Error: Type argument 'TFL_Tensor' doesn't conform to
the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Tensor' is from 'package:tflite_native/src/bindings/types.dart' 
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
  final Pointer<TFL_Tensor> _tensor;                                    
                            ^                                           
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/buffer.dart:15:38: Error: Type argument 'Buffer' doesn't conform
to the bound 'NativeType' of the type variable 'T' on 'Pointer' in the return
type.
 - 'Buffer' is from 'package:tflite_native/src/bindings/buffer.dart'    
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/buffer.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
  static Pointer<Buffer> fromByteData(ByteData byteData) {              
                                     ^                                  
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/model.dart:13:61: Error: Type argument 'Buffer' doesn't conform
to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'Buffer' is from 'package:tflite_native/src/bindings/buffer.dart'    
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/buffer.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
Pointer<TFL_Model> Function(Pointer<Buffer> data, int size) TFL_NewModel =
                                                            ^           
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/model.dart:13:61: Error: Type argument 'TFL_Model' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Model' is from 'package:tflite_native/src/bindings/types.dart'  
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
Pointer<TFL_Model> Function(Pointer<Buffer> data, int size) TFL_NewModel =
                                                            ^           
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/model.dart:21:49: Error: Type argument 'Utf8' doesn't conform to
the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'Utf8' is from 'package:tflite_native/src/bindings/utf8.dart'        
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/utf8.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
Pointer<TFL_Model> Function(Pointer<Utf8> path) TFL_NewModelFromFile = tflitelib
                                                ^                       
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/model.dart:21:49: Error: Type argument 'TFL_Model' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Model' is from 'package:tflite_native/src/bindings/types.dart'  
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
Pointer<TFL_Model> Function(Pointer<Utf8> path) TFL_NewModelFromFile = tflitelib
                                                ^                       
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/model.dart:29:35: Error: Type argument 'TFL_Model' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Model' is from 'package:tflite_native/src/bindings/types.dart'  
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
void Function(Pointer<TFL_Model>) TFL_DeleteModel = tflitelib           
                                  ^                                     
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/interpreter.dart:22:59: Error: Type argument 'TFL_Model' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Model' is from 'package:tflite_native/src/bindings/types.dart'  
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
        Pointer<TFL_InterpreterOptions> optional_options) TFL_NewInterpreter =
                                                          ^             
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/interpreter.dart:22:59: Error: Type argument
'TFL_InterpreterOptions' doesn't conform to the bound 'NativeType' of the type
variable 'T' on 'Pointer'.
 - 'TFL_InterpreterOptions' is from                                     
 'package:tflite_native/src/bindings/types.dart'
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
        Pointer<TFL_InterpreterOptions> optional_options) TFL_NewInterpreter =
                                                          ^             
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/interpreter.dart:22:59: Error: Type argument 'TFL_Interpreter'
doesn't conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Interpreter' is from 'package:tflite_native/src/bindings/types.dart'
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
        Pointer<TFL_InterpreterOptions> optional_options) TFL_NewInterpreter =
                                                          ^             
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/interpreter.dart:31:41: Error: Type argument 'TFL_Interpreter'
doesn't conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Interpreter' is from 'package:tflite_native/src/bindings/types.dart'
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
void Function(Pointer<TFL_Interpreter>) TFL_DeleteInterpreter = tflitelib
                                        ^                               
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/interpreter.dart:39:40: Error: Type argument 'TFL_Interpreter'
doesn't conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Interpreter' is from 'package:tflite_native/src/bindings/types.dart'
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
int Function(Pointer<TFL_Interpreter>) TFL_InterpreterGetInputTensorCount =
                                       ^                                
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/interpreter.dart:52:5: Error: Type argument 'TFL_Interpreter'
doesn't conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Interpreter' is from 'package:tflite_native/src/bindings/types.dart'
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
    TFL_InterpreterGetInputTensor = tflitelib                           
    ^                                                                   
.....
....
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/interpreter_options.dart:47:3: Error: Type argument 'Utf8'
doesn't conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'Utf8' is from 'package:tflite_native/src/bindings/utf8.dart'        
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/utf8.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
) TFL_InterpreterOptionsSetErrorReporter = tflitelib                    
  ^                                                                     
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/tensor.dart:12:45: Error: Type argument 'TFL_Tensor' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Tensor' is from 'package:tflite_native/src/bindings/types.dart' 
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
TFL_Type TFL_TensorType(Pointer<TFL_Tensor> t) =>                       
                                            ^                           
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/tensor.dart:14:35: Error: Type argument 'TFL_Tensor' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Tensor' is from 'package:tflite_native/src/bindings/types.dart' 
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
int Function(Pointer<TFL_Tensor>) _TFL_TensorType = tflitelib           
                                  ^                                     
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/tensor.dart:21:35: Error: Type argument 'TFL_Tensor' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Tensor' is from 'package:tflite_native/src/bindings/types.dart' 
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
int Function(Pointer<TFL_Tensor>) TFL_TensorNumDims = tflitelib         
                                  ^                                     
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/tensor.dart:29:57: Error: Type argument 'TFL_Tensor' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Tensor' is from 'package:tflite_native/src/bindings/types.dart' 
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
int Function(Pointer<TFL_Tensor> tensor, int dim_index) TFL_TensorDim = 
                                                        ^               
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/tensor.dart:37:35: Error: Type argument 'TFL_Tensor' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Tensor' is from 'package:tflite_native/src/bindings/types.dart' 
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
int Function(Pointer<TFL_Tensor>) TFL_TensorByteSize = tflitelib        
                                  ^                                     
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/tensor.dart:48:45: Error: Type argument 'TFL_Tensor' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Tensor' is from 'package:tflite_native/src/bindings/types.dart' 
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
Pointer<Void> Function(Pointer<TFL_Tensor>) TFL_TensorData = tflitelib  
                                            ^                           
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/tensor.dart:54:45: Error: Type argument 'TFL_Tensor' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Tensor' is from 'package:tflite_native/src/bindings/types.dart' 
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
Pointer<Utf8> Function(Pointer<TFL_Tensor>) TFL_TensorName = tflitelib  
                                            ^                           
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/tensor.dart:54:45: Error: Type argument 'Utf8' doesn't conform
to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'Utf8' is from 'package:tflite_native/src/bindings/utf8.dart'        
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/utf8.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
Pointer<Utf8> Function(Pointer<TFL_Tensor>) TFL_TensorName = tflitelib  
                                            ^                           
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/tensor.dart:66:3: Error: Type argument 'TFL_Tensor' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Tensor' is from 'package:tflite_native/src/bindings/types.dart' 
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
) TFL_TensorCopyFromBuffer = tflitelib                                  
  ^                                                                     
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/tensor.dart:83:3: Error: Type argument 'TFL_Tensor' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'TFL_Tensor' is from 'package:tflite_native/src/bindings/types.dart' 
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/types.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
) TFL_TensorCopyToBuffer = tflitelib                                    
  ^                                                                     
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/bindings.dart:11:6: Error: Type argument 'Utf8' doesn't conform
to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'Utf8' is from 'package:tflite_native/src/bindings/utf8.dart'        
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/utf8.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try changing type arguments so that they conform to the bounds.         
    .lookup<NativeFunction<_TFL_Version_native_t>>('TFL_Version')       
     ^                                                                  
../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51b/l
ib/src/bindings/bindings.dart:12:6: Error: Inferred type argument 'Utf8' doesn't
conform to the bound 'NativeType' of the type variable 'T' on 'Pointer'.
 - 'Utf8' is from 'package:tflite_native/src/bindings/utf8.dart'        
 ('../../../.pub-cache/git/tflite_native-d2458d1a7590845ed5f440239a193c19d0eba51
 b/lib/src/bindings/utf8.dart').
 - 'NativeType' is from 'dart:ffi'.                                     
Try specifying type arguments explicitly so that they conform to the bounds.
    .asFunction();                                                      
     ^                                                                  
...
...
devoncarew commented 4 years ago

cc @bwilkerson

@Khalid-Nowaf - what version of dart are you using?

Khalid-Nowaf commented 4 years ago

@devoncarew I'm using Dart 2.7.0

bwilkerson commented 4 years ago

Does version 0.2.3 work correctly?

I suspect that the package was updated to work with the upcoming version 2.8.0 of the SDK and was then published without correctly updating the SDK constraints to indicate its dependence on a later version of the SDK. I know that 0.3.0 works correctly with the version of ffi on master. But if you could verify for me that 0.2.3 works with Dart 2.7.0, that would help to confirm my suspicion.