Pages Implementation

Implemented Profile and Recent Conversation skeleton pages
This commit is contained in:
2025-02-07 20:13:07 +00:00
parent 7504f341d2
commit 7e33872886
15 changed files with 448 additions and 63 deletions
+68 -3
View File
@@ -1,4 +1,6 @@
import 'package:flutter/material.dart';
import 'package:messaging_app/pages/profile_page.dart';
import 'package:messaging_app/pages/recent_converstations.dart';
class HomePage extends StatefulWidget {
const HomePage({super.key});
@@ -10,17 +12,80 @@ class HomePage extends StatefulWidget {
}
}
class _HomePageState extends State<HomePage> {
class _HomePageState extends State<HomePage>
with SingleTickerProviderStateMixin {
// //
late double _deviceHeight;
late double _deviceWidth;
late TabController _tabController;
@override
void initState() {
super.initState();
_tabController = TabController(
length: 3,
vsync: this,
initialIndex: 1,
);
}
@override
void dispose() {
_tabController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
//
_deviceHeight = MediaQuery.of(context).size.height;
_deviceWidth = MediaQuery.of(context).size.width;
return Scaffold(
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: AppBar(
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
title: Text("Messaging App"),
titleTextStyle: TextStyle(fontSize: 15),
title: Text("Slick Messenger"),
titleTextStyle: TextStyle(fontSize: 16),
bottom: TabBar(
unselectedLabelColor: Colors.grey,
indicatorColor: Colors.blue,
labelColor: Colors.blue,
controller: _tabController,
tabs: [
Tab(
icon: Icon(
Icons.people_outline,
size: 25,
),
),
Tab(
icon: Icon(
Icons.chat_bubble_outline,
size: 25,
),
),
Tab(
icon: Icon(
Icons.person_outline,
size: 25,
),
),
],
),
),
body: _tabBarPages(),
);
}
Widget _tabBarPages() {
return TabBarView(
controller: _tabController,
children: [
Placeholder(),
RecentConverstationsPage(_deviceHeight, _deviceWidth),
ProfilePage(_deviceHeight, _deviceWidth),
],
);
}
}