1.0.0 release #31

Merged
hernik merged 31 commits from dev into main 2024-02-10 16:27:33 +01:00
2 changed files with 81 additions and 74 deletions
Showing only changes of commit 6a25c8289c - Show all commits

View file

@ -51,49 +51,52 @@ class _GraphTypeSettingsViewState extends State<GraphTypeSettingsView> {
context: c,
builder: (ctx) => AlertDialog.adaptive(
title: Text(AppLocalizations.of(context).selectType),
content: Column(
children: [
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).barChart,
textAlign: TextAlign.center,
content: SizedBox(
height: 80,
child: Column(
children: [
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).barChart,
textAlign: TextAlign.center,
),
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("yearlygraph", 1);
_yearly = 1;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("yearlygraph", 1);
_yearly = 1;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
),
SizedBox(
width: MediaQuery.of(context).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).lineChart,
textAlign: TextAlign.center,
SizedBox(
width: MediaQuery.of(context).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).lineChart,
textAlign: TextAlign.center,
),
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("yearlygraph", 2);
_yearly = 2;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("yearlygraph", 2);
_yearly = 2;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
),
],
],
),
),
),
),
@ -109,49 +112,52 @@ class _GraphTypeSettingsViewState extends State<GraphTypeSettingsView> {
context: c,
builder: (ctx) => AlertDialog.adaptive(
title: Text(AppLocalizations.of(context).selectType),
content: Column(
children: [
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).barChart,
textAlign: TextAlign.center,
content: SizedBox(
height: 80,
child: Column(
children: [
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).barChart,
textAlign: TextAlign.center,
),
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("monthlygraph", 1);
_monthly = 1;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("monthlygraph", 1);
_monthly = 1;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
),
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).lineChart,
textAlign: TextAlign.center,
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).lineChart,
textAlign: TextAlign.center,
),
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("monthlygraph", 2);
_monthly = 2;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("monthlygraph", 2);
_monthly = 2;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
),
],
],
),
),
),
),

View file

@ -152,6 +152,7 @@ class _TessdataListViewState extends State<TessdataListView> {
/// so we can show it to the user
Future<void> loadAllTessdata() async {
final tessDir = Directory(await FlutterTesseractOcr.getTessdataPath());
if (!tessDir.existsSync()) tessDir.createSync(recursive: true);
final d = await TessdataApi.getAvailableData();
final dataStatus = <Map<String, bool>>[];
for (final data in d) {