set LANG in shell

This commit is contained in:
Junyuan Feng
2022-05-05 16:53:35 +08:00
parent 29e3ee0156
commit 74a933eb6e
12 changed files with 65 additions and 66 deletions

View File

@@ -247,8 +247,7 @@ class _MyHomePageState extends State<MyHomePage>
applicationIcon: _buildIcon(),
aboutBoxChildren: [
UrlText(
text: s.madeWithLove(myGithub),
replace: 'LollipopKit'),
text: s.madeWithLove(myGithub), replace: 'LollipopKit'),
UrlText(
text: s.aboutThanks(rainSunMeGithub),
replace: 'RainSunMe',

View File

@@ -75,7 +75,10 @@ class _PingPageState extends State<PingPage>
title: Text(result.serverName,
style: TextStyle(
fontSize: 18, fontWeight: FontWeight.bold, color: primaryColor)),
subtitle: Text(_buildPingSummary(result, unknown, ms), style: summaryTextStyle,),
subtitle: Text(
_buildPingSummary(result, unknown, ms),
style: summaryTextStyle,
),
trailing: Text(
s.pingAvg +
(result.statistic?.avg?.toStringAsFixed(2) ?? s.unknown) +

View File

@@ -92,8 +92,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage>
final key = keyController.text;
final pwd = pwdController.text;
if (name.isEmpty || key.isEmpty) {
showSnackBar(
context, Text(s.fieldMustNotEmpty));
showSnackBar(context, Text(s.fieldMustNotEmpty));
return;
}
FocusScope.of(context).unfocus();

View File

@@ -60,26 +60,22 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
widget.spi != null
? IconButton(
onPressed: () {
showRoundDialog(
context,
'Attention',
Text(
s.sureToDeleteServer(widget.spi!.name)),
[
TextButton(
onPressed: () {
_serverProvider.delServer(widget.spi!);
Navigator.of(context).pop();
Navigator.of(context).pop();
},
child: Text(
s.ok,
style: const TextStyle(color: Colors.red),
)),
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(s.cancel))
]);
showRoundDialog(context, 'Attention',
Text(s.sureToDeleteServer(widget.spi!.name)), [
TextButton(
onPressed: () {
_serverProvider.delServer(widget.spi!);
Navigator.of(context).pop();
Navigator.of(context).pop();
},
child: Text(
s.ok,
style: const TextStyle(color: Colors.red),
)),
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(s.cancel))
]);
},
icon: const Icon(Icons.delete))
: const SizedBox()
@@ -93,8 +89,8 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
TextField(
controller: nameController,
keyboardType: TextInputType.text,
decoration:
buildDecoration(s.name, icon: Icons.info, hint: s.exampleName),
decoration: buildDecoration(s.name,
icon: Icons.info, hint: s.exampleName),
),
TextField(
controller: ipController,

View File

@@ -30,7 +30,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
super.initState();
_provider = locator<SnippetProvider>();
}
@override
void didChangeDependencies() {
super.didChangeDependencies();

View File

@@ -122,7 +122,7 @@ class _SnippetListPageState extends State<SnippetListPage> {
TextButton(
onPressed: () async =>
await _import(_importFieldController.text.trim()),
child: Text('GO'),
child: const Text('GO'),
)
]);
}
@@ -246,11 +246,9 @@ class _SnippetListPageState extends State<SnippetListPage> {
]));
}), [
TextButton(
onPressed: () async => run(context, snippet),
child: Text(s.run)),
onPressed: () async => run(context, snippet), child: Text(s.run)),
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(s.cancel)),
onPressed: () => Navigator.of(context).pop(), child: Text(s.cancel)),
]);
}
@@ -261,8 +259,7 @@ class _SnippetListPageState extends State<SnippetListPage> {
showRoundDialog(context, s.result,
Text(result, style: const TextStyle(fontSize: 13)), [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(s.close))
onPressed: () => Navigator.of(context).pop(), child: Text(s.close))
]);
}
}