mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
implement saving image, sharing image, reading settings and chapters view
This commit is contained in:
60
lib/pages/settings/reader.dart
Normal file
60
lib/pages/settings/reader.dart
Normal file
@@ -0,0 +1,60 @@
|
||||
part of 'settings_page.dart';
|
||||
|
||||
class ReaderSettings extends StatefulWidget {
|
||||
const ReaderSettings({super.key, this.onChanged});
|
||||
|
||||
final void Function(String key)? onChanged;
|
||||
|
||||
@override
|
||||
State<ReaderSettings> createState() => _ReaderSettingsState();
|
||||
}
|
||||
|
||||
class _ReaderSettingsState extends State<ReaderSettings> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SmoothCustomScrollView(
|
||||
slivers: [
|
||||
SliverAppbar(title: Text("Settings".tl)),
|
||||
_SwitchSetting(
|
||||
title: "Tap to turn Pages".tl,
|
||||
settingKey: "enableTapToTurnPages",
|
||||
onChanged: () {
|
||||
widget.onChanged?.call("enableTapToTurnPages");
|
||||
},
|
||||
).toSliver(),
|
||||
_SwitchSetting(
|
||||
title: "Page animation".tl,
|
||||
settingKey: "enablePageAnimation",
|
||||
onChanged: () {
|
||||
widget.onChanged?.call("enablePageAnimation");
|
||||
},
|
||||
).toSliver(),
|
||||
SelectSetting(
|
||||
title: "Reading mode".tl,
|
||||
settingKey: "readerMode",
|
||||
optionTranslation: {
|
||||
"galleryLeftToRight": "Gallery Left to Right".tl,
|
||||
"galleryRightToLeft": "Gallery Right to Left".tl,
|
||||
"galleryTopToBottom": "Gallery Top to Bottom".tl,
|
||||
"continuousLeftToRight": "Continuous Left to Right".tl,
|
||||
"continuousRightToLeft": "Continuous Right to Left".tl,
|
||||
"continuousTopToBottom": "Continuous Top to Bottom".tl,
|
||||
},
|
||||
onChanged: () {
|
||||
widget.onChanged?.call("readerMode");
|
||||
},
|
||||
).toSliver(),
|
||||
_SliderSetting(
|
||||
title: "Auto page turning interval".tl,
|
||||
settingsIndex: "autoPageTurningInterval",
|
||||
interval: 1,
|
||||
min: 1,
|
||||
max: 20,
|
||||
onChanged: () {
|
||||
widget.onChanged?.call("autoPageTurningInterval");
|
||||
},
|
||||
).toSliver(),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user