amap_map_fluttify 0.14.1+e26c0fa copy "amap_map_fluttify: ^0.14.1+e26c0fa" to clipboard
amap_map_fluttify: ^0.14.1+e26c0fa copied to clipboard

outdated

An `Amap` Map Component, Powered By `Fluttify` Engine.

example/lib/main.dart

import 'package:amap_map_fluttify/amap_map_fluttify.dart';
import 'package:flutter/material.dart';
import 'package:oktoast/oktoast.dart';

import 'map/map.screen.dart';

Future<void> main() async {
  runApp(MyApp());

//  await enableFluttifyLog(false); // 关闭log
  await AmapCore.init('7a04506d15fdb7585707f7091d715ef4');
}

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return OKToast(
      child: MaterialApp(
        home: Scaffold(
          appBar: AppBar(title: const Text('AMaps examples')),
          backgroundColor: Colors.grey.shade200,
          body: MapDemo(),
        ),
      ),
    );
  }
}