feat(mobile-next): 导入官方 openim-flutter-demo 固定基线 3.8.3-patch.3 并完成双构建

- 上游: github.com/OpenIMSDK/openim-flutter-demo tag 3.8.3-patch.3
  commit b3dfdb1e8aaeaaf6f0793e10cadd20d5c184a31f
- 并行目录 mobile-next/ 原样导入(含 LICENSE),不覆盖现网 mobile/
- 锁定 Flutter 3.24.5 / Dart 3.5.4 / JDK 17 / Gradle 7.6.3 / AGP 7.3.1
- 实测 Android debug 与 release 构建均成功(见 docs/mobile-next-baseline-import.md)
- 本提交可单独回退:git revert 1db1229(重写前)

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
编码工程师
2026-08-19 10:45:55 +08:00
co-authored by multica-agent
parent fa8584a73f
commit 754f161a3f
767 changed files with 57658 additions and 0 deletions
@@ -0,0 +1,137 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:openim_common/openim_common.dart';
class BottomBar extends StatelessWidget {
const BottomBar({
Key? key,
this.index = 0,
required this.items,
}) : super(key: key);
final int index;
final List<BottomBarItem> items;
@override
Widget build(BuildContext context) {
return Container(
height: 56.h,
decoration: BoxDecoration(
color: Styles.c_FFFFFF,
border: BorderDirectional(
top: BorderSide(
color: Styles.c_E8EAEF,
width: 1,
),
),
),
child: Row(
children: List.generate(
items.length,
(index) => _buildItemView(
i: index,
item: items.elementAt(index),
)).toList(),
),
);
}
Widget _buildItemView({required int i, required BottomBarItem item}) => Expanded(
child: GestureDetector(
onDoubleTap: () => item.onDoubleClick?.call(i),
onTapDown: (_) => item.onClick?.call(i),
child: Container(
color: Styles.c_FFFFFF,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Stack(
alignment: Alignment.center,
children: [
(i == index ? item.selectedImgRes.toImage : item.unselectedImgRes.toImage)
..width = item.imgWidth
..height = item.imgHeight,
Positioned(
top: 0,
right: 0,
child: Transform.translate(
offset: const Offset(2, -2),
child: UnreadCountView(count: item.count ?? 0),
),
),
],
),
4.verticalSpace,
item.label.toText
..style = i == index
? (item.selectedStyle ?? Styles.ts_0089FF_10sp_semibold)
: (item.unselectedStyle ?? Styles.ts_8E9AB0_10sp_semibold),
],
),
),
),
/*child: InkWell(
onTap: () {
if (item.onClick != null) item.onClick!(i);
},
onDoubleTap: () => item.onDoubleClick?.call(i),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Stack(
alignment: Alignment.center,
children: [
(i == index
? item.selectedImgRes.toImage
: item.unselectedImgRes.toImage)
..width = item.imgWidth
..height = item.imgHeight,
Positioned(
top: 0,
right: 0,
child: Transform.translate(
offset: const Offset(2, -2),
child: UnreadCountView(count: item.count ?? 0),
),
),
],
),
4.verticalSpace,
item.label.toText
..style = i == index
? (item.selectedStyle ?? Styles.ts_0089FF_10sp_semibold)
: (item.unselectedStyle ?? Styles.ts_8E9AB0_10sp_semibold),
],
),
),*/
);
}
class BottomBarItem {
final String selectedImgRes;
final String unselectedImgRes;
final String label;
final TextStyle? selectedStyle;
final TextStyle? unselectedStyle;
final double imgWidth;
final double imgHeight;
final Function(int index)? onClick;
final Function(int index)? onDoubleClick;
final Stream<int>? steam;
final int? count;
BottomBarItem(
{required this.selectedImgRes,
required this.unselectedImgRes,
required this.label,
this.selectedStyle,
this.unselectedStyle,
required this.imgWidth,
required this.imgHeight,
this.onClick,
this.onDoubleClick,
this.steam,
this.count});
}