We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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
Android
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
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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(() {});
}
}
The text was updated successfully, but these errors were encountered: