如图,实现这种,
- 滑动吸附效果的应用场景(如电商分类导航、Tab栏联动)


import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: MapWithListPage(),
);
}
}
class MapWithListPage extends StatelessWidget {
const MapWithListPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: [
// 底层地图
Container(
color: Colors.blue[200], // 占位,可以替换成地图
child: const Center(child: Text("地图在这里")),
),

最低0.47元/天 解锁文章
1635

被折叠的 条评论
为什么被折叠?



