prasule/lib/views/settings/settings.dart
2023-11-01 15:39:24 +01:00

41 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:prasule/views/settings/tessdata_list.dart';
import 'package:settings_ui/settings_ui.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
class SettingsView extends StatefulWidget {
const SettingsView({super.key});
@override
State<SettingsView> createState() => _SettingsViewState();
}
class _SettingsViewState extends State<SettingsView> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(AppLocalizations.of(context)!.settings)),
body: SettingsList(
applicationType: ApplicationType.both,
darkTheme: SettingsThemeData(
settingsListBackground: Theme.of(context).colorScheme.background,
titleTextColor: Theme.of(context).colorScheme.primary),
sections: [
SettingsSection(
tiles: [
SettingsTile.navigation(
title: Text(AppLocalizations.of(context)!.downloadedOcr),
description:
Text(AppLocalizations.of(context)!.downloadedOcrDesc),
onPressed: (context) => Navigator.of(context).push(
MaterialPageRoute(
builder: (c) => const TessdataListView())),
)
],
title: Text(AppLocalizations.of(context)!.ocr),
),
],
),
);
}
}