diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 3205301..04de280 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -17,11 +17,6 @@ class _HomePageState extends State { @override Widget build(BuildContext context) { - const AMapWidget map = AMapWidget( - ///必须正确设置的合规隐私声明,否则SDK不会工作,会造成地图白屏等问题。 - privacyStatement: ConstConfig.amapPrivacyStatement, - apiKey: ConstConfig.amapApiKeys, - ); return Scaffold( appBar: AppBar( title: const Text( @@ -228,6 +223,19 @@ class _HomePageState extends State { } Widget buildBottomWidget() { - return Container(); + const AMapWidget map = AMapWidget( + ///必须正确设置的合规隐私声明,否则SDK不会工作,会造成地图白屏等问题。 + privacyStatement: ConstConfig.amapPrivacyStatement, + apiKey: ConstConfig.amapApiKeys, + ); + return Expanded( + child: Container( + margin: const EdgeInsets.only(top: 10,bottom: 10), + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(5))), + child: map, + ), + ); } }