공개페이지 완료
This commit is contained in:
@@ -41,7 +41,7 @@ class _JoinDialogState extends State<JoinDialog> {
|
||||
Navigator.of(context).pop(true);
|
||||
} catch (e) {
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text('신청 실패: ' + e.toString())));
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text('신청 실패: $e')));
|
||||
} finally {
|
||||
if (mounted) setState(() => _saving = false);
|
||||
}
|
||||
|
||||
@@ -5,14 +5,19 @@ import 'package:lanebow/services/public_event_service.dart';
|
||||
class PublicEventEntryScreen extends StatefulWidget {
|
||||
final String publicHash;
|
||||
final PublicEventService? service;
|
||||
const PublicEventEntryScreen({super.key, required this.publicHash, this.service});
|
||||
const PublicEventEntryScreen({
|
||||
super.key,
|
||||
required this.publicHash,
|
||||
this.service,
|
||||
});
|
||||
|
||||
@override
|
||||
State<PublicEventEntryScreen> createState() => _PublicEventEntryScreenState();
|
||||
}
|
||||
|
||||
class _PublicEventEntryScreenState extends State<PublicEventEntryScreen> {
|
||||
late final PublicEventService _service = widget.service ?? PublicEventService();
|
||||
late final PublicEventService _service =
|
||||
widget.service ?? PublicEventService();
|
||||
final TextEditingController _pw = TextEditingController();
|
||||
bool _loading = false;
|
||||
String? _error;
|
||||
@@ -37,7 +42,9 @@ class _PublicEventEntryScreenState extends State<PublicEventEntryScreen> {
|
||||
// 성공 시 토큰 저장은 서비스가 처리. 공개 화면으로 이동
|
||||
if (!mounted) return;
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(builder: (_) => PublicEventScreen(publicHash: widget.publicHash)),
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PublicEventScreen(publicHash: widget.publicHash),
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
// 401/needPassword 케이스 포함: 간단히 비번 입력 노출
|
||||
@@ -63,8 +70,6 @@ class _PublicEventEntryScreenState extends State<PublicEventEntryScreen> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('hash: ' + widget.publicHash),
|
||||
const SizedBox(height: 16),
|
||||
if (_loading) const LinearProgressIndicator(),
|
||||
if (_error != null) ...[
|
||||
Text(_error!, style: const TextStyle(color: Colors.red)),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user