Compare commits
No commits in common. "5ccb5adb79ed0a65eae4767fdac2baa1fa4efa31" and "1271c27b41b0a4db8d6e5e02dbc2712332750e1a" have entirely different histories.
5ccb5adb79
...
1271c27b41
|
|
@ -1,26 +0,0 @@
|
||||||
# 这是一个顶级配置文件,停止向父目录查找
|
|
||||||
root = true
|
|
||||||
|
|
||||||
# === 全局通用设置 (所有文件) ===
|
|
||||||
[*]
|
|
||||||
charset = utf-8
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
end_of_line = lf
|
|
||||||
insert_final_newline = true
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
|
|
||||||
# === Dart 文件专用设置 ===
|
|
||||||
[*.dart]
|
|
||||||
# SDK 原始代码使用较长的行宽,设置为 120 以保持一致
|
|
||||||
max_line_length = 120
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
# === YAML/JSON 文件 (配置文件) ===
|
|
||||||
[*.{yaml,yml,json}]
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
# === Markdown 文件 (文档) ===
|
|
||||||
[*.md]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
max_line_length = 0
|
|
||||||
|
|
@ -62,12 +62,6 @@ class TUISearchViewModel extends ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
void searchFriendByKey(String searchKey) async {
|
void searchFriendByKey(String searchKey) async {
|
||||||
// 空关键词不调用 API,直接清理数据
|
|
||||||
if (searchKey.trim().isEmpty) {
|
|
||||||
friendList = [];
|
|
||||||
notifyListeners();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final searchResult =
|
final searchResult =
|
||||||
await _friendshipServices.searchFriends(searchParam: V2TimFriendSearchParam(keywordList: [searchKey]));
|
await _friendshipServices.searchFriends(searchParam: V2TimFriendSearchParam(keywordList: [searchKey]));
|
||||||
friendList = searchResult;
|
friendList = searchResult;
|
||||||
|
|
@ -75,12 +69,6 @@ class TUISearchViewModel extends ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
void searchGroupByKey(String searchKey) async {
|
void searchGroupByKey(String searchKey) async {
|
||||||
// 空关键词不调用 API,直接清理数据
|
|
||||||
if (searchKey.trim().isEmpty) {
|
|
||||||
groupList = [];
|
|
||||||
notifyListeners();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final searchResult =
|
final searchResult =
|
||||||
await _groupServices.searchGroups(searchParam: V2TimGroupSearchParam(keywordList: [searchKey]));
|
await _groupServices.searchGroups(searchParam: V2TimGroupSearchParam(keywordList: [searchKey]));
|
||||||
groupList = searchResult.data ?? [];
|
groupList = searchResult.data ?? [];
|
||||||
|
|
@ -123,14 +111,6 @@ class TUISearchViewModel extends ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
void searchMsgByKey(String searchKey, bool isFirst) async {
|
void searchMsgByKey(String searchKey, bool isFirst) async {
|
||||||
// 空关键词不调用 API,直接清理数据
|
|
||||||
if (searchKey.trim().isEmpty) {
|
|
||||||
msgPage = 0;
|
|
||||||
msgList = [];
|
|
||||||
totalMsgCount = 0;
|
|
||||||
notifyListeners();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (isFirst == true) {
|
if (isFirst == true) {
|
||||||
msgPage = 0;
|
msgPage = 0;
|
||||||
msgList = [];
|
msgList = [];
|
||||||
|
|
|
||||||
|
|
@ -683,7 +683,7 @@ class _InputTextFieldState extends TIMUIKitState<TIMUIKitInputTextField> {
|
||||||
isAddingAtSearchWords = false;
|
isAddingAtSearchWords = false;
|
||||||
}
|
}
|
||||||
} else if (textLength > 0 && text[textLength - 1] == "@" && lastText.length < textLength) {
|
} else if (textLength > 0 && text[textLength - 1] == "@" && lastText.length < textLength) {
|
||||||
List<V2TimGroupMemberFullInfo>? selectedAtMemberList = await Navigator.push(
|
List<V2TimGroupMemberFullInfo> selectedAtMemberList = await Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => AtText(
|
builder: (context) => AtText(
|
||||||
|
|
@ -695,7 +695,6 @@ class _InputTextFieldState extends TIMUIKitState<TIMUIKitInputTextField> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (selectedAtMemberList == null) return;
|
|
||||||
for (int i = 0; i < selectedAtMemberList.length; ++i) {
|
for (int i = 0; i < selectedAtMemberList.length; ++i) {
|
||||||
V2TimGroupMemberFullInfo memberInfo = selectedAtMemberList[i];
|
V2TimGroupMemberFullInfo memberInfo = selectedAtMemberList[i];
|
||||||
final showName = _getShowName(memberInfo);
|
final showName = _getShowName(memberInfo);
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ class TUIKitColumnMenu extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class TUIKitColumnMenuState extends TIMUIKitState<TUIKitColumnMenu> {
|
class TUIKitColumnMenuState extends TIMUIKitState<TUIKitColumnMenu> {
|
||||||
|
|
||||||
List<Widget> renderMenuItems(TUITheme theme) {
|
List<Widget> renderMenuItems(TUITheme theme) {
|
||||||
return widget.data
|
return widget.data
|
||||||
.map(
|
.map(
|
||||||
|
|
@ -38,11 +39,10 @@ class TUIKitColumnMenuState extends TIMUIKitState<TUIKitColumnMenu> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
if (item.icon != null) item.icon!,
|
if (item.icon != null) item.icon!,
|
||||||
if (item.icon != null)
|
if (item.icon != null) const SizedBox(
|
||||||
const SizedBox(
|
height: 4,
|
||||||
height: 4,
|
width: 6,
|
||||||
width: 6,
|
),
|
||||||
),
|
|
||||||
Text(
|
Text(
|
||||||
item.label,
|
item.label,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
@ -73,11 +73,18 @@ class TUIKitColumnMenuState extends TIMUIKitState<TUIKitColumnMenu> {
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
maxWidth: min(MediaQuery.of(context).size.width * 0.7, 350),
|
maxWidth: min(MediaQuery.of(context).size.width * 0.7, 350),
|
||||||
),
|
),
|
||||||
child: Table(columnWidths: const <int, TableColumnWidth>{
|
child: Table(
|
||||||
0: IntrinsicColumnWidth(),
|
columnWidths: const <int, TableColumnWidth>{
|
||||||
}, children: <TableRow>[
|
0: IntrinsicColumnWidth(),
|
||||||
...renderMenuItems(theme).map((e) => TableRow(children: <Widget>[e]))
|
},
|
||||||
]),
|
children: <TableRow>[
|
||||||
|
...renderMenuItems(theme).map((e) => TableRow(
|
||||||
|
children: <Widget>[
|
||||||
|
e
|
||||||
|
]
|
||||||
|
))
|
||||||
|
]
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@ import 'package:video_player/video_player.dart';
|
||||||
import 'center_play_button.dart';
|
import 'center_play_button.dart';
|
||||||
|
|
||||||
class VideoCustomControls extends StatefulWidget {
|
class VideoCustomControls extends StatefulWidget {
|
||||||
const VideoCustomControls({required this.downloadFn, Key? key})
|
const VideoCustomControls({required this.downloadFn, Key? key}) : super(key: key);
|
||||||
: super(key: key);
|
|
||||||
final Future<void> Function() downloadFn;
|
final Future<void> Function() downloadFn;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -26,8 +25,7 @@ class VideoCustomControls extends StatefulWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VideoCustomControlsState extends TIMUIKitState<VideoCustomControls>
|
class _VideoCustomControlsState extends TIMUIKitState<VideoCustomControls> with SingleTickerProviderStateMixin {
|
||||||
with SingleTickerProviderStateMixin {
|
|
||||||
late VideoPlayerValue _latestValue;
|
late VideoPlayerValue _latestValue;
|
||||||
bool _hideStuff = true;
|
bool _hideStuff = true;
|
||||||
Timer? _hideTimer;
|
Timer? _hideTimer;
|
||||||
|
|
@ -76,18 +74,11 @@ class _VideoCustomControlsState extends TIMUIKitState<VideoCustomControls>
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (_latestValue.isBuffering)
|
if (_latestValue.isBuffering) const Center(child: CircularProgressIndicator(color: Colors.white)) else _buildHitArea(),
|
||||||
const Center(
|
|
||||||
child: CircularProgressIndicator(color: Colors.white))
|
|
||||||
else
|
|
||||||
_buildHitArea(),
|
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
child: Column(children: [
|
child: Column(children: [_buildVideoControlBar(context), _buildBottomBar()]),
|
||||||
_buildVideoControlBar(context),
|
|
||||||
_buildBottomBar()
|
|
||||||
]),
|
|
||||||
),
|
),
|
||||||
if (isLoading)
|
if (isLoading)
|
||||||
Container(
|
Container(
|
||||||
|
|
@ -207,14 +198,8 @@ class _VideoCustomControlsState extends TIMUIKitState<VideoCustomControls>
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_buildPlayPause(controller, iconColor),
|
_buildPlayPause(controller, iconColor),
|
||||||
if (chewieController.isLive)
|
if (chewieController.isLive) const Expanded(child: Text('LIVE')) else _buildPositionStart(iconColor),
|
||||||
const Expanded(child: Text('LIVE'))
|
if (chewieController.isLive) const SizedBox() else _buildProgressBar(),
|
||||||
else
|
|
||||||
_buildPositionStart(iconColor),
|
|
||||||
if (chewieController.isLive)
|
|
||||||
const SizedBox()
|
|
||||||
else
|
|
||||||
_buildProgressBar(),
|
|
||||||
if (!chewieController.isLive) _buildPositionEnd(iconColor),
|
if (!chewieController.isLive) _buildPositionEnd(iconColor),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -250,8 +235,7 @@ class _VideoCustomControlsState extends TIMUIKitState<VideoCustomControls>
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
GestureDetector _buildPlayPause(
|
GestureDetector _buildPlayPause(VideoPlayerController controller, Color color) {
|
||||||
VideoPlayerController controller, Color color) {
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: _playPause,
|
onTap: _playPause,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
@ -327,8 +311,7 @@ class _VideoCustomControlsState extends TIMUIKitState<VideoCustomControls>
|
||||||
_hideStuff = true;
|
_hideStuff = true;
|
||||||
|
|
||||||
chewieController.toggleFullScreen();
|
chewieController.toggleFullScreen();
|
||||||
_showAfterExpandCollapseTimer =
|
_showAfterExpandCollapseTimer = Timer(const Duration(milliseconds: 300), () {
|
||||||
Timer(const Duration(milliseconds: 300), () {
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_cancelAndRestartTimer();
|
_cancelAndRestartTimer();
|
||||||
});
|
});
|
||||||
|
|
@ -396,12 +379,7 @@ class _VideoCustomControlsState extends TIMUIKitState<VideoCustomControls>
|
||||||
|
|
||||||
_startHideTimer();
|
_startHideTimer();
|
||||||
},
|
},
|
||||||
colors: chewieController.materialProgressColors ??
|
colors: chewieController.materialProgressColors ?? ChewieProgressColors(playedColor: Colors.white, handleColor: Colors.white, bufferedColor: Colors.white38, backgroundColor: Colors.white24),
|
||||||
ChewieProgressColors(
|
|
||||||
playedColor: Colors.white,
|
|
||||||
handleColor: Colors.white,
|
|
||||||
bufferedColor: Colors.white38,
|
|
||||||
backgroundColor: Colors.white24),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -424,8 +402,7 @@ class _PlaybackSpeedDialog extends TIMUIKitStatelessWidget {
|
||||||
Widget tuiBuild(BuildContext context, TUIKitBuildValue value) {
|
Widget tuiBuild(BuildContext context, TUIKitBuildValue value) {
|
||||||
final TUITheme theme = value.theme;
|
final TUITheme theme = value.theme;
|
||||||
|
|
||||||
final Color selectedColor =
|
final Color selectedColor = theme.primaryColor ?? Theme.of(context).primaryColor;
|
||||||
theme.primaryColor ?? Theme.of(context).primaryColor;
|
|
||||||
|
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue