profile(refactor): New functionalityy for settings screen

This commit is contained in:
2024-04-02 17:14:17 +03:00
parent a2998c1fc7
commit 76a421bba5
5 changed files with 22 additions and 7 deletions

View File

@@ -21,8 +21,10 @@ class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
Emitter<MyProfileState> emit,
) async {
try {
final box = await Hive.openBox('token');
final token = box.get('token');
/*final box = await Hive.openBox('token');
final token = box.get('token');*/
final token =
"9|laravel_sanctum_KFXbccDcWEvTPfJmV99EQv1neAggmpR2TidVGDPN34fa201a";
final response = await http.get(
Uri.parse(dotenv.env['SERVER_ROOT']! + '/profile/index'),
headers: {

View File

@@ -44,15 +44,15 @@ class MySettingsScreen extends StatelessWidget {
_buildSetingsScreen(BuildContext context, MyProfileLoadedState state) {
mediaQueryData = MediaQuery.of(context);
SafeArea(
return SafeArea(
child: Scaffold(
appBar: _buildAppBar(context, "my_settings".tr),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: ListView(
children: [
SectionTitle('Язык'),
LanguageDropdown(),
//SectionTitle('Язык'),
//LanguageDropdown(),
SectionTitle('Уведомления'),
NotificationSwitch('Уведомление об обновлениях'),
NotificationSwitch('Напоминания о заполнении'),