flutter_bmfbase 1.0.2 copy "flutter_bmfbase: ^1.0.2" to clipboard
flutter_bmfbase: ^1.0.2 copied to clipboard

discontinuedreplaced by: flutter_baidu_mapapi_base

The flutter_base plugin offer public flutter and native(include Android and iOS) lib for other compnent.

example/lib/main.dart

import 'dart:io' show Platform;
import 'package:flutter/material.dart';
import 'package:flutter_bmfbase/BaiduMap/bmfmap_base.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  // 百度地图sdk初始化鉴权
  if (Platform.isIOS) {
    BMFMapSDK.setApiKeyAndCoordType(
        'yFDD3IlfSk2xTdQ0G41MjRnzd5gUVG1C', BMF_COORD_TYPE.BD09LL);
  } else if (Platform.isAndroid) {
    // Android 目前不支持接口设置Apikey,
    // 请在主工程的Manifest文件里设置,详细配置方法请参考官网(https://lbsyun.baidu.com/)demo
    BMFMapSDK.setCoordType(BMF_COORD_TYPE.BD09LL);
  }
  ;
  ;
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  // String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    // initPlatformState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: \n'),
        ),
      ),
    );
  }
}
0
likes
25
pub points
43%
popularity

Publisher

unverified uploader

The flutter_base plugin offer public flutter and native(include Android and iOS) lib for other compnent.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_bmfbase