import 'package:flutter/material.dart'; import 'package:flutter_android_app/components/extensions/context_x.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import '../common/svg_objects.dart'; import '../locale_bloc/locale_bloc.dart'; import '../locale_bloc/locale_events.dart'; import '../locale_bloc/locale_state.dart'; class SettingsPage extends StatelessWidget { const SettingsPage({super.key}); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.only(left: 20, right: 16, top: 8), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( '${context.locale.settingsLanguage}:', style: Theme.of(context).textTheme.titleMedium, ), GestureDetector( onTap: () => context.read().add(const ChangeLocaleEvent()), child: SizedBox.square( dimension: 50, child: Padding( padding: const EdgeInsets.only(right: 0), child: BlocBuilder( builder: (context, state) { return state.currentLocale.languageCode == 'ru' ? const SvgRu() : const SvgUs(); }), ), ), ), ], ), ], ), ); } }