UI tweaks

This commit is contained in:
Hanh 2023-01-31 20:13:47 +08:00
parent 0c6e6a9de5
commit 6eef578baf
7 changed files with 22 additions and 15 deletions

View File

@ -496,7 +496,7 @@ void showQR(BuildContext context, String text, String title) {
Text(title, style: Theme
.of(context)
.textTheme
.subtitle1),
.titleSmall),
Padding(padding: EdgeInsets.all(4)),
ButtonBar(children: [
ElevatedButton.icon(onPressed: () {

View File

@ -41,13 +41,14 @@ class PaymentURIState extends State<PaymentURIPage> {
@override
Widget build(BuildContext context) {
final s = S.of(context);
final t = Theme.of(context);
final qrSize = getScreenSize(context) / 1.5;
return Form(
key: _formKey,
child: Scaffold(
appBar: AppBar(title: Text(S.of(context).receive(activeCoin().ticker))),
appBar: AppBar(title: Text(s.receive(activeCoin().ticker))),
body: SingleChildScrollView(
child: GestureDetector(
onTap: () { FocusScope.of(context).unfocus(); },
@ -76,13 +77,13 @@ class PaymentURIState extends State<PaymentURIPage> {
FormBuilderFieldOption(value: 'S'),
FormBuilderFieldOption(value: 'O'),
])),
ElevatedButton.icon(onPressed: _onAddressCopy, icon: Icon(Icons.content_copy), label: Text(S.current.copy))
ElevatedButton.icon(onPressed: _onAddressCopy, icon: Icon(Icons.content_copy), label: Text(s.copy))
]),
Padding(padding: EdgeInsets.all(8)),
DualMoneyInputWidget(key: amountKey, onChange: (_) => updateQR()),
TextFormField(
decoration:
InputDecoration(labelText: S.of(context).memo),
InputDecoration(labelText: s.memo),
minLines: 4,
maxLines: null,
keyboardType: TextInputType.multiline,
@ -92,7 +93,7 @@ class PaymentURIState extends State<PaymentURIPage> {
Padding(padding: EdgeInsets.all(8)),
ElevatedButton.icon(
icon: Icon(Icons.clear),
label: Text('RESET'),
label: Text(s.reset),
onPressed: _reset,
)]),
)))));

View File

@ -207,8 +207,18 @@ class _FullRestoreState extends State<FullRestorePage> {
try {
if (key.isNotEmpty) {
WarpApi.unzipBackup(key, filename, settings.tempDir);
await showMessageBox(context, s.dbImportSuccessful,
s.databaseUpdatedPleaseRestartTheApp, s.ok);
await showDialog<bool>(
context: context,
barrierDismissible: false,
builder: (context) =>
AlertDialog(
title: Text(s.dbImportSuccessful),
content: Text(s.databaseUpdatedPleaseRestartTheApp),
actions: [
ElevatedButton.icon(onPressed: () => Navigator.of(context).pop(), icon: Icon(Icons.check),
label: Text(s.ok))
]
));
final prefs = await SharedPreferences.getInstance();
await prefs.setBool('recover', true);
}

View File

@ -137,10 +137,7 @@ class _AddAccountPageState extends State<AddAccountPage> {
label: Text(s.cancel),
onPressed: () {
Navigator.of(context).pop();
},
style: ElevatedButton.styleFrom(
primary:
t.buttonTheme.colorScheme!.secondary)),
}),
ElevatedButton.icon(
icon: Icon(Icons.add),
label: Text(_restore ? s.import : s.newLabel),

View File

@ -244,7 +244,7 @@ class SendState extends State<SendPage> {
]),
Padding(padding: EdgeInsets.all(8)),
ButtonBar(children: [
ElevatedButton.icon(onPressed: clear, icon: Icon(Icons.clear), label: Text(s.reset), style: ElevatedButton.styleFrom(backgroundColor: t.colorScheme.secondary)),
ElevatedButton.icon(onPressed: clear, icon: Icon(Icons.clear), label: Text(s.reset)),
ElevatedButton.icon(onPressed: _onSend, icon: Icon(MdiIcons.send), label: Text(widget.isMulti ? s.add : s.send))
])
])))));

View File

@ -68,8 +68,7 @@ class TxPlanPage extends StatelessWidget {
ElevatedButton.icon(
icon: Icon(Icons.cancel),
label: Text(s.cancel),
onPressed: () { Navigator.of(context).pop(); },
style: ElevatedButton.styleFrom(backgroundColor: Theme.of(context).colorScheme.secondary)),
onPressed: () { Navigator.of(context).pop(); }),
ElevatedButton.icon(
icon: Icon(Icons.done),
label: Text(s.send),

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.2.17+359
version: 1.2.17+360
environment:
sdk: ">=2.12.0 <3.0.0"