Commit e7f1f86d445141aabc0f2adde3ef16eba73810c0

Authored by 常守达
1 parent ab7dd190

fix(login): 新手引导退出逻辑;输入框气泡;优惠页滑动

... ... @@ -99,6 +99,20 @@ class PhoneLoginView extends GetView<LoginController> {
controller: controller.phoneController,
keyboardType: TextInputType.phone,
maxLength: 13,
contextMenuBuilder: (BuildContext context,
EditableTextState editableTextState) {
// 获取默认的菜单项列表
List<ContextMenuButtonItem> buttonItems =
editableTextState.contextMenuButtonItems;
// 例如:只保留“粘贴” (Paste)
buttonItems.removeWhere((item) =>
item.type != ContextMenuButtonType.paste);
return AdaptiveTextSelectionToolbar.buttonItems(
anchors: editableTextState.contextMenuAnchors,
buttonItems: buttonItems,
);
},
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp(r'[0-9\s]')),
... ... @@ -174,6 +188,20 @@ class PhoneLoginView extends GetView<LoginController> {
focusNode: controller.codeFocusNode,
keyboardType: TextInputType.number,
maxLength: 6,
contextMenuBuilder: (BuildContext context,
EditableTextState editableTextState) {
// 获取默认的菜单项列表
List<ContextMenuButtonItem> buttonItems =
editableTextState.contextMenuButtonItems;
// 例如:只保留“粘贴” (Paste)
buttonItems.removeWhere((item) =>
item.type != ContextMenuButtonType.paste);
return AdaptiveTextSelectionToolbar.buttonItems(
anchors: editableTextState.contextMenuAnchors,
buttonItems: buttonItems,
);
},
style: TextStyle(
color: context.colors.textPrimary,
fontSize: 16,
... ...
... ... @@ -43,7 +43,7 @@ class MembershipOfferView extends GetView<MembershipOfferController> {
children: [
Expanded(
child: SingleChildScrollView(
physics: const ClampingScrollPhysics(),
physics: const NeverScrollableScrollPhysics(),
padding: EdgeInsets.fromLTRB(
0,
MediaQuery.paddingOf(context).top + 4,
... ...
... ... @@ -84,7 +84,7 @@ class UserOnboardingController extends GetxController {
selections.refresh();
}
void goBack() {
Future<void> goBack() async {
if (currentPageIndex.value > 0) {
currentPageIndex.value--;
return;
... ... @@ -93,8 +93,16 @@ class UserOnboardingController extends GetxController {
Get.back();
} else {
// SystemNavigator.pop();
await _userApi.updateOwnerUserInfo(isPassNoviceGuide: 1);
final userId =
Get.find<UserPreferencesStorage>().preferences.value.meUserInfo?.id ??
0;
if (userId > 0) {
Get.find<UserAccountStorage>().markOnboardingCompleted(userId);
}
Get.offAllNamed(AppRoutes.home);
finishOnboarding();
}
}
... ...