reason

add app login auth

...@@ -4,7 +4,7 @@ PODS: ...@@ -4,7 +4,7 @@ PODS:
4 - AMapFoundation (1.6.9) 4 - AMapFoundation (1.6.9)
5 - AMapLocation (2.8.0): 5 - AMapLocation (2.8.0):
6 - AMapFoundation (~> 1.6.9) 6 - AMapFoundation (~> 1.6.9)
7 - - AMapSearch (8.1.0): 7 + - AMapSearch (9.2.0):
8 - AMapFoundation (~> 1.6.9) 8 - AMapFoundation (~> 1.6.9)
9 - BIJKPlayer (0.7.16) 9 - BIJKPlayer (0.7.16)
10 - camera (0.0.1): 10 - camera (0.0.1):
...@@ -22,21 +22,21 @@ PODS: ...@@ -22,21 +22,21 @@ PODS:
22 - Flutter 22 - Flutter
23 - flutter_native_splash (0.0.1): 23 - flutter_native_splash (0.0.1):
24 - Flutter 24 - Flutter
25 - - flutter_sound (9.1.9): 25 + - flutter_sound (9.2.1):
26 - Flutter 26 - Flutter
27 - - flutter_sound_core (= 9.1.9) 27 + - flutter_sound_core (= 9.2.1)
28 - - flutter_sound_core (9.1.9) 28 + - flutter_sound_core (9.2.1)
29 - FMDB (2.7.5): 29 - FMDB (2.7.5):
30 - FMDB/standard (= 2.7.5) 30 - FMDB/standard (= 2.7.5)
31 - FMDB/standard (2.7.5) 31 - FMDB/standard (2.7.5)
32 - - image_picker (0.0.1): 32 + - image_picker_ios (0.0.1):
33 - Flutter 33 - Flutter
34 - integration_test (0.0.1): 34 - integration_test (0.0.1):
35 - Flutter 35 - Flutter
36 - MTBBarcodeScanner (5.0.11) 36 - MTBBarcodeScanner (5.0.11)
37 - path_provider_ios (0.0.1): 37 - path_provider_ios (0.0.1):
38 - Flutter 38 - Flutter
39 - - permission_handler_apple (9.0.2): 39 + - permission_handler_apple (9.0.4):
40 - Flutter 40 - Flutter
41 - qr_code_scanner (0.2.0): 41 - qr_code_scanner (0.2.0):
42 - Flutter 42 - Flutter
...@@ -45,6 +45,8 @@ PODS: ...@@ -45,6 +45,8 @@ PODS:
45 - Flutter 45 - Flutter
46 - shared_preferences_ios (0.0.1): 46 - shared_preferences_ios (0.0.1):
47 - Flutter 47 - Flutter
48 + - sign_in_with_apple (0.0.1):
49 + - Flutter
48 - sqflite (0.0.2): 50 - sqflite (0.0.2):
49 - Flutter 51 - Flutter
50 - FMDB (>= 2.7.5) 52 - FMDB (>= 2.7.5)
...@@ -65,13 +67,14 @@ DEPENDENCIES: ...@@ -65,13 +67,14 @@ DEPENDENCIES:
65 - flutter_2d_amap (from `.symlinks/plugins/flutter_2d_amap/ios`) 67 - flutter_2d_amap (from `.symlinks/plugins/flutter_2d_amap/ios`)
66 - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) 68 - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
67 - flutter_sound (from `.symlinks/plugins/flutter_sound/ios`) 69 - flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)
68 - - image_picker (from `.symlinks/plugins/image_picker/ios`) 70 + - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
69 - integration_test (from `.symlinks/plugins/integration_test/ios`) 71 - integration_test (from `.symlinks/plugins/integration_test/ios`)
70 - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) 72 - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
71 - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) 73 - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
72 - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`) 74 - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
73 - quick_actions_ios (from `.symlinks/plugins/quick_actions_ios/ios`) 75 - quick_actions_ios (from `.symlinks/plugins/quick_actions_ios/ios`)
74 - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) 76 - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
77 + - sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
75 - sqflite (from `.symlinks/plugins/sqflite/ios`) 78 - sqflite (from `.symlinks/plugins/sqflite/ios`)
76 - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) 79 - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
77 - vibration (from `.symlinks/plugins/vibration/ios`) 80 - vibration (from `.symlinks/plugins/vibration/ios`)
...@@ -104,8 +107,8 @@ EXTERNAL SOURCES: ...@@ -104,8 +107,8 @@ EXTERNAL SOURCES:
104 :path: ".symlinks/plugins/flutter_native_splash/ios" 107 :path: ".symlinks/plugins/flutter_native_splash/ios"
105 flutter_sound: 108 flutter_sound:
106 :path: ".symlinks/plugins/flutter_sound/ios" 109 :path: ".symlinks/plugins/flutter_sound/ios"
107 - image_picker: 110 + image_picker_ios:
108 - :path: ".symlinks/plugins/image_picker/ios" 111 + :path: ".symlinks/plugins/image_picker_ios/ios"
109 integration_test: 112 integration_test:
110 :path: ".symlinks/plugins/integration_test/ios" 113 :path: ".symlinks/plugins/integration_test/ios"
111 path_provider_ios: 114 path_provider_ios:
...@@ -118,6 +121,8 @@ EXTERNAL SOURCES: ...@@ -118,6 +121,8 @@ EXTERNAL SOURCES:
118 :path: ".symlinks/plugins/quick_actions_ios/ios" 121 :path: ".symlinks/plugins/quick_actions_ios/ios"
119 shared_preferences_ios: 122 shared_preferences_ios:
120 :path: ".symlinks/plugins/shared_preferences_ios/ios" 123 :path: ".symlinks/plugins/shared_preferences_ios/ios"
124 + sign_in_with_apple:
125 + :path: ".symlinks/plugins/sign_in_with_apple/ios"
121 sqflite: 126 sqflite:
122 :path: ".symlinks/plugins/sqflite/ios" 127 :path: ".symlinks/plugins/sqflite/ios"
123 url_launcher_ios: 128 url_launcher_ios:
...@@ -133,7 +138,7 @@ SPEC CHECKSUMS: ...@@ -133,7 +138,7 @@ SPEC CHECKSUMS:
133 AMap2DMap: cac76bc057de18a1641f34df6b50bf5bc6b23571 138 AMap2DMap: cac76bc057de18a1641f34df6b50bf5bc6b23571
134 AMapFoundation: 8d8ecbb0b2e9ce5487995360d26c885d94642bfd 139 AMapFoundation: 8d8ecbb0b2e9ce5487995360d26c885d94642bfd
135 AMapLocation: 5ef44a1117be7dc541cb7a7d43d03c5ee91e4387 140 AMapLocation: 5ef44a1117be7dc541cb7a7d43d03c5ee91e4387
136 - AMapSearch: 5c1cc07429f04b9cc76438fcb2411c66fdbbb178 141 + AMapSearch: b461cdf25b39cdca8957017de2f376cd1ac5da85
137 BIJKPlayer: 4c5d66e5cb99ae5bade6f22a4fcc031722a81c64 142 BIJKPlayer: 4c5d66e5cb99ae5bade6f22a4fcc031722a81c64
138 camera: 9993f92f2c793e87b65e35f3a23c70582afb05b1 143 camera: 9993f92f2c793e87b65e35f3a23c70582afb05b1
139 device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed 144 device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
...@@ -141,22 +146,23 @@ SPEC CHECKSUMS: ...@@ -141,22 +146,23 @@ SPEC CHECKSUMS:
141 Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 146 Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
142 flutter_2d_amap: f8ad6a1b4cf35cf9fb051a20e869e0ab1de1d250 147 flutter_2d_amap: f8ad6a1b4cf35cf9fb051a20e869e0ab1de1d250
143 flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef 148 flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
144 - flutter_sound: 6881de605c6302cfffd8fc531f37dce0d3eab238 149 + flutter_sound: 5cb54023913813abe658f7a0dcdf3740a1c0bf16
145 - flutter_sound_core: 34596cd952a1a6056c52fb07d2102487d2723d51 150 + flutter_sound_core: 76ef721d6f263ebfe9ab19798d864d999c5b8942
146 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 151 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
147 - image_picker: 541dcbb3b9cf32d87eacbd957845d8651d6c62c3 152 + image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb
148 integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5 153 integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5
149 MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb 154 MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
150 path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 155 path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
151 - permission_handler_apple: d21b38e1a4b2e041c63af9568f9165e114e507a6 156 + permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
152 qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e 157 qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
153 quick_actions_ios: 622e9076602c57f1f937f1c13e5c59c3379347e9 158 quick_actions_ios: 622e9076602c57f1f937f1c13e5c59c3379347e9
154 shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad 159 shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
160 + sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
155 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 161 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
156 url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de 162 url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
157 vibration: 1ec279c4a1a7a646627b54039d812334b3f1114a 163 vibration: 1ec279c4a1a7a646627b54039d812334b3f1114a
158 video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff 164 video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff
159 - webview_flutter_wkwebview: 005fbd90c888a42c5690919a1527ecc6649e1162 165 + webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f
160 166
161 PODFILE CHECKSUM: 3ed452d0a19c518c00c368fa2b2bb74430f6d271 167 PODFILE CHECKSUM: 3ed452d0a19c518c00c368fa2b2bb74430f6d271
162 168
......
...@@ -376,6 +376,7 @@ ...@@ -376,6 +376,7 @@
376 CLANG_ENABLE_MODULES = YES; 376 CLANG_ENABLE_MODULES = YES;
377 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 377 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
378 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 378 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
379 + DEVELOPMENT_TEAM = FLS6Y2LS7Z;
379 ENABLE_BITCODE = NO; 380 ENABLE_BITCODE = NO;
380 INFOPLIST_FILE = Runner/Info.plist; 381 INFOPLIST_FILE = Runner/Info.plist;
381 LD_RUNPATH_SEARCH_PATHS = ( 382 LD_RUNPATH_SEARCH_PATHS = (
...@@ -504,6 +505,7 @@ ...@@ -504,6 +505,7 @@
504 CLANG_ENABLE_MODULES = YES; 505 CLANG_ENABLE_MODULES = YES;
505 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 506 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
506 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 507 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
508 + DEVELOPMENT_TEAM = FLS6Y2LS7Z;
507 ENABLE_BITCODE = NO; 509 ENABLE_BITCODE = NO;
508 INFOPLIST_FILE = Runner/Info.plist; 510 INFOPLIST_FILE = Runner/Info.plist;
509 LD_RUNPATH_SEARCH_PATHS = ( 511 LD_RUNPATH_SEARCH_PATHS = (
...@@ -527,6 +529,7 @@ ...@@ -527,6 +529,7 @@
527 CLANG_ENABLE_MODULES = YES; 529 CLANG_ENABLE_MODULES = YES;
528 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 530 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
529 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 531 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
532 + DEVELOPMENT_TEAM = FLS6Y2LS7Z;
530 ENABLE_BITCODE = NO; 533 ENABLE_BITCODE = NO;
531 INFOPLIST_FILE = Runner/Info.plist; 534 INFOPLIST_FILE = Runner/Info.plist;
532 LD_RUNPATH_SEARCH_PATHS = ( 535 LD_RUNPATH_SEARCH_PATHS = (
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 <plist version="1.0"> 3 <plist version="1.0">
4 <dict> 4 <dict>
5 + <key>com.apple.developer.applesignin</key>
6 + <array>
7 + <string>Default</string>
8 + </array>
5 <key>com.apple.developer.associated-domains</key> 9 <key>com.apple.developer.associated-domains</key>
6 <array> 10 <array>
7 <string>webcredentials:yiyan.pub</string> 11 <string>webcredentials:yiyan.pub</string>
......
...@@ -18,8 +18,6 @@ class AccountViewProvider with ChangeNotifier { ...@@ -18,8 +18,6 @@ class AccountViewProvider with ChangeNotifier {
18 18
19 Future<void> fetchAccountData(String value) async { 19 Future<void> fetchAccountData(String value) async {
20 _apiResponse = ApiResponse.loading('Fetching artist data'); 20 _apiResponse = ApiResponse.loading('Fetching artist data');
21 - // TODO 不知道为啥会提前触发,先注释掉吧
22 -
23 DioUtils.instance.asyncRequestNetwork<UserEntity>( 21 DioUtils.instance.asyncRequestNetwork<UserEntity>(
24 Method.get, 22 Method.get,
25 HttpApi.user, 23 HttpApi.user,
......
1 +import 'dart:io';
2 +
1 import 'package:Parlando/login/models/auth_entity.dart'; 3 import 'package:Parlando/login/models/auth_entity.dart';
2 import 'package:Parlando/net/dio_utils.dart'; 4 import 'package:Parlando/net/dio_utils.dart';
3 import 'package:Parlando/net/http_api.dart'; 5 import 'package:Parlando/net/http_api.dart';
...@@ -20,6 +22,7 @@ import 'package:Parlando/widgets/my_app_bar.dart'; ...@@ -20,6 +22,7 @@ import 'package:Parlando/widgets/my_app_bar.dart';
20 import 'package:Parlando/widgets/my_button.dart'; 22 import 'package:Parlando/widgets/my_button.dart';
21 import 'package:Parlando/widgets/my_scroll_view.dart'; 23 import 'package:Parlando/widgets/my_scroll_view.dart';
22 import 'package:getwidget/getwidget.dart'; 24 import 'package:getwidget/getwidget.dart';
25 +import 'package:sign_in_with_apple/sign_in_with_apple.dart';
23 26
24 import '../login_router.dart'; 27 import '../login_router.dart';
25 28
...@@ -74,27 +77,27 @@ class _LoginPageState extends State<LoginPage> ...@@ -74,27 +77,27 @@ class _LoginPageState extends State<LoginPage>
74 "其他错误" 77 "其他错误"
75 ]; 78 ];
76 79
77 - Future.delayed( 80 + // Future.delayed(
78 - Duration.zero, 81 + // Duration.zero,
79 - () { 82 + // () {
80 - NavigatorUtils.pushPageByFade( 83 + // NavigatorUtils.pushPageByFade(
81 - context: context, 84 + // context: context,
82 - //目标页面 85 + // //目标页面
83 - targetPage: PermissionRequestWidget( 86 + // targetPage: PermissionRequestWidget(
84 - //所需要申请的权限 87 + // //所需要申请的权限
85 - permission: Permission.camera, 88 + // permission: Permission.camera,
86 - //显示关闭应用按钮 89 + // //显示关闭应用按钮
87 - isCloseApp: true, 90 + // isCloseApp: true,
88 - //提示文案 91 + // //提示文案
89 - permissionList: _list, 92 + // permissionList: _list,
90 - ), 93 + // ),
91 - //权限申请结果 94 + // //权限申请结果
92 - dismissCallBack: (value) { 95 + // dismissCallBack: (value) {
93 - showPrivacyPage(); 96 + // showPrivacyPage();
94 - }, 97 + // },
95 - ); 98 + // );
96 - }, 99 + // },
97 - ); 100 + // );
98 } 101 }
99 102
100 void showPrivacyPage() async { 103 void showPrivacyPage() async {
...@@ -193,100 +196,120 @@ class _LoginPageState extends State<LoginPage> ...@@ -193,100 +196,120 @@ class _LoginPageState extends State<LoginPage>
193 ); 196 );
194 } 197 }
195 198
196 - List<Widget> get _buildBody => <Widget>[ 199 + List<Widget> get _buildBody =>
197 - Text( 200 + <Widget>[
198 - ParlandoLocalizations.of(context).passwordLogin, 201 + Text(
199 - style: TextStyles.textBold26, 202 + ParlandoLocalizations.of(context).passwordLogin,
200 - ), 203 + style: TextStyles.textBold26,
201 - Gaps.vGap16, 204 + ),
202 - MyTextField( 205 + Gaps.vGap16,
203 - key: const Key('email'), 206 + MyTextField(
207 + key: const Key('email'),
204 focusNode: _nodeText1, 208 focusNode: _nodeText1,
205 controller: _nameController, 209 controller: _nameController,
206 maxLength: 100, 210 maxLength: 100,
207 keyboardType: TextInputType.emailAddress, 211 keyboardType: TextInputType.emailAddress,
208 hintText: ParlandoLocalizations.of(context).inputEmailHint, 212 hintText: ParlandoLocalizations.of(context).inputEmailHint,
209 ), 213 ),
210 - Gaps.vGap8, 214 + Gaps.vGap8,
211 - MyTextField( 215 + MyTextField(
212 - key: const Key('password'), 216 + key: const Key('password'),
213 - keyName: 'password', 217 + keyName: 'password',
214 - focusNode: _nodeText2, 218 + focusNode: _nodeText2,
215 - isInputPwd: true, 219 + isInputPwd: true,
216 - controller: _passwordController, 220 + controller: _passwordController,
217 - keyboardType: TextInputType.visiblePassword, 221 + keyboardType: TextInputType.visiblePassword,
218 - hintText: ParlandoLocalizations.of(context).inputPasswordHint, 222 + hintText: ParlandoLocalizations.of(context).inputPasswordHint,
219 - ), 223 + ),
220 - Gaps.vGap24, 224 + Gaps.vGap24,
221 - Text.rich( 225 + Text.rich(
222 - TextSpan( 226 + TextSpan(
223 - text: '登录即代表同意并阅读', 227 + text: '登录即代表同意并阅读',
224 - style: const TextStyle(fontSize: 12, color: Color(0xFF999999)), 228 + style: const TextStyle(fontSize: 12, color: Color(0xFF999999)),
225 - children: [ 229 + children: [
226 - TextSpan( 230 + TextSpan(
227 - text: '《用户协议》', 231 + text: '《用户协议》',
228 - style: TextStyle(color: Theme.of(context).primaryColor), 232 + style: TextStyle(color: Theme.of(context).primaryColor),
229 - recognizer: TapGestureRecognizer() 233 + recognizer: TapGestureRecognizer()
230 - ..onTap = () { 234 + ..onTap = () {
231 - Navigator.of(context) 235 + Navigator.of(context)
232 - .push(MaterialPageRoute(builder: (context) { 236 + .push(MaterialPageRoute(builder: (context) {
233 - return const WebViewPage(
234 - title: '《用户协议》',
235 - url: Constant.protocolUrl,
236 - );
237 - }));
238 - },
239 - ),
240 - const TextSpan(text: ' & '),
241 - TextSpan(
242 - text: '《隐私政策》',
243 - style: TextStyle(color: Theme.of(context).primaryColor),
244 - recognizer: TapGestureRecognizer()
245 - ..onTap = () {
246 - Navigator.of(context).push(
247 - MaterialPageRoute(
248 - builder: (context) {
249 return const WebViewPage( 237 return const WebViewPage(
250 - title: '《隐私政策》', 238 + title: '《用户协议》',
251 - url: Constant.privacyUrl, 239 + url: Constant.protocolUrl,
252 ); 240 );
253 - }, 241 + }));
254 - ), 242 + },
255 - ); 243 + ),
256 - }, 244 + const TextSpan(text: ' & '),
257 - ), 245 + TextSpan(
258 - ]), 246 + text: '《隐私政策》',
259 - ), 247 + style: TextStyle(color: Theme.of(context).primaryColor),
260 - Gaps.vGap16, 248 + recognizer: TapGestureRecognizer()
261 - MyButton( 249 + ..onTap = () {
262 - key: const Key('login'), 250 + Navigator.of(context).push(
263 - onPressed: _clickable ? _login : null, 251 + MaterialPageRoute(
264 - text: ParlandoLocalizations.of(context).login, 252 + builder: (context) {
265 - ), 253 + return const WebViewPage(
266 - Container( 254 + title: '《隐私政策》',
267 - height: 40.px, 255 + url: Constant.privacyUrl,
268 - alignment: Alignment.centerRight, 256 + );
269 - child: GestureDetector( 257 + },
270 - child: Text( 258 + ),
271 - ParlandoLocalizations.of(context).forgotPasswordLink, 259 + );
272 - key: const Key('forgotPassword'), 260 + },
273 - style: Theme.of(context).textTheme.subtitle2, 261 + ),
262 + ]),
274 ), 263 ),
275 - onTap: () => 264 + Gaps.vGap16,
276 - NavigatorUtils.push(context, LoginRouter.resetPasswordPage), 265 + MyButton(
277 - ), 266 + key: const Key('login'),
278 - ), 267 + onPressed: _clickable ? _login : null,
279 - Gaps.vGap16, 268 + text: ParlandoLocalizations.of(context).login,
280 - Container( 269 + ),
281 - alignment: Alignment.center, 270 + Container(
282 - child: GestureDetector( 271 + height: 40.px,
283 - child: Text( 272 + alignment: Alignment.centerRight,
284 - ParlandoLocalizations.of(context).noAccountRegisterLink, 273 + child: GestureDetector(
285 - key: const Key('noAccountRegister'), 274 + child: Text(
286 - style: TextStyle(color: Theme.of(context).primaryColor), 275 + ParlandoLocalizations.of(context).forgotPasswordLink,
276 + key: const Key('forgotPassword'),
277 + style: Theme.of(context).textTheme.subtitle2,
278 + ),
279 + onTap: () =>
280 + NavigatorUtils.push(context, LoginRouter.resetPasswordPage),
287 ), 281 ),
288 - onTap: () => 282 + ),
289 - NavigatorUtils.push(context, LoginRouter.registerPage), 283 + Gaps.vGap16,
290 - )) 284 + Container(
291 - ]; 285 + alignment: Alignment.center,
286 + child: GestureDetector(
287 + child: Text(
288 + ParlandoLocalizations.of(context).noAccountRegisterLink,
289 + key: const Key('noAccountRegister'),
290 + style: TextStyle(color: Theme.of(context).primaryColor),
291 + ),
292 + onTap: () =>
293 + NavigatorUtils.push(context, LoginRouter.registerPage),
294 + )),
295 + Gaps.vGap16,
296 + Platform.isIOS
297 + ? Center(
298 + child: SignInWithAppleButton(
299 + onPressed: () async {
300 + final credential =
301 + await SignInWithApple.getAppleIDCredential(
302 + scopes: [
303 + AppleIDAuthorizationScopes.email,
304 + AppleIDAuthorizationScopes.fullName,
305 + ],
306 + );
307 + print(credential);
308 + },
309 + ),
310 + )
311 + : const Center(
312 + child: Text(""),
313 + ),
314 + ];
292 } 315 }
......
This diff is collapsed. Click to expand it.
...@@ -109,6 +109,7 @@ dependencies: ...@@ -109,6 +109,7 @@ dependencies:
109 email_validator: ^2.0.1 109 email_validator: ^2.0.1
110 110
111 getwidget: ^2.0.5 111 getwidget: ^2.0.5
112 + sign_in_with_apple: ^3.3.0
112 113
113 dependency_overrides: 114 dependency_overrides:
114 decimal: 1.5.0 115 decimal: 1.5.0
......