我有一个顶部栏,左侧(设置)和右侧(配置文件)带有图标。我需要一个抽屉根据单击的图标从左侧或右侧滑出。我的左侧(设置)工作正常,但是我不明白如何在一个页面上有两个抽屉。
我相信拥有两个抽屉比根据所选链接以编程方式编辑抽屉更有意义,但我以前也经常犯错:)
import 'package:curved_navigation_bar/curved_navigation_bar.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'GovMatrix',
theme: ThemeData(
brightness: Brightness.dark,
primaryColor: Colors.black,
accentColor: Colors.grey,
//canvasColor: Colors.grey[300],
//canvasColor: Colors.transparent,
canvasColor: Colors.transparent,
fontFamily: 'Calibri',
textTheme: TextTheme(
headline: TextStyle(
fontSize: 72.0,
color: Colors.black,
fontWeight: FontWeight.bold,
),
title: TextStyle(
fontSize: 36.0,
color: Colors.black,
fontStyle: FontStyle.normal,
),
body1: TextStyle(
fontSize: 14.0,
color: Colors.black,
),
),
),
home: BottomNavBar(),
);
}
}
class BottomNavBar extends StatefulWidget {
@override …Run Code Online (Sandbox Code Playgroud)