Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions lib/features/chat/screens/chat_rooms_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:mostro_mobile/shared/providers/legible_handle_provider.dart';
import 'package:mostro_mobile/shared/providers/session_notifier_provider.dart';
import 'package:mostro_mobile/shared/widgets/bottom_nav_bar.dart';
import 'package:mostro_mobile/shared/widgets/mostro_app_bar.dart';
import 'package:mostro_mobile/shared/widgets/mostro_app_drawer.dart';
import 'package:mostro_mobile/shared/widgets/custom_drawer_overlay.dart';

class ChatRoomsScreen extends ConsumerWidget {
const ChatRoomsScreen({super.key});
Expand All @@ -22,27 +22,28 @@ class ChatRoomsScreen extends ConsumerWidget {
return Scaffold(
backgroundColor: AppTheme.dark1,
appBar: const MostroAppBar(),
drawer: const MostroAppDrawer(),
body: Container(
margin: const EdgeInsets.fromLTRB(16, 16, 16, 16),
decoration: BoxDecoration(
color: const Color(0xFF303544),
borderRadius: BorderRadius.circular(20),
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(16.0),
child: Text(
'CHAT',
style: TextStyle(color: AppTheme.mostroGreen),
body: CustomDrawerOverlay(
child: Container(
margin: const EdgeInsets.fromLTRB(16, 16, 16, 16),
decoration: BoxDecoration(
color: const Color(0xFF303544),
borderRadius: BorderRadius.circular(20),
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(16.0),
child: Text(
'CHAT',
style: TextStyle(color: AppTheme.mostroGreen),
),
),
),
Expanded(
child: _buildBody(chatListState),
),
const BottomNavBar(),
],
Expanded(
child: _buildBody(chatListState),
),
const BottomNavBar(),
],
),
),
),
);
Expand Down
136 changes: 81 additions & 55 deletions lib/features/home/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:mostro_mobile/shared/widgets/add_order_button.dart';
import 'package:mostro_mobile/shared/widgets/bottom_nav_bar.dart';
import 'package:mostro_mobile/shared/widgets/mostro_app_bar.dart';
import 'package:mostro_mobile/shared/widgets/order_filter.dart';
import 'package:mostro_mobile/shared/widgets/mostro_app_drawer.dart';
import 'package:mostro_mobile/shared/widgets/custom_drawer_overlay.dart';

class HomeScreen extends ConsumerWidget {
const HomeScreen({super.key});
Expand All @@ -21,69 +21,95 @@ class HomeScreen extends ConsumerWidget {
return Scaffold(
backgroundColor: AppTheme.backgroundDark,
appBar: MostroAppBar(),
drawer: const MostroAppDrawer(),
body: Stack(
children: [
RefreshIndicator(
onRefresh: () async {
return await ref.refresh(filteredOrdersProvider);
},
child: Column(
body: CustomDrawerOverlay(
child: Stack(
children: [
// Main content column with bottom navigation
Column(
children: [
_buildTabs(ref),
_buildFilterButton(context, ref),
// Content area that expands to fill available space
Expanded(
child: Container(
color: const Color(0xFF1D212C),
child: filteredOrders.isEmpty
? const Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.search_off,
color: Colors.white30,
size: 48,
),
SizedBox(height: 16),
Text(
'No orders available',
style: TextStyle(
color: Colors.white60,
fontSize: 16,
),
),
Text(
'Try changing filter settings or check back later',
style: TextStyle(
color: Colors.white38,
fontSize: 14,
),
textAlign: TextAlign.center,
),
],
child: RefreshIndicator(
onRefresh: () async {
return await ref.refresh(filteredOrdersProvider);
},
child: GestureDetector(
onHorizontalDragEnd: (details) {
if (details.primaryVelocity != null &&
details.primaryVelocity! < 0) {
ref.read(homeOrderTypeProvider.notifier).state =
OrderType.buy;
} else if (details.primaryVelocity != null &&
details.primaryVelocity! > 0) {
ref.read(homeOrderTypeProvider.notifier).state =
OrderType.sell;
}
},
child: Column(
children: [
_buildTabs(ref),
_buildFilterButton(context, ref),
Expanded(
child: Container(
color: const Color(0xFF1D212C),
child: filteredOrders.isEmpty
? const Center(
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Icon(
Icons.search_off,
color: Colors.white30,
size: 48,
),
SizedBox(height: 16),
Text(
'No orders available',
style: TextStyle(
color: Colors.white60,
fontSize: 16,
),
),
Text(
'Try changing filter settings or check back later',
style: TextStyle(
color: Colors.white38,
fontSize: 14,
),
textAlign: TextAlign.center,
),
],
),
)
: ListView.builder(
itemCount: filteredOrders.length,
padding: const EdgeInsets.only(
bottom: 100, top: 6),
itemBuilder: (context, index) {
final order = filteredOrders[index];
return OrderListItem(order: order);
},
),
),
)
: ListView.builder(
itemCount: filteredOrders.length,
padding: const EdgeInsets.only(bottom: 155, top: 6),
itemBuilder: (context, index) {
final order = filteredOrders[index];
return OrderListItem(order: order);
},
),
],
),
),
),
),
// Bottom navigation bar fixed at the bottom
const BottomNavBar(),
],
),
),
Positioned(
bottom: 80 + MediaQuery.of(context).viewPadding.bottom + 16,
right: 16,
child: const AddOrderButton(),
),
],
// Floating action button positioned above bottom nav bar
Positioned(
bottom: 80 + MediaQuery.of(context).viewPadding.bottom + 16,
right: 16,
child: const AddOrderButton(),
),
],
),
),
);
}
Expand Down
Loading