fix some visuals problems
continuous-integration/drone/push Build is passing Details

#MSG01/ImplementationFirebaseMessaging
Lucas Delanier 2 years ago
parent b53f683da7
commit a029de17c9

@ -1,5 +1,6 @@
<component name="ProjectCodeStyleConfiguration"> <component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173"> <code_scheme name="Project" version="173">
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
<JetCodeStyleSettings> <JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" /> <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings> </JetCodeStyleSettings>

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -227,7 +227,7 @@ class CardProvider extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
} }
final messageTextField = TextEditingController();
void message(context) { void message(context) {
dev.log("message"); dev.log("message");
_angle = 0; _angle = 0;
@ -249,7 +249,6 @@ class CardProvider extends ChangeNotifier {
} }
Widget buildSheet(context) { Widget buildSheet(context) {
final messageTextField = TextEditingController();
return SingleChildScrollView( return SingleChildScrollView(
padding: padding:
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
@ -302,26 +301,28 @@ class CardProvider extends ChangeNotifier {
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(20), padding: const EdgeInsets.all(20),
child: TextField( child: Form(
keyboardAppearance: Brightness.dark, child: TextField(
controller: messageTextField, keyboardAppearance: Brightness.dark,
maxLength: 300, controller: messageTextField,
style: TextStyle( maxLength: 300,
fontFamily: 'DMSans', style: TextStyle(
color: Colors.white.withOpacity(1), fontFamily: 'DMSans',
fontSize: 17, color: Colors.white.withOpacity(1),
fontWeight: FontWeight.w200), fontSize: 17,
expands: true, fontWeight: FontWeight.w200),
maxLines: null, expands: true,
textInputAction: TextInputAction.send, maxLines: null,
decoration: const InputDecoration( decoration: const InputDecoration(
hintStyle: TextStyle( hintStyle: TextStyle(
color: Colors.white, color: Colors.white,
),
border: InputBorder.none,
hintText: "Mon message",
), ),
border: InputBorder.none,
hintText: "Mon message",
), ),
), )
), ),
), ),
const SizedBox( const SizedBox(
@ -629,3 +630,5 @@ Object notify(int index, context, {bool isError = true}) {
))); )));
} }
} }

@ -14,7 +14,6 @@ class ConversationPage extends StatefulWidget {
} }
class _ConversationPageState extends State<ConversationPage> { class _ConversationPageState extends State<ConversationPage> {
String destinataire = 'test';
List<Widget> messages = []; List<Widget> messages = [];
bool isNull = true; bool isNull = true;
final String receiver; final String receiver;
@ -140,8 +139,9 @@ class _ConversationPageState extends State<ConversationPage> {
width: 40, width: 40,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40), borderRadius: BorderRadius.circular(40),
color: Colors.blue,
), ),
child: Image.asset('assets/images/DaflUser_profil.png'),
), ),
const SizedBox( const SizedBox(
width: 20, width: 20,
@ -194,7 +194,7 @@ class _ConversationPageState extends State<ConversationPage> {
itemBuilder: (context, index) => itemBuilder: (context, index) =>
messageWidget(listMessage[index]), messageWidget(listMessage[index]),
reverse: false, reverse: true,
controller: listScrollController, controller: listScrollController,
); );
} else { } else {
@ -250,7 +250,7 @@ class _ConversationPageState extends State<ConversationPage> {
receiver); receiver);
if (listScrollController.hasClients) { if (listScrollController.hasClients) {
final position = final position =
listScrollController.position.maxScrollExtent; listScrollController.position.minScrollExtent;
listScrollController.jumpTo(position); listScrollController.jumpTo(position);
} }
messageTextField.clear(); messageTextField.clear();
@ -285,9 +285,9 @@ class _ConversationPageState extends State<ConversationPage> {
), ),
); );
} }
final messageReportTextField = TextEditingController();
Widget buildSheet() { Widget buildSheet() {
final messageTextField = TextEditingController();
return SingleChildScrollView( return SingleChildScrollView(
padding: padding:
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
@ -374,7 +374,7 @@ class _ConversationPageState extends State<ConversationPage> {
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
), ),
child: TextField( child: TextField(
controller: messageTextField, controller: messageReportTextField,
keyboardAppearance: Brightness.dark, keyboardAppearance: Brightness.dark,
style: TextStyle( style: TextStyle(
fontFamily: 'DMSans', fontFamily: 'DMSans',
@ -405,9 +405,9 @@ class _ConversationPageState extends State<ConversationPage> {
onPressed: () { onPressed: () {
MyApp.controller.sendEmail( MyApp.controller.sendEmail(
MyApp.controller.getIdDafl().toString(), MyApp.controller.getIdDafl().toString(),
destinataire, receiver,
currentValue, currentValue,
messageTextField.text); messageReportTextField.text);
Navigator.pop(context); Navigator.pop(context);
}, },
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(

@ -1,7 +1,7 @@
import 'dart:collection'; import 'dart:collection';
import 'package:dafl_project_flutter/main.dart'; import 'package:dafl_project_flutter/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:scroll_loop_auto_scroll/scroll_loop_auto_scroll.dart';
import 'dart:developer' as dev; import 'dart:developer' as dev;
import '../../../model/music.dart'; import '../../../model/music.dart';
@ -120,12 +120,13 @@ class _DiscoveryListState extends State<DiscoveryList> {
} }
refreshList() async { refreshList() async {
await Future.delayed(const Duration(seconds: 1)); await Future.delayed(const Duration(seconds: 3));
setState(() {}); setState(() {});
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double width = MediaQuery.of(context).size.width;
late LinkedHashMap<Music, DateTime> listDiscoveries; late LinkedHashMap<Music, DateTime> listDiscoveries;
if (MyApp.controller.getChoice()) { if (MyApp.controller.getChoice()) {
//TODO : implement sort by date //TODO : implement sort by date
@ -224,19 +225,51 @@ class _DiscoveryListState extends State<DiscoveryList> {
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
children: [ children: [
Text( MyApp.controller
MyApp.controller .getDiscoveries()
.getDiscoveries() .keys
.keys .toList()[reversedIndex]
.toList()[reversedIndex] .name
.name, .length >
style: TextStyle( 22
fontFamily: 'DMSans', ? SizedBox(
color: width: width * 0.60,
Colors.white.withOpacity(1), child: ScrollLoopAutoScroll(
fontSize: 20, delayAfterScrollInput:
fontWeight: FontWeight.w800), Duration(seconds: 1),
), delay: Duration(seconds: 1),
child: Text(
MyApp.controller
.getDiscoveries()
.keys
.toList()[reversedIndex]
.name,
style: TextStyle(
fontSize: 20,
color: Colors.white,
fontWeight:
FontWeight.bold),
),
duration:
Duration(seconds: 100),
scrollDirection:
Axis.horizontal,
),
)
: Text(
MyApp.controller
.getDiscoveries()
.keys
.toList()[reversedIndex]
.name,
style: TextStyle(
fontFamily: 'DMSans',
color: Colors.white
.withOpacity(1),
fontSize: 20,
fontWeight:
FontWeight.w800),
),
Text( Text(
MyApp.controller MyApp.controller
.getDiscoveries() .getDiscoveries()

@ -67,7 +67,7 @@ class _MessagesWidgetState extends State<MessagesWidget> {
color: Colors.grey.withOpacity(0.4), fontSize: 15), color: Colors.grey.withOpacity(0.4), fontSize: 15),
), ),
Padding( Padding(
padding: EdgeInsets.fromLTRB(0, height * 0.01, 0, 0), padding: EdgeInsets.fromLTRB(0, height * 0.01, 0, height * 0.01),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
@ -155,8 +155,7 @@ class MessagesButtonWidget extends StatelessWidget {
width: 60, width: 60,
decoration: BoxDecoration( decoration: BoxDecoration(
image: const DecorationImage( image: const DecorationImage(
image: NetworkImage( image: AssetImage('assets/images/DaflUser_profil.png'),
'https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'),
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
border: Border.all( border: Border.all(

@ -16,6 +16,8 @@ class SpotsWidget extends StatefulWidget {
} }
class _SpotsWidgetState extends State<SpotsWidget> { class _SpotsWidgetState extends State<SpotsWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double height = MediaQuery.of(context).size.height; double height = MediaQuery.of(context).size.height;

Loading…
Cancel
Save