Flutter项目中如何获取本地视频文件的第一帧?这是我的代码:
ImagePicker.pickVideo(source: ImageSource.camera).then((File file) {
if (file != null && mounted) {
//I got the video file here, but I want to get the first frame of the video.
}
});
},
Run Code Online (Sandbox Code Playgroud) 如何获取文本行数在Flutter项目中,我们需要确定文本行数是否超过3,然后将显示提示消息。我们如何使用代码来实现它?
final List<Tab> myTabs = <Tab>[
new Tab(text: 'a'),
new Tab(text: 'b'),
new Tab(text: 'c'),
new Tab(text: 'd'),
new Tab(text: 'e'),
];
Run Code Online (Sandbox Code Playgroud)
然后
appBar: new AppBar(
elevation: 0,
title: _barSearch(),
backgroundColor: Colors.white,
bottom: TabBar(
isScrollable: true,
tabs: myTabs,
labelColor: Color(0xffFF645C),
labelStyle:TextStyle(fontSize: 14.0),
unselectedLabelStyle:TextStyle(fontSize: 14.0),
unselectedLabelColor: Color(0xff343434),
indicatorColor: Color(0xffFF645C),
indicatorSize: TabBarIndicatorSize.label,
indicatorPadding: EdgeInsets.only(bottom: 8.0),
),
),
Run Code Online (Sandbox Code Playgroud)
它显示了我如何使用标签栏。但现在,我发现我的 Tabbar 布局类似于 spaceAround 的布局。

但我们的项目经理要求我使用 spaceBetween。

我使用 image_picker 开发了视频录制。我们需要限制视频录制时间。
pubspec.yaml 依赖项:image_picker:^0.4.10
[flutter] flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[?] Flutter (Channel beta, v1.0.1-pre.2, on Mac OS X 10.14.2 18C54, locale zh-Hans-CN)
[?] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[?] iOS toolchain - develop for iOS devices (Xcode 10.1)
[?] Android Studio (version 3.0)
[?] IntelliJ IDEA Ultimate Edition (version 2018.1.7)
[?] VS Code (version 1.31.1)
[?] Connected device (2 available)
• No issues found!
exit …Run Code Online (Sandbox Code Playgroud)