58 lines
1.4 KiB
Dart
58 lines
1.4 KiB
Dart
|
import 'package:flutter/material.dart';
|
||
|
import 'package:go_router/go_router.dart';
|
||
|
|
||
|
import 'package:together_mobile/screens/message/components/message_input_box.dart';
|
||
|
|
||
|
import 'components/message_bubble.dart';
|
||
|
|
||
|
class MessageScreen extends StatefulWidget {
|
||
|
const MessageScreen({super.key});
|
||
|
|
||
|
@override
|
||
|
State<MessageScreen> createState() => _MessageScreenState();
|
||
|
}
|
||
|
|
||
|
class _MessageScreenState extends State<MessageScreen> {
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Scaffold(
|
||
|
appBar: AppBar(
|
||
|
leading: IconButton(
|
||
|
onPressed: () {
|
||
|
context.go('/chat');
|
||
|
},
|
||
|
icon: const Icon(Icons.arrow_back),
|
||
|
),
|
||
|
title: const Text('your friend name'),
|
||
|
centerTitle: true,
|
||
|
actions: [
|
||
|
IconButton(
|
||
|
onPressed: () {},
|
||
|
icon: const Icon(Icons.menu),
|
||
|
splashRadius: 18,
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
body: SafeArea(
|
||
|
child: Column(
|
||
|
children: [
|
||
|
Expanded(
|
||
|
child: ListView.builder(
|
||
|
physics: const BouncingScrollPhysics(
|
||
|
parent: AlwaysScrollableScrollPhysics(),
|
||
|
),
|
||
|
itemCount: 12,
|
||
|
itemBuilder: (context, index) {
|
||
|
return const MessageBubble();
|
||
|
},
|
||
|
),
|
||
|
),
|
||
|
const MessageInputBox(),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
bottomNavigationBar: null,
|
||
|
);
|
||
|
}
|
||
|
}
|