forked from baron/baron-sso
내정보 페이지 사용성개선, adminFront user 정보 연동.
This commit is contained in:
@@ -4,7 +4,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:descope/descope.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_web_plugins/url_strategy.dart';
|
||||
import 'features/auth/presentation/login_screen.dart';
|
||||
import 'features/auth/presentation/signup_screen.dart';
|
||||
@@ -23,6 +23,18 @@ import 'package:logging/logging.dart';
|
||||
|
||||
final _log = Logger('Main');
|
||||
|
||||
Future<void> _loadBundledFonts() async {
|
||||
const family = 'NotoSansKR';
|
||||
final loader = FontLoader(family);
|
||||
try {
|
||||
loader.addFont(rootBundle.load('assets/fonts/NotoSansKR-Regular.ttf'));
|
||||
loader.addFont(rootBundle.load('assets/fonts/NotoSansKR-Bold.ttf'));
|
||||
await loader.load();
|
||||
} catch (e) {
|
||||
_log.warning("Failed to preload bundled fonts: $e");
|
||||
}
|
||||
}
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
usePathUrlStrategy();
|
||||
@@ -51,6 +63,9 @@ void main() async {
|
||||
// 0. Initialize Logger
|
||||
LoggerService.init();
|
||||
|
||||
// 폰트를 먼저 로딩해서 렌더링 깨짐(FOIT/FOUT) 최소화
|
||||
await _loadBundledFonts();
|
||||
|
||||
// Initialize Descope (프로젝트 ID가 없으면 경고만 남기고 진행)
|
||||
final projectId = dotenv.maybeGet('DESCOPE_PROJECT_ID') ?? '';
|
||||
if (projectId.isEmpty || projectId == 'your-project-id') {
|
||||
@@ -228,7 +243,7 @@ class BaronSSOApp extends StatelessWidget {
|
||||
brightness: Brightness.light,
|
||||
),
|
||||
useMaterial3: true,
|
||||
textTheme: GoogleFonts.interTextTheme(),
|
||||
fontFamily: 'NotoSansKR',
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
builders: {
|
||||
TargetPlatform.android: NoTransitionsBuilder(),
|
||||
|
||||
Reference in New Issue
Block a user