feat(apps/home): 新增 HomeScreen 录音交互与导航组件

This commit is contained in:
zl-q
2026-03-19 00:51:52 +08:00
parent 14ccf2cb28
commit 039e8b73d6
13 changed files with 1840 additions and 847 deletions
@@ -0,0 +1,21 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:social_app/features/home/ui/navigation/home_return_policy.dart';
void main() {
group('resolveHomeReturnAction', () {
test('business route with back stack prefers pop', () {
final action = resolveHomeReturnAction(canPop: true, isAuthEntry: false);
expect(action, HomeReturnAction.pop);
});
test('business route without back stack falls back to go home', () {
final action = resolveHomeReturnAction(canPop: false, isAuthEntry: false);
expect(action, HomeReturnAction.goHome);
});
test('auth entry always goes home directly', () {
final action = resolveHomeReturnAction(canPop: true, isAuthEntry: true);
expect(action, HomeReturnAction.goHome);
});
});
}