test hamburger bar
This commit is contained in:
parent
6e5994e4dd
commit
938b677b6e
49
covas_mobile/lib/classes/MyDrawer.dart
Normal file
49
covas_mobile/lib/classes/MyDrawer.dart
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class MyDrawer extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Drawer(
|
||||||
|
child: ListView(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
children: [
|
||||||
|
// Drawer Header
|
||||||
|
DrawerHeader(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.blue,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'Menu',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Drawer Items
|
||||||
|
ListTile(
|
||||||
|
leading: Icon(Icons.home),
|
||||||
|
title: Text('Home'),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context); // Close the drawer
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
leading: Icon(Icons.settings),
|
||||||
|
title: Text('Settings'),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context); // Close the drawer
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
leading: Icon(Icons.info),
|
||||||
|
title: Text('About'),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context); // Close the drawer
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -5,6 +5,7 @@ import 'dart:convert';
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'ItemMenu.dart';
|
import 'ItemMenu.dart';
|
||||||
import '../classes/events.dart';
|
import '../classes/events.dart';
|
||||||
|
import '../classes/MyDrawer.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:intl/date_symbol_data_local.dart';
|
import 'package:intl/date_symbol_data_local.dart';
|
||||||
@ -742,6 +743,7 @@ class _MyHomePageState extends State<ListItemMenu> {
|
|||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
),
|
),
|
||||||
|
drawer: MyDrawer(),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
if (showInputSearch) _buildItemZoneSearchField(),
|
if (showInputSearch) _buildItemZoneSearchField(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user