kakao_map_plugin 0.2.3 kakao_map_plugin: ^0.2.3 copied to clipboard
This is a plug-in project made by using the webview_flutter package so that the javascript of Kakao map api can be used on the flutter.
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:kakao_map_plugin/kakao_map_plugin.dart';
import 'package:kakao_map_plugin_example/src/home_screen.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: 'assets/env/.env');
/// 라이브러리 메모리에 appKey 등록
/// 지도가 호출되기 전에만 세팅해 주면 됩니다.
/// dotEnv 대신 appKey 를 직접 넣어주셔도 됩니다.
AuthRepository.initialize(appKey: dotenv.env['APP_KEY'] ?? '');
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: HomeScreen(),
);
}
}