47 lines
1.6 KiB
Dart
47 lines
1.6 KiB
Dart
import 'package:animated_bottom_navigation_bar/animated_bottom_navigation_bar.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:get/get_state_manager/get_state_manager.dart';
|
|
import 'package:Ulak/modules/home/home_controller.dart';
|
|
import 'package:Ulak/modules/messages/messages_page.dart';
|
|
import 'package:Ulak/modules/profile/profile_page.dart';
|
|
|
|
class HomePage extends GetView<HomeController> {
|
|
const HomePage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(title: Text("Arslanşah"), backgroundColor: Colors.amber),
|
|
body: Obx(
|
|
() => IndexedStack(
|
|
index: controller.currentIndex.value,
|
|
children: [MessagesPage(), ProfilePage()],
|
|
),
|
|
),
|
|
floatingActionButton: FloatingActionButton(
|
|
onPressed: () {},
|
|
shape: CircleBorder(),
|
|
backgroundColor: Colors.black,
|
|
child: Icon(Icons.comment_rounded, color: Colors.amber),
|
|
),
|
|
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
|
bottomNavigationBar: Obx(
|
|
() => AnimatedBottomNavigationBar(
|
|
gapLocation: GapLocation.center,
|
|
icons: [Icons.message, Icons.person],
|
|
backgroundColor: Colors.amber,
|
|
splashColor: Colors.white,
|
|
activeColor: Colors.black,
|
|
inactiveColor: Colors.black45,
|
|
activeIndex: controller.currentIndex.value,
|
|
leftCornerRadius: 32,
|
|
rightCornerRadius: 32,
|
|
notchSmoothness: NotchSmoothness.softEdge,
|
|
onTap: controller.currentIndex.call,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|