Search code examples
flutterdartvisual-studio-codeflutter-getxdart-null-safety

Field 'dynamicLibrary' has not been initialized.) in dart_vlc package


while Im trying initilizing the controller it didnt initilize and give me this error LateError (LateInitializationError: Field 'dynamicLibrary' has not been initialized.)

Ihad tried to initilize like this

late Player player;

@override
void oninit(){
player=Player(id: 2569, commandlineArguments: ['Xvideo ']);
}

and try this

Player ? player;

@override
void oninit(){

player=Player(id: 2569, commandlineArguments: ['Xvideo ']);
}

It works on dekstop when I run it on android It didnt work


Solution

  • void main() async {
      await DartVLC.initialize (useFlutterNativeView: true);
      runApp (const VideoPlayer());
    }
    

    use this in main