Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[help] #94

Open
riddhij16 opened this issue Aug 23, 2020 · 0 comments
Open

[help] #94

riddhij16 opened this issue Aug 23, 2020 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@riddhij16
Copy link

Description

even after running the basic Eg given in the docs.. getting getter length was null error:

E/flutter (19943): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: NoSuchMethodError: The getter 'length' was called on null.
E/flutter (19943): Receiver: null
E/flutter (19943): Tried calling: length

Platform

Android

Code Example (if has)

import 'dart:io';
import 'package:flutter/material.dart';
import 'package:video_compress/video_compress.dart';
import 'package:image_picker/image_picker.dart';

class Compresss extends StatefulWidget {
@OverRide
_CompresssState createState() => _CompresssState();
}

class _CompresssState extends State {
Subscription _subscription;
@OverRide
void initState() {
super.initState();
_subscription = VideoCompress.compressProgress$.subscribe((progress) {
debugPrint('progress: $progress');
});
}

@OverRide
void dispose() {
super.dispose();
_subscription.unsubscribe();
}

@OverRide
Widget build(BuildContext context) {
return Scaffold(
body:
Center(child: FlatButton(onPressed: videoPick, child: Text("press"))),
);
}

void videoPick() async {
File file = await ImagePicker.pickVideo(source: ImageSource.gallery);
final info = await VideoCompress.compressVideo(
file.path,
// quality: VideoQuality.MediumQuality,
// deleteOrigin: false,
);
print("done");
// setState(() {});
}
}


### Expected solution
Expect description of the solution
@riddhij16 riddhij16 added the help wanted Extra attention is needed label Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant