feat(apps): update UI screens and shared components

- Update home screen with new composer and interactions
- Update settings screens with new profile flow
- Update calendar share dialog
- Update contacts screen
- Add new shared widgets: confirm_sheet, phone_prefix_selector
- Add new formatters: phone_display_formatter
- Update tests for modified components
This commit is contained in:
qzl
2026-03-19 18:43:08 +08:00
parent f0af44d840
commit 8d4a14150b
24 changed files with 868 additions and 989 deletions
@@ -0,0 +1,30 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:social_app/shared/utils/phone_display_formatter.dart';
void main() {
group('formatPhoneForDisplay', () {
test('formats +86 numbers as local masked style', () {
final formatted = formatPhoneForDisplay('+8613812345678');
expect(formatted, '138****5678');
});
test('keeps international country code while masking middle part', () {
final formatted = formatPhoneForDisplay('+14155552671');
expect(formatted, '+1 ****2671');
});
test('normalizes separators before formatting', () {
final formatted = formatPhoneForDisplay('(+86) 138-1234-5678');
expect(formatted, '138****5678');
});
test('prefers longer country code in fallback detection', () {
final formatted = formatPhoneForDisplay('+33612345678');
expect(formatted, '+33 ****5678');
});
});
}