2025-01-09 21:44:43 +01:00
|
|
|
import 'package:covas_mobile/classes/MyDrawer.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
|
|
|
|
import 'dart:convert';
|
|
|
|
import 'dart:io';
|
|
|
|
|
|
|
|
import '../classes/events.dart';
|
|
|
|
import '../classes/MyDrawer.dart';
|
|
|
|
|
|
|
|
import '../classes/alert.dart';
|
|
|
|
import '../classes/eventAdded.dart';
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
runApp(MyApp());
|
|
|
|
}
|
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
|
|
Events? events;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return MaterialApp(
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
home: EditSettings(),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class EditSettings extends StatefulWidget {
|
|
|
|
const EditSettings({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
_EditProfileState createState() => _EditProfileState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _EditProfileState extends State<EditSettings>
|
|
|
|
with ShowAlertDialog, ShowEventDialog {
|
|
|
|
TextEditingController inputUserName = TextEditingController();
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
appBar: AppBar(
|
2025-01-09 21:48:24 +01:00
|
|
|
title: Text("Settings"),
|
2025-01-09 21:44:43 +01:00
|
|
|
backgroundColor: Colors.blue,
|
|
|
|
foregroundColor: Colors.white,
|
|
|
|
),
|
|
|
|
drawer: MyDrawer(),
|
|
|
|
body: Form(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 15.0, right: 15.0, top: 15, bottom: 0),
|
|
|
|
//padding: EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
child: TextFormField(
|
|
|
|
controller: inputUserName,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
border: OutlineInputBorder(),
|
|
|
|
labelText: 'Pseudo',
|
|
|
|
hintText: 'Modifier le pseudo'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 30,
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
height: 50,
|
|
|
|
width: 250,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.blue,
|
|
|
|
borderRadius: BorderRadius.circular(20)),
|
|
|
|
child: TextButton(
|
2025-01-09 21:48:24 +01:00
|
|
|
onPressed: () {},
|
2025-01-09 21:44:43 +01:00
|
|
|
child: Text(
|
2025-01-09 21:48:24 +01:00
|
|
|
'Mettre à jour les paramètres',
|
2025-01-09 21:44:43 +01:00
|
|
|
style: TextStyle(color: Colors.white, fontSize: 25),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|