1
0
forked from baron/baron-sso

namecard 연동

This commit is contained in:
2026-01-06 09:49:11 +09:00
parent c56368d1cb
commit c512f0f4e6
13 changed files with 693 additions and 50 deletions

View File

@@ -0,0 +1,42 @@
import 'package:flutter/material.dart';
import 'package:descope/descope.dart';
import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
class DashboardScreen extends StatelessWidget {
const DashboardScreen({super.key});
Future<void> _logout(BuildContext context) async {
Descope.sessionManager.clearSession();
if (context.mounted) context.go('/');
}
@override
Widget build(BuildContext context) {
final user = Descope.sessionManager.session?.user;
final userName = user?.name ?? user?.email ?? user?.phone ?? 'User';
return Scaffold(
appBar: AppBar(
title: Text('Baron Launcher', style: GoogleFonts.outfit(fontWeight: FontWeight.bold)),
actions: [
IconButton(
icon: const Icon(Icons.logout),
onPressed: () => _logout(context),
tooltip: 'Sign Out',
),
],
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Dashboard Loaded Successfully', style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)),
const SizedBox(height: 20),
Text('Welcome, $userName'),
],
),
),
);
}
}