feat: Implement rapid order creation with voice and text input in client mobile app
This commit is contained in:
@@ -102,7 +102,9 @@ class AppWidget extends StatelessWidget {
|
||||
>(
|
||||
builder:
|
||||
(BuildContext context, core_localization.LocaleState state) {
|
||||
return core_localization.TranslationProvider(
|
||||
return KeyedSubtree(
|
||||
key: ValueKey<Locale>(state.locale),
|
||||
child: core_localization.TranslationProvider(
|
||||
child: MaterialApp.router(
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: "KROW Client",
|
||||
@@ -117,6 +119,7 @@ class AppWidget extends StatelessWidget {
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -79,7 +79,9 @@ class AppWidget extends StatelessWidget {
|
||||
>(
|
||||
builder:
|
||||
(BuildContext context, core_localization.LocaleState state) {
|
||||
return core_localization.TranslationProvider(
|
||||
return KeyedSubtree(
|
||||
key: ValueKey<Locale>(state.locale),
|
||||
child: core_localization.TranslationProvider(
|
||||
child: MaterialApp.router(
|
||||
title: "KROW Staff",
|
||||
theme: UiTheme.light,
|
||||
@@ -93,6 +95,7 @@ class AppWidget extends StatelessWidget {
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -288,4 +288,7 @@ class UiIcons {
|
||||
|
||||
/// Microphone icon
|
||||
static const IconData microphone = _IconLib.mic;
|
||||
|
||||
/// Language icon
|
||||
static const IconData language = _IconLib.languages;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:core_localization/core_localization.dart';
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:krow_core/core.dart';
|
||||
import 'package:staff_profile_info/src/presentation/widgets/personal_info_page/field_label.dart';
|
||||
@@ -14,8 +16,14 @@ class LanguageSelector extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final String currentLocale = Localizations.localeOf(context).languageCode;
|
||||
final String languageName = currentLocale == 'es' ? 'Español' : 'English';
|
||||
return BlocBuilder<LocaleBloc, LocaleState>(
|
||||
bloc: Modular.get<LocaleBloc>(),
|
||||
buildWhen: (LocaleState previous, LocaleState current) =>
|
||||
previous.locale != current.locale,
|
||||
builder: (BuildContext context, LocaleState state) {
|
||||
final String currentLocale = state.locale.languageCode;
|
||||
final String languageName =
|
||||
currentLocale == 'es' ? 'Español' : 'English';
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -28,7 +36,7 @@ class LanguageSelector extends StatelessWidget {
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
const Icon(
|
||||
UiIcons.settings,
|
||||
UiIcons.language,
|
||||
size: 18,
|
||||
color: UiColors.iconSecondary,
|
||||
),
|
||||
@@ -50,5 +58,7 @@ class LanguageSelector extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user