feat: Finalize notes feature, update translations

This commit is contained in:
Anton Stubenbord
2024-01-03 20:22:28 +01:00
parent c7d3d9207b
commit ddd950a8da
28 changed files with 281 additions and 114 deletions

View File

@@ -135,6 +135,7 @@
android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation" /> android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation" />
</intent-filter> </intent-filter>
<!-- .xls --> <!-- .xls -->
<intent-filter> <intent-filter>
<action android:name="android.intent.action.SEND" /> <action android:name="android.intent.action.SEND" />
@@ -162,11 +163,22 @@
</intent-filter> </intent-filter>
<!-- END Snippet from https://github.com/qcasey/paperless_share --> <!-- END Snippet from https://github.com/qcasey/paperless_share -->
</activity> </activity>
<!-- Don't delete the meta-data below. This is used by the Flutter tool to generate <!-- Don't delete the meta-data below. This is used by the Flutter tool to generate
GeneratedPluginRegistrant.java --> GeneratedPluginRegistrant.java -->
<meta-data android:name="flutterEmbedding" android:value="2" /> <meta-data android:name="flutterEmbedding" android:value="2" />
</application> </application>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
</queries>
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"

View File

@@ -19,12 +19,14 @@ class HiveBoxes {
static const localUserAccount = 'localUserAccount'; static const localUserAccount = 'localUserAccount';
static const localUserAppState = 'localUserAppState'; static const localUserAppState = 'localUserAppState';
static const hosts = 'hosts'; static const hosts = 'hosts';
static const hintStateBox = 'hintStateBox';
static List<String> get all => [ static List<String> get all => [
globalSettings, globalSettings,
localUserCredentials, localUserCredentials,
localUserAccount, localUserAccount,
localUserAppState, localUserAppState,
hintStateBox,
hosts, hosts,
]; ];
} }

View File

@@ -54,4 +54,5 @@ extension HiveBoxAccessors on HiveInterface {
box<LocalUserAppState>(HiveBoxes.localUserAppState); box<LocalUserAppState>(HiveBoxes.localUserAppState);
Box<GlobalSettings> get globalSettingsBox => Box<GlobalSettings> get globalSettingsBox =>
box<GlobalSettings>(HiveBoxes.globalSettings); box<GlobalSettings>(HiveBoxes.globalSettings);
Box<bool> get hintStateBox => box<bool>(HiveBoxes.hintStateBox);
} }

View File

@@ -3,9 +3,11 @@
import 'dart:collection'; import 'dart:collection';
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:paperless_mobile/core/extensions/flutter_extensions.dart'; import 'package:paperless_mobile/core/extensions/flutter_extensions.dart';
import 'package:paperless_mobile/features/landing/view/widgets/mime_types_pie_chart.dart'; import 'package:paperless_mobile/features/landing/view/widgets/mime_types_pie_chart.dart';
@@ -83,7 +85,6 @@ class _FormBuilderLocalizedDatePickerState
final _textFieldControls = final _textFieldControls =
LinkedList<_NeighbourAwareDateInputSegmentControls>(); LinkedList<_NeighbourAwareDateInputSegmentControls>();
String? _error;
bool _temporarilyDisableListeners = false; bool _temporarilyDisableListeners = false;
@override @override
void initState() { void initState() {
@@ -184,10 +185,7 @@ class _FormBuilderLocalizedDatePickerState
// Imitate the functionality of the validator function in "normal" form fields. // Imitate the functionality of the validator function in "normal" form fields.
// The error is shown on the outer decorator as if this was a regular text input. // The error is shown on the outer decorator as if this was a regular text input.
// Errors are cleared after the next user interaction. // Errors are cleared after the next user interaction.
final error = _validateDate(value); // final error = _validateDate(value);
setState(() {
_error = error;
});
}, },
autovalidateMode: AutovalidateMode.onUserInteraction, autovalidateMode: AutovalidateMode.onUserInteraction,
initialValue: widget.initialValue != null initialValue: widget.initialValue != null
@@ -201,7 +199,7 @@ class _FormBuilderLocalizedDatePickerState
child: InputDecorator( child: InputDecorator(
textAlignVertical: TextAlignVertical.bottom, textAlignVertical: TextAlignVertical.bottom,
decoration: InputDecoration( decoration: InputDecoration(
errorText: _error, errorText: field.errorText,
labelText: widget.labelText, labelText: widget.labelText,
suffixIcon: Row( suffixIcon: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
@@ -271,16 +269,10 @@ class _FormBuilderLocalizedDatePickerState
if (d.day != date.day && d.month != date.month && d.year != date.year) { if (d.day != date.day && d.month != date.month && d.year != date.year) {
return "Invalid date."; return "Invalid date.";
} }
if (d.isBefore(widget.firstDate)) { if (d.isBefore(widget.firstDate) || d.isAfter(widget.lastDate)) {
final formattedDateHint = return S.of(context)!.dateOutOfRange(widget.firstDate, widget.lastDate);
DateFormat.yMd(widget.locale.toString()).format(widget.firstDate);
return "Date must be after $formattedDateHint.";
}
if (d.isAfter(widget.lastDate)) {
final formattedDateHint =
DateFormat.yMd(widget.locale.toString()).format(widget.lastDate);
return "Date must be before $formattedDateHint.";
} }
return null; return null;
} }
@@ -332,6 +324,7 @@ class _FormBuilderLocalizedDatePickerState
_DateInputSegment.year => fieldValue.copyWith(year: number), _DateInputSegment.year => fieldValue.copyWith(year: number),
}; };
field.setValue(newValue); field.setValue(newValue);
field.validate();
} }
}, },
inputFormatters: [ inputFormatters: [

View File

@@ -61,7 +61,7 @@ class HintCard extends StatelessWidget {
const Padding(padding: EdgeInsets.only(bottom: 24)), const Padding(padding: EdgeInsets.only(bottom: 24)),
], ],
).padded(), ).padded(),
).padded(), ),
); );
} }
} }

View File

@@ -0,0 +1,24 @@
import 'package:flutter/material.dart';
import 'package:hive_flutter/adapters.dart';
import 'package:paperless_mobile/core/database/hive/hive_extensions.dart';
class HintStateBuilder extends StatelessWidget {
final String? listenKey;
final Widget Function(BuildContext context, Box<bool> box) builder;
const HintStateBuilder({
super.key,
required this.builder,
this.listenKey,
});
@override
Widget build(BuildContext context) {
return ValueListenableBuilder<Box<bool>>(
valueListenable: Hive.hintStateBox
.listenable(keys: listenKey != null ? [listenKey] : null),
builder: (context, box, child) {
return builder(context, box);
},
);
}
}

View File

@@ -161,6 +161,7 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
bottom: ColoredTabBar( bottom: ColoredTabBar(
tabBar: TabBar( tabBar: TabBar(
isScrollable: true, isScrollable: true,
tabAlignment: TabAlignment.start,
tabs: [ tabs: [
Tab( Tab(
child: Text( child: Text(
@@ -203,19 +204,33 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
), ),
), ),
Tab( Tab(
child: Text( child: Row(
"Notes", mainAxisSize: MainAxisSize.min,
children: [
Text(
S.of(context)!.notes(0),
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.onPrimaryContainer, .onPrimaryContainer,
), ),
), ),
if ((state.document?.notes.length ?? 0) >
0)
Card(
child: Text(state
.document!.notes.length
.toString())
.paddedSymmetrically(
horizontal: 8, vertical: 2),
),
],
),
), ),
if (hasMultiUserSupport) if (hasMultiUserSupport)
Tab( Tab(
child: Text( child: Text(
"Permissions", S.of(context)!.permissions,
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme

View File

@@ -1,12 +1,21 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:paperless_api/paperless_api.dart'; import 'package:paperless_api/paperless_api.dart';
import 'package:paperless_mobile/core/database/hive/hive_config.dart';
import 'package:paperless_mobile/core/extensions/flutter_extensions.dart'; import 'package:paperless_mobile/core/extensions/flutter_extensions.dart';
import 'package:paperless_mobile/core/widgets/hint_card.dart';
import 'package:paperless_mobile/core/widgets/hint_state_builder.dart';
import 'package:paperless_mobile/features/document_details/cubit/document_details_cubit.dart'; import 'package:paperless_mobile/features/document_details/cubit/document_details_cubit.dart';
import 'package:paperless_mobile/features/settings/view/widgets/global_settings_builder.dart';
import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart';
import 'package:paperless_mobile/helpers/message_helpers.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart';
import 'package:markdown/markdown.dart' show markdownToHtml;
import 'package:shared_preferences/shared_preferences.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:url_launcher/url_launcher_string.dart';
class DocumentNotesWidget extends StatefulWidget { class DocumentNotesWidget extends StatefulWidget {
final DocumentModel document; final DocumentModel document;
@@ -19,11 +28,29 @@ class DocumentNotesWidget extends StatefulWidget {
class _DocumentNotesWidgetState extends State<DocumentNotesWidget> { class _DocumentNotesWidgetState extends State<DocumentNotesWidget> {
final _noteContentController = TextEditingController(); final _noteContentController = TextEditingController();
final _formKey = GlobalKey<FormState>(); final _formKey = GlobalKey<FormState>();
bool _isNoteSubmitting = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
const hintKey = "hideMarkdownSyntaxHint";
return SliverMainAxisGroup( return SliverMainAxisGroup(
slivers: [ slivers: [
SliverPadding(
padding: const EdgeInsets.only(bottom: 16),
sliver: SliverToBoxAdapter(
child: HintStateBuilder(
listenKey: hintKey,
builder: (context, box) {
return HintCard(
hintText: S.of(context)!.notesMarkdownSyntaxSupportHint,
show: !box.get(hintKey, defaultValue: false)!,
onHintAcknowledged: () {
box.put(hintKey, true);
},
);
},
),
),
),
SliverToBoxAdapter( SliverToBoxAdapter(
child: Form( child: Form(
key: _formKey, key: _formKey,
@@ -33,45 +60,86 @@ class _DocumentNotesWidgetState extends State<DocumentNotesWidget> {
controller: _noteContentController, controller: _noteContentController,
maxLines: null, maxLines: null,
validator: (value) { validator: (value) {
if (value?.isEmpty ?? true) { if (value?.trim().isEmpty ?? true) {
return S.of(context)!.thisFieldIsRequired; return S.of(context)!.thisFieldIsRequired;
} }
return null; return null;
}, },
textInputAction: TextInputAction.newline,
decoration: InputDecoration( decoration: InputDecoration(
hintText: 'Your note here...', labelText: S.of(context)!.newNote,
labelText: 'New note', suffixIcon: IconButton(
floatingLabelBehavior: FloatingLabelBehavior.always, icon: const Icon(Icons.clear),
onPressed: () {
_noteContentController.clear();
},
), ),
).padded(), ),
).paddedOnly(bottom: 8),
Align( Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: FilledButton.icon( child: ElevatedButton.icon(
icon: Icon(Icons.note_add_outlined), icon: _isNoteSubmitting
label: Text("Add note"), ? const SizedBox.square(
onPressed: () { dimension: 20,
child: Center(
child: CircularProgressIndicator(
strokeWidth: 3,
),
),
)
: const Icon(Icons.note_add_outlined),
label: Text(S.of(context)!.addNote),
onPressed: () async {
_formKey.currentState?.save(); _formKey.currentState?.save();
if (_formKey.currentState?.validate() ?? false) { if (_formKey.currentState?.validate() ?? false) {
context setState(() {
_isNoteSubmitting = true;
});
try {
await context
.read<DocumentDetailsCubit>() .read<DocumentDetailsCubit>()
.addNote(_noteContentController.text); .addNote(_noteContentController.text.trim());
_noteContentController.clear();
} catch (error) {
showGenericError(context, error);
} finally {
setState(() {
_isNoteSubmitting = false;
});
}
} }
}, },
).padded(), ),
), ),
], ],
).padded(),
), ),
), ),
),
const SliverToBoxAdapter(
child: SizedBox(height: 16),
),
SliverList.separated( SliverList.separated(
separatorBuilder: (context, index) => const SizedBox(height: 16), separatorBuilder: (context, index) => const SizedBox(height: 16),
itemBuilder: (context, index) { itemBuilder: (context, index) {
final note = widget.document.notes.elementAt(index); final note = widget.document.notes.elementAt(index);
return Card( return Card(
// borderRadius: BorderRadius.circular(8),
// elevation: 1,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
Html(
data: markdownToHtml(note.note!),
onLinkTap: (url, attributes, element) async {
if (url?.isEmpty ?? true) {
return;
}
if (await canLaunchUrlString(url!)) {
launchUrlString(url);
}
},
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
if (note.created != null) if (note.created != null)
Text( Text(
@@ -80,32 +148,19 @@ class _DocumentNotesWidgetState extends State<DocumentNotesWidget> {
.addPattern('\u2014') .addPattern('\u2014')
.add_jm() .add_jm()
.format(note.created!), .format(note.created!),
style: Theme.of(context).textTheme.labelMedium?.copyWith( style:
Theme.of(context).textTheme.labelMedium?.copyWith(
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.onSurface .onSurface
.withOpacity(.5), .withOpacity(.5),
), ),
), ),
const SizedBox(height: 8),
Text(
note.note!,
textAlign: TextAlign.justify,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
IconButton( IconButton(
icon: Icon(Icons.delete), tooltip: S.of(context)!.delete,
icon: const Icon(Icons.delete),
onPressed: () { onPressed: () {
context.read<DocumentDetailsCubit>().deleteNote(note); context.read<DocumentDetailsCubit>().deleteNote(note);
showSnackBar(
context,
S.of(context)!.documentSuccessfullyUpdated,
);
}, },
), ),
], ],

View File

@@ -424,7 +424,7 @@ class _DocumentEditPageState extends State<DocumentEditPage>
initialValue: initialCreatedAtDate, initialValue: initialCreatedAtDate,
labelText: S.of(context)!.createdAt, labelText: S.of(context)!.createdAt,
firstDate: DateTime(1970, 1, 1), firstDate: DateTime(1970, 1, 1),
lastDate: DateTime.now(), lastDate: DateTime(2100, 1, 1),
locale: Localizations.localeOf(context), locale: Localizations.localeOf(context),
prefixIcon: Icon(Icons.calendar_today), prefixIcon: Icon(Icons.calendar_today),
), ),

View File

@@ -40,7 +40,7 @@ class _DocumentSearchBarState extends State<DocumentSearchBar> {
constraints: const BoxConstraints( constraints: const BoxConstraints(
maxWidth: 720, maxWidth: 720,
minWidth: 360, minWidth: 360,
maxHeight: 56, maxHeight: 48,
minHeight: 48, minHeight: 48,
), ),
child: Row( child: Row(

View File

@@ -222,7 +222,7 @@ class _DocumentUploadPreparationPageState
FormBuilderLocalizedDatePicker( FormBuilderLocalizedDatePicker(
name: DocumentModel.createdKey, name: DocumentModel.createdKey,
firstDate: DateTime(1970, 1, 1), firstDate: DateTime(1970, 1, 1),
lastDate: DateTime.now(), lastDate: DateTime(2100, 1, 1),
locale: Localizations.localeOf(context), locale: Localizations.localeOf(context),
labelText: S.of(context)!.createdAt + " *", labelText: S.of(context)!.createdAt + " *",
allowUnset: true, allowUnset: true,

View File

@@ -21,6 +21,7 @@ import 'package:paperless_mobile/features/documents/view/widgets/selection/docum
import 'package:paperless_mobile/features/documents/view/widgets/selection/view_type_selection_widget.dart'; import 'package:paperless_mobile/features/documents/view/widgets/selection/view_type_selection_widget.dart';
import 'package:paperless_mobile/features/documents/view/widgets/sort_documents_button.dart'; import 'package:paperless_mobile/features/documents/view/widgets/sort_documents_button.dart';
import 'package:paperless_mobile/features/labels/cubit/label_cubit.dart'; import 'package:paperless_mobile/features/labels/cubit/label_cubit.dart';
import 'package:paperless_mobile/features/logging/data/logger.dart';
import 'package:paperless_mobile/features/saved_view/cubit/saved_view_cubit.dart'; import 'package:paperless_mobile/features/saved_view/cubit/saved_view_cubit.dart';
import 'package:paperless_mobile/features/tasks/model/pending_tasks_notifier.dart'; import 'package:paperless_mobile/features/tasks/model/pending_tasks_notifier.dart';
import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart';
@@ -308,9 +309,19 @@ class _DocumentsPageState extends State<DocumentsPage> {
// Listen for scroll notifications to load new data. // Listen for scroll notifications to load new data.
// Scroll controller does not work here due to nestedscrollview limitations. // Scroll controller does not work here due to nestedscrollview limitations.
final offset = notification.metrics.pixels; final offset = notification.metrics.pixels;
try {
if (offset > 128 && _savedViewsExpansionController.isExpanded) { if (offset > 128 && _savedViewsExpansionController.isExpanded) {
_savedViewsExpansionController.collapse(); _savedViewsExpansionController.collapse();
} }
// Workaround for https://github.com/astubenbord/paperless-mobile/issues/341 probably caused by https://github.com/flutter/flutter/issues/138153
} on TypeError catch (error) {
logger.fw(
"An exception was thrown, but this message can probably be ignored. See issue #341 for more details.",
error: error,
className: runtimeType.toString(),
methodName: "_buildDocumentsTab",
);
}
final max = notification.metrics.maxScrollExtent; final max = notification.metrics.maxScrollExtent;
final currentState = context.read<DocumentsCubit>().state; final currentState = context.read<DocumentsCubit>().state;

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Berechtigungen",
"newNote": "Neue Notiz",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile unterstützt Markdown-Syntax zur Darstellung und Formatierung von Notizen. Probiere es aus!"
} }

View File

@@ -1041,6 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
},
} "permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -1041,5 +1041,8 @@
"format": "yMd" "format": "yMd"
} }
} }
} },
"permissions": "Permissions",
"newNote": "New note",
"notesMarkdownSyntaxSupportHint": "Paperless Mobile can render notes using basic markdown syntax. Try it out!"
} }

View File

@@ -111,6 +111,7 @@ Future<void> _initHive() async {
registerHiveAdapters(); registerHiveAdapters();
await Hive.openBox<LocalUserAccount>(HiveBoxes.localUserAccount); await Hive.openBox<LocalUserAccount>(HiveBoxes.localUserAccount);
await Hive.openBox<LocalUserAppState>(HiveBoxes.localUserAppState); await Hive.openBox<LocalUserAppState>(HiveBoxes.localUserAppState);
await Hive.openBox<bool>(HiveBoxes.hintStateBox);
await Hive.openBox<String>(HiveBoxes.hosts); await Hive.openBox<String>(HiveBoxes.hosts);
final globalSettingsBox = final globalSettingsBox =
await Hive.openBox<GlobalSettings>(HiveBoxes.globalSettings); await Hive.openBox<GlobalSettings>(HiveBoxes.globalSettings);

View File

@@ -82,14 +82,14 @@ SystemUiOverlayStyle buildOverlayStyle(
Brightness.light => SystemUiOverlayStyle.dark.copyWith( Brightness.light => SystemUiOverlayStyle.dark.copyWith(
systemNavigationBarColor: color, systemNavigationBarColor: color,
systemNavigationBarDividerColor: color, systemNavigationBarDividerColor: color,
statusBarColor: theme.colorScheme.background, // statusBarColor: theme.colorScheme.background,
// statusBarColor: theme.colorScheme.background, // statusBarColor: theme.colorScheme.background,
// systemNavigationBarDividerColor: theme.colorScheme.surface, // systemNavigationBarDividerColor: theme.colorScheme.surface,
), ),
Brightness.dark => SystemUiOverlayStyle.light.copyWith( Brightness.dark => SystemUiOverlayStyle.light.copyWith(
systemNavigationBarColor: color, systemNavigationBarColor: color,
systemNavigationBarDividerColor: color, systemNavigationBarDividerColor: color,
statusBarColor: theme.colorScheme.background, // statusBarColor: theme.colorScheme.background,
// statusBarColor: theme.colorScheme.background, // statusBarColor: theme.colorScheme.background,
// systemNavigationBarDividerColor: theme.colorScheme.surface, // systemNavigationBarDividerColor: theme.colorScheme.surface,
), ),

View File

@@ -221,10 +221,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: collection name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.2" version: "1.18.0"
color: color:
dependency: transitive dependency: transitive
description: description:
@@ -848,6 +848,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.1" version: "1.1.1"
http_mock_adapter:
dependency: transitive
description:
name: http_mock_adapter
sha256: "46399c78bd4a0af071978edd8c502d7aeeed73b5fb9860bca86b5ed647a63c1b"
url: "https://pub.dev"
source: hosted
version: "0.6.1"
http_multi_server: http_multi_server:
dependency: transitive dependency: transitive
description: description:
@@ -1014,7 +1022,7 @@ packages:
source: hosted source: hosted
version: "1.2.0" version: "1.2.0"
markdown: markdown:
dependency: transitive dependency: "direct main"
description: description:
name: markdown name: markdown
sha256: acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd sha256: acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd
@@ -1041,10 +1049,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@@ -1060,6 +1068,14 @@ packages:
relative: true relative: true
source: path source: path
version: "0.0.1" version: "0.0.1"
mockito:
dependency: transitive
description:
name: mockito
sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917"
url: "https://pub.dev"
source: hosted
version: "5.4.4"
mocktail: mocktail:
dependency: transitive dependency: transitive
description: description:
@@ -1223,8 +1239,8 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: "packages/pdfx" path: "packages/pdfx"
ref: HEAD ref: "4be9de9ffed5398fd7d5f44bbb07dcd3d3f1711b"
resolved-ref: "11f7dee82b58ca4f483c753f06bbdc91b34a0793" resolved-ref: "4be9de9ffed5398fd7d5f44bbb07dcd3d3f1711b"
url: "https://github.com/ScerIO/packages.flutter" url: "https://github.com/ScerIO/packages.flutter"
source: git source: git
version: "2.5.0" version: "2.5.0"
@@ -1288,10 +1304,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: platform name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.0" version: "3.1.2"
plugin_platform_interface: plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:
@@ -1637,18 +1653,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
stream_transform: stream_transform:
dependency: transitive dependency: transitive
description: description:
@@ -1693,26 +1709,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test name: test
sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.24.3" version: "1.24.9"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.0" version: "0.6.1"
test_core: test_core:
dependency: transitive dependency: transitive
description: description:
name: test_core name: test_core
sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.3" version: "0.5.9"
time: time:
dependency: transitive dependency: transitive
description: description:
@@ -1877,10 +1893,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vm_service name: vm_service
sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "11.7.1" version: "11.10.0"
watcher: watcher:
dependency: transitive dependency: transitive
description: description:
@@ -1893,10 +1909,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.4-beta" version: "0.3.0"
web_socket_channel: web_socket_channel:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -1994,5 +2010,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.1.0 <4.0.0" dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.13.0" flutter: ">=3.13.0"

View File

@@ -103,8 +103,10 @@ dependencies:
# camerawesome: ^2.0.0-dev.1 # camerawesome: ^2.0.0-dev.1
pdfx: pdfx:
git: git:
url: "https://github.com/ScerIO/packages.flutter" url: 'https://github.com/ScerIO/packages.flutter'
ref: '4be9de9ffed5398fd7d5f44bbb07dcd3d3f1711b'
path: packages/pdfx path: packages/pdfx
markdown: ^7.1.1
dependency_overrides: dependency_overrides:
intl: ^0.18.1 intl: ^0.18.1