noise/lib/chat/chat_buttons.dart

57 lines
1.5 KiB
Dart
Raw Normal View History

2021-10-04 14:35:48 +02:00
import 'dart:ui';
import 'package:flutter/material.dart';
class ChatButton extends StatelessWidget {
2021-10-06 20:37:11 +02:00
const ChatButton({Key? key}) : super(key: key);
2021-10-06 16:27:27 +02:00
// the chat the button leads to
final _destination = null;
final _name = '';
2021-10-06 20:37:11 +02:00
2021-10-06 16:27:27 +02:00
// delete maybe, depending on where the application gets the last message
final _last_message = '';
2021-10-04 14:35:48 +02:00
@override
Widget build(BuildContext context) {
return Container(
2021-10-06 20:37:11 +02:00
child: Column(children: [
// Image of the contact
Container(
alignment: Alignment.center,
color: Colors.transparent,
margin: const EdgeInsets.all(5.0),
// ToDo: check RoundedRectangleBorder(),
child: GestureDetector(
// ToDo: open profile picture view when clicked
onTap: () => null,
child: Image.asset('yourimagefolder/yourimage.png'),
),
),
// Switches to chat "activity" when clicked
GestureDetector(
// ToDo: switch to chat
onTap: () => null,
child: Row(
children: [
Column(
children: [
// Username
Text('_Username_'),
2021-10-04 14:35:48 +02:00
2021-10-06 20:37:11 +02:00
// Container for icons on the top right
Container(),
]
),
// Last message in chat
Text('_Message_')
],
),
),
])
2021-10-04 14:35:48 +02:00
);
}
}