Skip to content

Commit 0b7adeb

Browse files
committed
fix:修复iphonex底部问题,修复登陆唔返回问题
1 parent 2e6bd93 commit 0b7adeb

File tree

4 files changed

+280
-282
lines changed

4 files changed

+280
-282
lines changed

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@
197197
developmentRegion = English;
198198
hasScannedForEncodings = 0;
199199
knownRegions = (
200+
English,
200201
en,
201202
Base,
202203
);
@@ -278,21 +279,17 @@
278279
buildActionMask = 2147483647;
279280
files = (
280281
);
281-
inputFileListPaths = (
282-
);
283282
inputPaths = (
284-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
283+
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
285284
"${PODS_CONFIGURATION_BUILD_DIR}/flutter_downloader/FlutterDownloaderDatabase.bundle",
286285
);
287286
name = "[CP] Copy Pods Resources";
288-
outputFileListPaths = (
289-
);
290287
outputPaths = (
291288
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FlutterDownloaderDatabase.bundle",
292289
);
293290
runOnlyForDeploymentPostprocessing = 0;
294291
shellPath = /bin/sh;
295-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
292+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
296293
showEnvVarsInLog = 0;
297294
};
298295
EB6D2D2E068567EE260A8427 /* [CP] Embed Pods Frameworks */ = {
@@ -301,7 +298,7 @@
301298
files = (
302299
);
303300
inputPaths = (
304-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
301+
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
305302
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
306303
);
307304
name = "[CP] Embed Pods Frameworks";
@@ -310,7 +307,7 @@
310307
);
311308
runOnlyForDeploymentPostprocessing = 0;
312309
shellPath = /bin/sh;
313-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
310+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
314311
showEnvVarsInLog = 0;
315312
};
316313
/* End PBXShellScriptBuildPhase section */
@@ -414,7 +411,7 @@
414411
"$(inherited)",
415412
"$(PROJECT_DIR)/Flutter",
416413
);
417-
PRODUCT_BUNDLE_IDENTIFIER = com.flutter.beer;
414+
PRODUCT_BUNDLE_IDENTIFIER = com.flutter.ui;
418415
PRODUCT_NAME = "$(TARGET_NAME)";
419416
VERSIONING_SYSTEM = "apple-generic";
420417
};
@@ -540,7 +537,7 @@
540537
"$(inherited)",
541538
"$(PROJECT_DIR)/Flutter",
542539
);
543-
PRODUCT_BUNDLE_IDENTIFIER = com.flutter.beer;
540+
PRODUCT_BUNDLE_IDENTIFIER = com.flutter.ui;
544541
PRODUCT_NAME = "$(TARGET_NAME)";
545542
VERSIONING_SYSTEM = "apple-generic";
546543
};
@@ -564,7 +561,7 @@
564561
"$(inherited)",
565562
"$(PROJECT_DIR)/Flutter",
566563
);
567-
PRODUCT_BUNDLE_IDENTIFIER = com.flutter.beer;
564+
PRODUCT_BUNDLE_IDENTIFIER = com.flutter.ui;
568565
PRODUCT_NAME = "$(TARGET_NAME)";
569566
VERSIONING_SYSTEM = "apple-generic";
570567
};

lib/page/app_login/index.dart

Lines changed: 116 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -66,134 +66,135 @@ class _IndexState extends State<Index> {
6666

6767
@override
6868
Widget build(BuildContext ctx) {
69-
return WillPopScope(
70-
child: Scaffold(
71-
appBar: AppBar(
72-
centerTitle: true,
73-
title: Text(
74-
AppLocalizations.$t('common.login'),
75-
textAlign: TextAlign.center,
76-
),
77-
automaticallyImplyLeading: false,
69+
// return WillPopScope(
70+
// child: ,
71+
// onWillPop: () {
72+
// beforeDispose();
73+
// },
74+
// );
75+
return Scaffold(
76+
appBar: AppBar(
77+
centerTitle: true,
78+
title: Text(
79+
AppLocalizations.$t('common.login'),
80+
textAlign: TextAlign.center,
7881
),
79-
body: Builder(builder: (BuildContext context) {
80-
return SingleChildScrollView(
81-
child: Padding(
82-
padding: EdgeInsets.symmetric(vertical: 50, horizontal: 24),
83-
child: Form(
84-
key: _formKey,
85-
autovalidate: true,
86-
child: Column(
87-
children: <Widget>[
88-
renderGithubImage(),
89-
TextFormField(
90-
controller: nameCtl,
91-
autofocus: true,
92-
decoration: InputDecoration(
93-
labelText: AppLocalizations.$t('login.account'),
94-
hintText: AppLocalizations.$t('login.account_tips'),
95-
icon: Icon(Icons.person),
96-
),
97-
validator: (v) {
98-
return v.trim().length > 0
99-
? null
100-
: AppLocalizations.$t('login.account_error_tips');
101-
},
102-
),
103-
TextFormField(
104-
controller: pwdCtl,
105-
decoration: InputDecoration(
106-
labelText: AppLocalizations.$t('login.password'),
107-
hintText: AppLocalizations.$t('login.password_tips'),
108-
icon: Icon(Icons.lock),
109-
),
110-
obscureText: true,
111-
validator: (v) {
112-
return v.trim().length > 0
113-
? null
114-
: AppLocalizations.$t('login.password_error_tips');
115-
},
116-
),
117-
Padding(
118-
padding: EdgeInsets.only(top: 50),
119-
child: Row(
120-
children: <Widget>[
121-
Expanded(
122-
child: RaisedButton(
123-
padding: EdgeInsets.all(15),
124-
color: Theme.of(context).primaryColor,
125-
textColor: Theme.of(context)
126-
.primaryTextTheme
127-
.title
128-
.color,
129-
child: Text(
130-
AppLocalizations.$t('common.login'),
131-
),
132-
onPressed: () async {
133-
if ((_formKey.currentState as FormState)
134-
.validate()) {
135-
await Store.value<UserModel>(context)
136-
.loginController(context, {
137-
'name': nameCtl.text.trim(),
138-
'pwd': pwdCtl.text.trim()
139-
});
140-
await Store.value<UserModel>(context).getUserStar();
141-
}
142-
},
143-
),
144-
)
145-
],
146-
),
82+
// automaticallyImplyLeading: false,
83+
),
84+
body: Builder(builder: (BuildContext context) {
85+
return SingleChildScrollView(
86+
child: Padding(
87+
padding: EdgeInsets.symmetric(vertical: 50, horizontal: 24),
88+
child: Form(
89+
key: _formKey,
90+
autovalidate: true,
91+
child: Column(
92+
children: <Widget>[
93+
renderGithubImage(),
94+
TextFormField(
95+
controller: nameCtl,
96+
autofocus: false,
97+
decoration: InputDecoration(
98+
labelText: AppLocalizations.$t('login.account'),
99+
hintText: AppLocalizations.$t('login.account_tips'),
100+
icon: Icon(Icons.person),
147101
),
148-
SizedBox(
149-
height: 10,
102+
validator: (v) {
103+
return v.trim().length > 0
104+
? null
105+
: AppLocalizations.$t('login.account_error_tips');
106+
},
107+
),
108+
TextFormField(
109+
controller: pwdCtl,
110+
decoration: InputDecoration(
111+
labelText: AppLocalizations.$t('login.password'),
112+
hintText: AppLocalizations.$t('login.password_tips'),
113+
icon: Icon(Icons.lock),
150114
),
151-
Row(
152-
mainAxisAlignment: MainAxisAlignment.center,
115+
obscureText: true,
116+
validator: (v) {
117+
return v.trim().length > 0
118+
? null
119+
: AppLocalizations.$t('login.password_error_tips');
120+
},
121+
),
122+
Padding(
123+
padding: EdgeInsets.only(top: 50),
124+
child: Row(
153125
children: <Widget>[
154-
GestureDetector(
155-
child: Text(
156-
'Github账户登录说明',
157-
style: TextStyle(
158-
decoration: TextDecoration.underline,
159-
textBaseline: TextBaseline.ideographic,
160-
decorationColor: Color(0xff000000),
126+
Expanded(
127+
child: RaisedButton(
128+
padding: EdgeInsets.all(15),
129+
color: Theme.of(context).primaryColor,
130+
textColor:
131+
Theme.of(context).primaryTextTheme.title.color,
132+
child: Text(
133+
AppLocalizations.$t('common.login'),
161134
),
135+
onPressed: () async {
136+
if ((_formKey.currentState as FormState)
137+
.validate()) {
138+
await Store.value<UserModel>(context)
139+
.loginController(context, {
140+
'name': nameCtl.text.trim(),
141+
'pwd': pwdCtl.text.trim()
142+
});
143+
await Store.value<UserModel>(context)
144+
.getUserStar();
145+
}
146+
},
147+
),
148+
)
149+
],
150+
),
151+
),
152+
SizedBox(
153+
height: 10,
154+
),
155+
Row(
156+
mainAxisAlignment: MainAxisAlignment.center,
157+
children: <Widget>[
158+
GestureDetector(
159+
child: Text(
160+
'Github账户登录说明',
161+
style: TextStyle(
162+
decoration: TextDecoration.underline,
163+
textBaseline: TextBaseline.ideographic,
164+
decorationColor: Color(0xff000000),
162165
),
163-
onTap: () {
164-
renderOverlay(" Text 1");
165-
},
166-
),
167-
SizedBox(
168-
width: 10,
169166
),
170-
GestureDetector(
171-
child: Text(
172-
'软件许可及服务协议',
173-
style: TextStyle(
174-
decoration: TextDecoration.underline,
175-
textBaseline: TextBaseline.ideographic,
176-
decorationColor: const Color(0xff000000),
177-
),
167+
onTap: () {
168+
renderOverlay(" Text 1");
169+
},
170+
),
171+
SizedBox(
172+
width: 10,
173+
),
174+
GestureDetector(
175+
child: Text(
176+
'软件许可及服务协议',
177+
style: TextStyle(
178+
decoration: TextDecoration.underline,
179+
textBaseline: TextBaseline.ideographic,
180+
decorationColor: const Color(0xff000000),
178181
),
179-
onTap: () {
180-
renderOverlay(" Text 2");
181-
},
182182
),
183-
],
184-
)
185-
],
186-
),
183+
onTap: () {
184+
renderOverlay(" Text 2");
185+
},
186+
),
187+
],
188+
)
189+
],
187190
),
188191
),
189-
);
190-
}),
191-
),
192-
onWillPop: () {
193-
beforeDispose();
194-
},
192+
),
193+
);
194+
}),
195195
);
196196
}
197+
197198
beforeDispose() {
198199
if (_overlayEntry != null) {
199200
_overlayEntry.remove();

0 commit comments

Comments
 (0)