generated from ttipo/project-base
19f3574d97
패키지 ID 는 스토어 등록·네이버 지도 Client ID 등록에 쓰이고 출시 후 바꿀 수 없어 템플릿 값(com.example.tma_app)을 보유 도메인(wandergo.net) 기준으로 정했다(2026-11-04 사용자 결정). Android applicationId·namespace·MainActivity 경로, iOS 번들 ID 를 바꾸고 출시 대상이 아닌 macOS·Linux·웹은 식별자·이름만 맞췄다. 디자인 캔버스의 Pretendard 는 woff2 라 Flutter 가 읽지 못해, 공식 저장소 (github.com/orioncactus/pretendard v1.3.9)의 정적 OTF 중 디자인이 쓰는 400·500·600·700 만 넣었다. SIL OFL 1.1 원문을 함께 두고 라이선스 화면에 등록했다(고지 조건). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.2 KiB
Dart
33 lines
1.2 KiB
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
import 'package:wandergo/app.dart';
|
|
import 'package:wandergo/core/storage/preferences.dart';
|
|
|
|
Future<void> main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
// dotenv 로드 — .env 파일이 없으면 기본값으로 동작
|
|
try {
|
|
await dotenv.load(fileName: '.env');
|
|
} catch (_) {
|
|
// .env 파일이 없는 경우 무시 (기본값 사용)
|
|
}
|
|
final preferences = await SharedPreferences.getInstance();
|
|
// 번들한 글꼴의 라이선스 — 패키지 라이선스와 함께 라이선스 화면에 보인다(OFL 고지 의무)
|
|
LicenseRegistry.addLicense(() async* {
|
|
final text = await rootBundle.loadString('assets/fonts/OFL.txt');
|
|
yield LicenseEntryWithLineBreaks(const ['Pretendard'], text);
|
|
});
|
|
|
|
runApp(
|
|
ProviderScope(
|
|
overrides: [sharedPreferencesProvider.overrideWithValue(preferences)],
|
|
child: const WanderGoApp(),
|
|
),
|
|
);
|
|
}
|