import 'package:flutter/material.dart'; import 'package:hlibrary/main.dart';
class Panel extends StatelessWidget { const Panel({Key? key});
@override Widget build(BuildContext context) {
return Stack(
children: [
Scaffold(
appBar: AppBar(
centerTitle: false,
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Hlibrary",
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Colors.orangeAccent,
),),
Text("Admin Panel",
style: Theme.of(context).textTheme.titleLarge!.copyWith(
color: Colors.orangeAccent,
),),
],)
),
floatingActionButton: FloatingActionButton(
onPressed: (){},
backgroundColor: Colors.orangeAccent,
child: const Icon(Icons.add),
),
drawer: Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: <Widget>[
const DrawerHeader(
decoration: BoxDecoration(
color: Color(0xFFFFB800),
),
child: Text(
'Admin Tengis',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
),
ListTile(
leading: Icon(Icons.add),
title: const Text('Add'),
onTap: () {
// Handle Option 1
},
),
ListTile(
leading: Icon(Icons.list),
title: const Text('Added files'),
onTap: () {
// Handle Option 2
},
),
ListTile(
leading: Icon(Icons.arrow_back),
title: const Text('Go back'),
onTap: () {
Navigator.pop(context);
},
),
// Add more ListTile for additional options
],
),
),
body: ListView(
),
),
],
);
} }
enter image description here it looks like this and I want to add categories of book when I tap the add button which is on right down corner
You can handle it that way, just make a list to store selected categories and display that list.
Regardless where are those categories are displayed in a drawer or even in the body.
Figure out how the idea works, and apply it.