add drawer to every page

This commit is contained in:
Valentin CZERYBA 2025-01-10 21:06:41 +01:00
parent 54c95a230b
commit 524427a29f
9 changed files with 23 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import '../classes/MyDrawer.dart';
import 'DisplayPictureScreen.dart'; import 'DisplayPictureScreen.dart';
import 'package:camera/camera.dart'; import 'package:camera/camera.dart';
@ -93,6 +94,8 @@ class CameraState extends State<Camera> {
// You must wait until the controller is initialized before displaying the // You must wait until the controller is initialized before displaying the
// camera preview. Use a FutureBuilder to display a loading spinner until the // camera preview. Use a FutureBuilder to display a loading spinner until the
// controller has finished initializing. // controller has finished initializing.
drawer: MyDrawer(),
body: FutureBuilder<void>( body: FutureBuilder<void>(
future: _initializeControllerFuture, future: _initializeControllerFuture,
builder: (context, snapshot) { builder: (context, snapshot) {

View File

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:io'; import 'dart:io';
import '../classes/events.dart'; import '../classes/events.dart';
import '../classes/MyDrawer.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'EditEvent.dart'; import 'EditEvent.dart';
import 'package:camera/camera.dart'; import 'package:camera/camera.dart';
@ -93,6 +94,8 @@ class CameraEditState extends State<CameraEdit> {
// You must wait until the controller is initialized before displaying the // You must wait until the controller is initialized before displaying the
// camera preview. Use a FutureBuilder to display a loading spinner until the // camera preview. Use a FutureBuilder to display a loading spinner until the
// controller has finished initializing. // controller has finished initializing.
drawer: MyDrawer(),
body: FutureBuilder<void>( body: FutureBuilder<void>(
future: _initializeControllerFuture, future: _initializeControllerFuture,
builder: (context, snapshot) { builder: (context, snapshot) {

View File

@ -12,6 +12,7 @@ import 'UpdateEventImage.dart';
import 'dart:convert'; import 'dart:convert';
import '../variable/globals.dart' as globals; import '../variable/globals.dart' as globals;
import '../classes/MyDrawer.dart';
void main() { void main() {
runApp(MyApp()); runApp(MyApp());
@ -158,6 +159,8 @@ class DisplayPictureScreenState extends State<DisplayPictureScreen>
appBar: AppBar(title: const Text('Display the Picture')), appBar: AppBar(title: const Text('Display the Picture')),
// The image is stored as a file on the device. Use the `Image.file` // The image is stored as a file on the device. Use the `Image.file`
// constructor with the given path to display the image. // constructor with the given path to display the image.
drawer: MyDrawer(),
body: Padding( body: Padding(
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0),
child: Column( child: Column(

View File

@ -11,6 +11,7 @@ import 'dart:io';
import 'dart:typed_data'; import 'dart:typed_data';
import '../classes/events.dart'; import '../classes/events.dart';
import '../classes/MyDrawer.dart';
import 'ItemMenu.dart'; import 'ItemMenu.dart';
import 'CameraEdit.dart'; import 'CameraEdit.dart';
@ -465,6 +466,8 @@ class _EditEventState extends State<EditEvent>
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
drawer: MyDrawer(),
appBar: AppBar( appBar: AppBar(
title: Text("Add or Update a event"), title: Text("Add or Update a event"),
backgroundColor: Colors.blue, backgroundColor: Colors.blue,

View File

@ -14,6 +14,7 @@ import 'package:intl/date_symbol_data_local.dart';
import '../variable/globals.dart' as globals; import '../variable/globals.dart' as globals;
import '../classes/events.dart'; import '../classes/events.dart';
IMPORT '../classes/MyDrawer.dart';
import 'ListItemMenu.dart'; import 'ListItemMenu.dart';
import 'MapboxPages.dart'; import 'MapboxPages.dart';
@ -215,6 +216,7 @@ class _ItemMenuState extends State<ItemMenu> with ShowAlertDialog {
context, MaterialPageRoute(builder: (_) => ListItemMenu())); context, MaterialPageRoute(builder: (_) => ListItemMenu()));
}, },
)), )),
drawer: MyDrawer(),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[

View File

@ -10,6 +10,7 @@ import 'package:intl/intl.dart';
import 'package:intl/date_symbol_data_local.dart'; import 'package:intl/date_symbol_data_local.dart';
import '../variable/globals.dart' as globals; import '../variable/globals.dart' as globals;
import '../classes/MyDrawer.dart';
// app starting point // app starting point
void main() { void main() {
@ -63,6 +64,7 @@ class _MyHomePageState extends State<ListItemOrganizers> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
drawer: MyDrawer(),
body: Center( body: Center(
// FutureBuilder // FutureBuilder
child: FutureBuilder<List<Events>>( child: FutureBuilder<List<Events>>(

View File

@ -11,6 +11,8 @@ import 'package:intl/date_symbol_data_local.dart';
import '../variable/globals.dart' as globals; import '../variable/globals.dart' as globals;
import '../classes/MyDrawer.dart';
// app starting point // app starting point
void main() { void main() {
initializeDateFormatting("fr_FR", null).then((_) => (const MyApp())); initializeDateFormatting("fr_FR", null).then((_) => (const MyApp()));
@ -62,6 +64,7 @@ class _MyHomePageState extends State<ListItemTags> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
drawer: MyDrawer(),
body: Center( body: Center(
// FutureBuilder // FutureBuilder
child: FutureBuilder<List<Events>>( child: FutureBuilder<List<Events>>(

View File

@ -10,6 +10,7 @@ import 'package:geolocator/geolocator.dart'; // For getting the user's location
import '../classes/alert.dart'; // Assuming this contains your error dialog code. import '../classes/alert.dart'; // Assuming this contains your error dialog code.
import '../variable/globals.dart' as globals; import '../variable/globals.dart' as globals;
import '../classes/MyDrawer.dart';
void main() async { void main() async {
await dotenv.load(fileName: ".env"); // Load .env file await dotenv.load(fileName: ".env"); // Load .env file
@ -375,6 +376,7 @@ class _MapboxPagesState extends State<MapboxPages> with ShowAlertDialog {
) )
], ],
), ),
drawer: MyDrawer(),
body: Stack( body: Stack(
children: [ children: [
isLoading isLoading

View File

@ -5,7 +5,7 @@ import 'package:uuid/uuid.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:textfield_tags/textfield_tags.dart'; import 'package:textfield_tags/textfield_tags.dart';
import '../classes/MyDrawer.dart';
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'dart:typed_data'; import 'dart:typed_data';
@ -420,6 +420,7 @@ class _UpdateeventImageState extends State<UpdateeventImage>
backgroundColor: Colors.blue, backgroundColor: Colors.blue,
foregroundColor: Colors.white, foregroundColor: Colors.white,
), ),
drawer: MyDrawer(),
body: Form( body: Form(
key: _formKey, key: _formKey,
child: SingleChildScrollView( child: SingleChildScrollView(