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:
@@ -46,7 +46,7 @@ class CalendarShareDialog extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _CalendarShareDialogState extends State<CalendarShareDialog> {
|
||||
final _emailController = TextEditingController();
|
||||
final _phoneController = TextEditingController();
|
||||
bool _permissionView = true;
|
||||
bool _permissionEdit = false;
|
||||
bool _permissionInvite = false;
|
||||
@@ -54,14 +54,14 @@ class _CalendarShareDialogState extends State<CalendarShareDialog> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_emailController.dispose();
|
||||
_phoneController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
Future<void> _handleShare() async {
|
||||
final email = _emailController.text.trim();
|
||||
if (email.isEmpty) {
|
||||
Toast.show(context, '请输入邮箱地址', type: ToastType.error);
|
||||
final phone = _phoneController.text.trim();
|
||||
if (phone.isEmpty) {
|
||||
Toast.show(context, '请输入手机号', type: ToastType.error);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class _CalendarShareDialogState extends State<CalendarShareDialog> {
|
||||
final api = sl<CalendarApi>();
|
||||
await api.share(
|
||||
widget.eventId,
|
||||
email: email,
|
||||
phone: phone,
|
||||
view: _permissionView,
|
||||
edit: _permissionEdit,
|
||||
invite: _permissionInvite,
|
||||
@@ -127,15 +127,15 @@ class _CalendarShareDialogState extends State<CalendarShareDialog> {
|
||||
Text(widget.eventTitle, style: const TextStyle(fontSize: 16)),
|
||||
const SizedBox(height: AppSpacing.lg),
|
||||
TextField(
|
||||
controller: _emailController,
|
||||
controller: _phoneController,
|
||||
decoration: InputDecoration(
|
||||
labelText: '邮箱地址',
|
||||
hintText: '输入对方的邮箱',
|
||||
labelText: '手机号',
|
||||
hintText: '输入对方的 +86 手机号',
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(AppRadius.md),
|
||||
),
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
keyboardType: TextInputType.phone,
|
||||
),
|
||||
const SizedBox(height: AppSpacing.lg),
|
||||
const Text('权限设置', style: TextStyle(fontWeight: FontWeight.w600)),
|
||||
|
||||
Reference in New Issue
Block a user