2024-02-18 22:12:08 +08:00
|
|
|
|
import 'package:amap_flutter_map/amap_flutter_map.dart';
|
|
|
|
|
import 'package:autosos_flutter/const_config.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class HomePage extends StatefulWidget {
|
|
|
|
|
const HomePage({super.key});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
State<HomePage> createState() => _HomePageState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _HomePageState extends State<HomePage> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
const AMapWidget map = AMapWidget(
|
|
|
|
|
///必须正确设置的合规隐私声明,否则SDK不会工作,会造成地图白屏等问题。
|
|
|
|
|
privacyStatement: ConstConfig.amapPrivacyStatement,
|
|
|
|
|
apiKey: ConstConfig.amapApiKeys,
|
|
|
|
|
);
|
|
|
|
|
return Scaffold(
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
2024-02-21 22:40:10 +08:00
|
|
|
|
Text("hello world")
|
2024-02-18 22:12:08 +08:00
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|