Add SimDataScreen

This commit is contained in:
anhtunz
2025-07-08 16:56:30 +07:00
parent e6c536f380
commit cdbd5b7484
14 changed files with 330 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ class ApplicationConstants {
static const DEVICE_LOGS_PATH = "/device-logs";
static const GROUP_PATH = "/groups";
static const DEVICE_NOTIFICATIONS_SETTINGS = "/device-notifications-settings";
static const SIM_DATA_SETTINGS = "/sim-data-settings";
static const OWNER_GROUP = "owner";
static const PARTICIPANT_GROUP = "participant";
static const NO_DATA = "no_data";

View File

@@ -13,4 +13,5 @@ enum AppRoutes {
HISTORY,
GROUPS,
GROUP_DETAIL,
SIM_DATA_SETTING,
}

View File

@@ -1,4 +1,7 @@
import 'package:go_router/go_router.dart';
import '../../../bloc/sim_data_bloc.dart';
import '../../../feature/settings/sim_data/sim_data_screen.dart';
import '../../../bloc/device_detail_bloc.dart';
import '../../../feature/devices/device_detail/device_detail_screen.dart';
import '../../../bloc/device_notification_settings_bloc.dart';
@@ -151,6 +154,16 @@ GoRouter goRouter() {
),
transitionsBuilder: transitionsRightToLeft),
),
GoRoute(
path: ApplicationConstants.SIM_DATA_SETTINGS,
name: AppRoutes.SIM_DATA_SETTING.name,
pageBuilder: (context, state) => CustomTransitionPage(
child: BlocProvider(
child: const SimDataScreen(),
blocBuilder: () => SimDataBloc(),
),
transitionsBuilder: transitionsRightToLeft),
),
],
);
}

View File

@@ -111,7 +111,10 @@
"profile_page_title": "Settings Page",
"profile_change_info": "Change information",
"profile_change_pass": "Change password",
"profile_sim_data": "Device SIM information",
"profile_setting": "Notification Setting",
"sim_data_month_left_message": "months left",
"time_title": "Time",
"change_profile_title": "Personal information",
"change_profile_username": "Username: ",
"change_profile_username_hint": "Enter username ",

View File

@@ -770,12 +770,30 @@ abstract class AppLocalizations {
/// **'Change password'**
String get profile_change_pass;
/// No description provided for @profile_sim_data.
///
/// In en, this message translates to:
/// **'Device SIM information'**
String get profile_sim_data;
/// No description provided for @profile_setting.
///
/// In en, this message translates to:
/// **'Notification Setting'**
String get profile_setting;
/// No description provided for @sim_data_month_left_message.
///
/// In en, this message translates to:
/// **'months left'**
String get sim_data_month_left_message;
/// No description provided for @time_title.
///
/// In en, this message translates to:
/// **'Time'**
String get time_title;
/// No description provided for @change_profile_title.
///
/// In en, this message translates to:

View File

@@ -360,9 +360,18 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get profile_change_pass => 'Change password';
@override
String get profile_sim_data => 'Device SIM information';
@override
String get profile_setting => 'Notification Setting';
@override
String get sim_data_month_left_message => 'months left';
@override
String get time_title => 'Time';
@override
String get change_profile_title => 'Personal information';

View File

@@ -356,9 +356,18 @@ class AppLocalizationsVi extends AppLocalizations {
@override
String get profile_change_pass => 'Đổi mật khẩu';
@override
String get profile_sim_data => 'Thông tin sim thiết bị';
@override
String get profile_setting => 'Cài đặt thông báo';
@override
String get sim_data_month_left_message => 'tháng còn lại';
@override
String get time_title => 'Thời gian';
@override
String get change_profile_title => 'Thông tin người dùng';

View File

@@ -112,6 +112,9 @@
"profile_change_info": "Đổi thông tin cá nhân",
"profile_change_pass": "Đổi mật khẩu",
"profile_setting": "Cài đặt thông báo",
"profile_sim_data": "Thông tin sim thiết bị",
"sim_data_month_left_message": "tháng còn lại",
"time_title": "Thời gian",
"change_profile_title": "Thông tin người dùng",
"change_profile_username": "Tên người dùng: ",
"change_profile_username_hint": "Nhập tên ",

View File

@@ -36,7 +36,7 @@ class NotificationServices {
Future<String> getDeviceToken() async {
print("GET FB TOKEN");
String? token = await messaging.getAPNSToken();
String? token = await messaging.getToken();
print("GET FB: ${token}");
return token!;
}