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