kakao_map_plugin 0.3.1 copy "kakao_map_plugin: ^0.3.1" to clipboard
kakao_map_plugin: ^0.3.1 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.

example/lib/main.dart

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 등록
  /// rest api 호출시 필요한 BASE_URL 도 등록해 주세요.
  /// 지도가 호출되기 전에만 세팅해 주면 됩니다.
  /// dotEnv 대신 appKey 를 직접 넣어주셔도 됩니다.
  AuthRepository.initialize(
      appKey: dotenv.env['APP_KEY'] ?? '',
      baseUrl: dotenv.env['BASE_URL'] ?? '');

  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(),
    );
  }
}
43
likes
160
pub points
89%
popularity

Publisher

verified publisherkkensu.com

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.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on kakao_map_plugin