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