You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.7 KiB
50 lines
1.7 KiB
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import '../../../core/theme/app_colors.dart';
|
|
import '../controllers/usage_controller.dart';
|
|
|
|
class UsageView extends GetView<UsageController> {
|
|
const UsageView({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final isDarkMode = Theme.of(context).brightness == Brightness.dark;
|
|
|
|
return Scaffold(
|
|
backgroundColor: isDarkMode ? AppColors.darkBackground : Colors.grey[50],
|
|
body: PageView(
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
controller: controller.pageController,
|
|
children: controller.pageList,
|
|
),
|
|
bottomNavigationBar: Obx(
|
|
() => BottomNavigationBar(
|
|
items: [
|
|
BottomNavigationBarItem(
|
|
icon: const Icon(Icons.translate),
|
|
label: 'interpretation'.tr,
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: const Icon(Icons.groups),
|
|
label: 'meeting'.tr,
|
|
),
|
|
],
|
|
backgroundColor: isDarkMode ? Colors.black : const Color(0xFFF9FAFB),
|
|
currentIndex: controller.pageIndex.value,
|
|
unselectedItemColor: isDarkMode ? Colors.grey[500] : const Color(0xFF6B7280),
|
|
selectedItemColor: const Color(0xFF3B82F6),
|
|
unselectedFontSize: 10.sp,
|
|
selectedFontSize: 10.sp,
|
|
onTap: (int index) {
|
|
if (index == controller.pageIndex.value) return;
|
|
controller.pageIndex.value = index;
|
|
controller.pageController.jumpToPage(index);
|
|
},
|
|
type: BottomNavigationBarType.fixed,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
|