首页 > 解决方案 > 如何在 Flutter 上放置多个 SlidingUpPanels?

问题描述

我想SlidingUpPanel在我的页面上添加多个s,但我不知道该怎么做。我做了一些研究,但还没有找到解决方案。如果有人可以帮助我或提供另一种选择,我会非常满意。这是我到目前为止所拥有的,但结果并不是我所期望的。

import 'package:flutter/material.dart';
import 'package:sliding_up_panel/sliding_up_panel.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("SlidingUpPanelExample"),
        ),
        body: Stack(
          children: <Widget>[
            Center(
              child: Text("This is the Widget behind the sliding panel"),
            ),
            SlidingUpPanel(
              panel: Center(
                child: Text("This is the sliding Widget"),
              ),
            ),
            SlidingUpPanel(
              panel: Center(
                child: Text("This is the sliding Widget 122"),
              ),
            )
          ],
        )
      ),
    );
  }
}

标签: androidflutterandroid-sliding

解决方案


推荐阅读