95 lines
2.8 KiB
Dart
95 lines
2.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:tm_app/core/theme/colors.dart';
|
|
import 'package:tm_app/core/utils/size_config.dart';
|
|
import 'package:tm_app/views/notification/strings/notification_strings.dart';
|
|
import 'package:tm_app/views/shared/tender_app_bar.dart';
|
|
|
|
import '../../shared/main_tab_bar.dart';
|
|
import '../widgets/notification_all_tab.dart';
|
|
import '../widgets/notification_important_tab.dart';
|
|
import '../widgets/notification_unread_tab.dart';
|
|
|
|
class MobileNotificationPage extends StatefulWidget {
|
|
const MobileNotificationPage({super.key});
|
|
|
|
@override
|
|
State<MobileNotificationPage> createState() => _MobileNotificationPageState();
|
|
}
|
|
|
|
class _MobileNotificationPageState extends State<MobileNotificationPage>
|
|
with SingleTickerProviderStateMixin {
|
|
late TabController controller;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
controller = TabController(length: 3, vsync: this);
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
controller.dispose();
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppColors.backgroundColor,
|
|
appBar: tenderMobileAppBar(title: NotificationStrings.notificationTitle),
|
|
body: Column(
|
|
children: [
|
|
MainTabBar(
|
|
controller: controller,
|
|
titles: [
|
|
NotificationStrings.all,
|
|
NotificationStrings.unread,
|
|
NotificationStrings.important,
|
|
],
|
|
),
|
|
SizedBox(height: 12.0.h()),
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.only(end: 24.0.w()),
|
|
child: Align(
|
|
alignment: Alignment.centerRight,
|
|
child: InkWell(
|
|
onTap: () {},
|
|
borderRadius: BorderRadius.circular(99),
|
|
child: Container(
|
|
width: 132.0.w(),
|
|
height: 32.0.h(),
|
|
decoration: BoxDecoration(
|
|
color: AppColors.primary20,
|
|
borderRadius: BorderRadius.circular(99),
|
|
),
|
|
child: Center(
|
|
child: Text(
|
|
NotificationStrings.markAllAsReadButton,
|
|
style: TextStyle(
|
|
fontSize: 14.0.sp(),
|
|
fontWeight: FontWeight.w500,
|
|
color: AppColors.mainBlue,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
SizedBox(height: 12.0.h()),
|
|
Expanded(
|
|
child: TabBarView(
|
|
controller: controller,
|
|
children: const [
|
|
NotificationAllTab(),
|
|
NotificationUnreadTab(),
|
|
NotificationImportantTab(),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|