fix(auth): update video editor
This commit is contained in:
parent
9c4e72aa0f
commit
d4f781bf35
3 changed files with 16 additions and 58 deletions
|
@ -29,19 +29,16 @@ class _VideoEditorPageState extends State<VideoEditorPage> {
|
|||
final _isExporting = ValueNotifier<bool>(false);
|
||||
final double height = 60;
|
||||
|
||||
late final VideoEditorController _controller = VideoEditorController.file(
|
||||
widget.ioFile,
|
||||
minDuration: const Duration(seconds: 1),
|
||||
maxDuration: const Duration(seconds: 10),
|
||||
);
|
||||
late final VideoEditorController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_controller
|
||||
.initialize(aspectRatio: 9 / 16)
|
||||
.then((_) => setState(() {}))
|
||||
.catchError(
|
||||
_controller = VideoEditorController.file(
|
||||
widget.ioFile,
|
||||
minDuration: const Duration(seconds: 1),
|
||||
);
|
||||
_controller.initialize().then((_) => setState(() {})).catchError(
|
||||
(error) {
|
||||
// handle minumum duration bigger than video duration error
|
||||
Navigator.pop(context);
|
||||
|
@ -186,50 +183,8 @@ class _VideoEditorPageState extends State<VideoEditorPage> {
|
|||
height: 200,
|
||||
margin: const EdgeInsets.only(top: 10),
|
||||
child: Column(
|
||||
children: [
|
||||
const TabBar(
|
||||
tabs: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(5),
|
||||
child: Icon(
|
||||
Icons.content_cut,
|
||||
),
|
||||
),
|
||||
Text('Trim'),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(5),
|
||||
child: Icon(Icons.video_label),
|
||||
),
|
||||
Text('Cover'),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
physics:
|
||||
const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: _trimSlider(),
|
||||
),
|
||||
_coverSelection(),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: _trimSlider(),
|
||||
),
|
||||
),
|
||||
ValueListenableBuilder(
|
||||
|
|
|
@ -2487,10 +2487,11 @@ packages:
|
|||
video_editor:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: video_editor
|
||||
sha256: "263be52e052118389f372f055f59c2fda5c7beecfdb706b899d2e05be8740c22"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
path: "."
|
||||
ref: HEAD
|
||||
resolved-ref: "1eeb18e2b1ce36bd8ca70178c0d4b485e9982257"
|
||||
url: "https://github.com/prateekmedia/video_editor.git"
|
||||
source: git
|
||||
version: "3.0.0"
|
||||
video_player:
|
||||
dependency: "direct main"
|
||||
|
|
|
@ -162,7 +162,9 @@ dependencies:
|
|||
uni_links: ^0.5.1
|
||||
url_launcher: ^6.0.3
|
||||
uuid: ^3.0.7
|
||||
video_editor: ^3.0.0
|
||||
video_editor:
|
||||
git:
|
||||
url: https://github.com/prateekmedia/video_editor.git
|
||||
video_player:
|
||||
git:
|
||||
url: https://github.com/ente-io/packages.git
|
||||
|
|
Loading…
Add table
Reference in a new issue