mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-14 18:12:24 -06:00
FEATURE dialog styling
This commit is contained in:
@@ -19,6 +19,8 @@ import 'package:paperless_mobile/core/global/constants.dart';
|
|||||||
import 'package:paperless_mobile/core/navigation/push_routes.dart';
|
import 'package:paperless_mobile/core/navigation/push_routes.dart';
|
||||||
import 'package:paperless_mobile/core/service/file_description.dart';
|
import 'package:paperless_mobile/core/service/file_description.dart';
|
||||||
import 'package:paperless_mobile/core/service/file_service.dart';
|
import 'package:paperless_mobile/core/service/file_service.dart';
|
||||||
|
import 'package:paperless_mobile/core/widgets/dialog_utils/dialog_cancel_button.dart';
|
||||||
|
import 'package:paperless_mobile/core/widgets/dialog_utils/dialog_confirm_button.dart';
|
||||||
import 'package:paperless_mobile/features/app_drawer/view/app_drawer.dart';
|
import 'package:paperless_mobile/features/app_drawer/view/app_drawer.dart';
|
||||||
import 'package:paperless_mobile/features/document_scan/cubit/document_scanner_cubit.dart';
|
import 'package:paperless_mobile/features/document_scan/cubit/document_scanner_cubit.dart';
|
||||||
import 'package:paperless_mobile/features/document_scan/view/widgets/scanned_image_item.dart';
|
import 'package:paperless_mobile/features/document_scan/view/widgets/scanned_image_item.dart';
|
||||||
@@ -160,16 +162,14 @@ class _ScannerPageState extends State<ScannerPage>
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
content: Stack(
|
title: Text(S.of(context)!.export),
|
||||||
children: [
|
content: FormBuilder(
|
||||||
FormBuilder(
|
|
||||||
key: _downloadFormKey,
|
key: _downloadFormKey,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsets.all(8.0),
|
||||||
const EdgeInsets.all(8.0),
|
|
||||||
child: FormBuilderTextField(
|
child: FormBuilderTextField(
|
||||||
autovalidateMode:
|
autovalidateMode:
|
||||||
AutovalidateMode.always,
|
AutovalidateMode.always,
|
||||||
@@ -188,31 +188,41 @@ class _ScannerPageState extends State<ScannerPage>
|
|||||||
),
|
),
|
||||||
name: fkFileName,
|
name: fkFileName,
|
||||||
)),
|
)),
|
||||||
TextButton.icon(
|
],
|
||||||
label:
|
),
|
||||||
Text(S.of(context)!.export),
|
),
|
||||||
icon: const Icon(Icons.download),
|
actions: [
|
||||||
|
const DialogCancelButton(),
|
||||||
|
ElevatedButton(
|
||||||
|
child: Text(S.of(context)!.export),
|
||||||
|
style: ButtonStyle(
|
||||||
|
backgroundColor:
|
||||||
|
MaterialStatePropertyAll(
|
||||||
|
Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.primaryContainer,
|
||||||
|
),
|
||||||
|
foregroundColor:
|
||||||
|
MaterialStatePropertyAll(
|
||||||
|
Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onPrimaryContainer,
|
||||||
|
),
|
||||||
|
),
|
||||||
onPressed: () => {
|
onPressed: () => {
|
||||||
if (_downloadFormKey
|
if (_downloadFormKey.currentState!
|
||||||
.currentState!
|
|
||||||
.validate())
|
.validate())
|
||||||
{
|
{
|
||||||
_onLocalSave().then(
|
_onLocalSave().then((value) =>
|
||||||
(value) => Navigator.of(
|
Navigator.of(context).pop())
|
||||||
context)
|
|
||||||
.pop())
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.download),
|
icon: const Icon(Icons.download_outlined),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user