Smaller fixes
This commit is contained in:
parent
68d2bc343f
commit
e8820162b0
|
@ -1,4 +1,5 @@
|
||||||
arb-dir: lib/l10n
|
arb-dir: lib/l10n
|
||||||
template-arb-file: app_en.arb
|
template-arb-file: app_en.arb
|
||||||
|
preferred-supported-locales: en
|
||||||
output-localization-file: app_localizations.dart
|
output-localization-file: app_localizations.dart
|
||||||
untranslated-messages-file: untranslated_messages.json
|
untranslated-messages-file: untranslated_messages.json
|
||||||
|
|
|
@ -1261,59 +1261,16 @@ class _MainAppState extends State<MainApp> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
imageBuilder: (uri, title, alt) {
|
imageBuilder: (uri, title, alt) {
|
||||||
if (uri.isAbsolute) {
|
Widget errorImage = InkWell(
|
||||||
return Image.network(
|
|
||||||
uri.toString(), errorBuilder:
|
|
||||||
(context, error,
|
|
||||||
stackTrace) {
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
selectionHaptic();
|
selectionHaptic();
|
||||||
ScaffoldMessenger.of(
|
ScaffoldMessenger.of(context)
|
||||||
context)
|
|
||||||
.showSnackBar(SnackBar(
|
.showSnackBar(SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
AppLocalizations.of(
|
AppLocalizations.of(
|
||||||
context)!
|
context)!
|
||||||
.notAValidImage),
|
.notAValidImage),
|
||||||
showCloseIcon:
|
showCloseIcon: true));
|
||||||
true));
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius
|
|
||||||
.circular(
|
|
||||||
8),
|
|
||||||
color: Theme.of(context)
|
|
||||||
.brightness ==
|
|
||||||
Brightness
|
|
||||||
.light
|
|
||||||
? Colors.white
|
|
||||||
: Colors.black),
|
|
||||||
padding:
|
|
||||||
const EdgeInsets
|
|
||||||
.only(
|
|
||||||
left: 100,
|
|
||||||
right: 100,
|
|
||||||
top: 32),
|
|
||||||
child: const Image(
|
|
||||||
image: AssetImage(
|
|
||||||
"assets/logo512error.png"))));
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
selectionHaptic();
|
|
||||||
ScaffoldMessenger.of(
|
|
||||||
context)
|
|
||||||
.showSnackBar(SnackBar(
|
|
||||||
content: Text(
|
|
||||||
AppLocalizations.of(
|
|
||||||
context)!
|
|
||||||
.notAValidImage),
|
|
||||||
showCloseIcon:
|
|
||||||
true));
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
@ -1322,8 +1279,7 @@ class _MainAppState extends State<MainApp> {
|
||||||
.circular(8),
|
.circular(8),
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.brightness ==
|
.brightness ==
|
||||||
Brightness
|
Brightness.light
|
||||||
.light
|
|
||||||
? Colors.white
|
? Colors.white
|
||||||
: Colors.black),
|
: Colors.black),
|
||||||
padding:
|
padding:
|
||||||
|
@ -1334,6 +1290,15 @@ class _MainAppState extends State<MainApp> {
|
||||||
child: const Image(
|
child: const Image(
|
||||||
image: AssetImage(
|
image: AssetImage(
|
||||||
"assets/logo512error.png"))));
|
"assets/logo512error.png"))));
|
||||||
|
if (uri.isAbsolute) {
|
||||||
|
return Image.network(
|
||||||
|
uri.toString(), errorBuilder:
|
||||||
|
(context, error,
|
||||||
|
stackTrace) {
|
||||||
|
return errorImage;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return errorImage;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
styleSheet: (p0.author == user)
|
styleSheet: (p0.author == user)
|
||||||
|
|
|
@ -95,14 +95,10 @@ class _ScreenSettingsVoiceState extends State<ScreenSettingsVoice> {
|
||||||
: !(permissionBluetooth && permissionRecord)
|
: !(permissionBluetooth && permissionRecord)
|
||||||
? AppLocalizations.of(context)!
|
? AppLocalizations.of(context)!
|
||||||
.settingsVoicePermissionNot
|
.settingsVoicePermissionNot
|
||||||
: !(prefs!.getBool(
|
|
||||||
"voiceModeEnabled") ??
|
|
||||||
false)
|
|
||||||
? AppLocalizations.of(context)!
|
|
||||||
.settingsVoiceNotEnabled
|
|
||||||
: AppLocalizations.of(context)!
|
: AppLocalizations.of(context)!
|
||||||
.settingsVoiceNotSupported,
|
.settingsVoiceNotSupported,
|
||||||
Icons.info_rounded, () {
|
Icons.info_rounded, () {
|
||||||
|
selectionHaptic();
|
||||||
if (permissionLoading) return;
|
if (permissionLoading) return;
|
||||||
if (!(permissionBluetooth && permissionRecord)) {
|
if (!(permissionBluetooth && permissionRecord)) {
|
||||||
void load() async {
|
void load() async {
|
||||||
|
@ -139,7 +135,6 @@ class _ScreenSettingsVoiceState extends State<ScreenSettingsVoice> {
|
||||||
} else if (!voiceLanguageOptions.contains(
|
} else if (!voiceLanguageOptions.contains(
|
||||||
(prefs!.getString("voiceLanguage") ??
|
(prefs!.getString("voiceLanguage") ??
|
||||||
"en_US"))) {
|
"en_US"))) {
|
||||||
selectionHaptic();
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||||
content: Text(AppLocalizations.of(context)!
|
content: Text(AppLocalizations.of(context)!
|
||||||
.settingsVoiceTtsNotSupportedDescription),
|
.settingsVoiceTtsNotSupportedDescription),
|
||||||
|
|
|
@ -79,6 +79,9 @@ Future<String> getTitleAi(List history) async {
|
||||||
.replaceAll("_", "")
|
.replaceAll("_", "")
|
||||||
.replaceAll("\n", " ")
|
.replaceAll("\n", " ")
|
||||||
.trim();
|
.trim();
|
||||||
|
while (title.contains(" ")) {
|
||||||
|
title = title.replaceAll(" ", " ");
|
||||||
|
}
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ dependencies:
|
||||||
dynamic_color: ^1.7.0
|
dynamic_color: ^1.7.0
|
||||||
volume_controller: ^2.0.7
|
volume_controller: ^2.0.7
|
||||||
universal_html: ^2.2.4
|
universal_html: ^2.2.4
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
Loading…
Reference in New Issue