mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-14 15:33:17 +08:00

I'm testing this with the Foam documentation. This has revealed a number of bugs in our link resolver - most of which have now been fixed. The graph layouting is not being done as this is so incredibly slow. This has been added as an experimental feature.
76 lines
2.3 KiB
Dart
76 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:gitjournal/settings.dart';
|
|
|
|
class ExperimentalSettingsScreen extends StatefulWidget {
|
|
@override
|
|
_ExperimentalSettingsScreenState createState() =>
|
|
_ExperimentalSettingsScreenState();
|
|
}
|
|
|
|
class _ExperimentalSettingsScreenState
|
|
extends State<ExperimentalSettingsScreen> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var settings = Provider.of<Settings>(context);
|
|
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: Text(tr('settings.experimental.title')),
|
|
leading: IconButton(
|
|
icon: const Icon(Icons.arrow_back),
|
|
onPressed: () {
|
|
Navigator.of(context).pop();
|
|
},
|
|
),
|
|
),
|
|
body: Scrollbar(
|
|
child: ListView(
|
|
children: <Widget>[
|
|
SwitchListTile(
|
|
title: Text(tr('settings.experimental.backlinks')),
|
|
value: settings.experimentalBacklinks,
|
|
onChanged: (bool newVal) {
|
|
settings.experimentalBacklinks = newVal;
|
|
settings.save();
|
|
setState(() {});
|
|
},
|
|
),
|
|
SwitchListTile(
|
|
title: Text(tr('settings.experimental.fs')),
|
|
value: settings.experimentalFs,
|
|
onChanged: (bool newVal) {
|
|
settings.experimentalFs = newVal;
|
|
settings.save();
|
|
setState(() {});
|
|
},
|
|
),
|
|
SwitchListTile(
|
|
title: Text(tr('settings.experimental.graphView')),
|
|
value: settings.experimentalGraphView,
|
|
onChanged: (bool newVal) {
|
|
settings.experimentalGraphView = newVal;
|
|
settings.save();
|
|
setState(() {});
|
|
},
|
|
),
|
|
SwitchListTile(
|
|
title: Text(tr('settings.experimental.markdownToolbar')),
|
|
value: settings.experimentalFs,
|
|
onChanged: (bool newVal) {
|
|
settings.experimentalFs = newVal;
|
|
settings.save();
|
|
setState(() {});
|
|
},
|
|
),
|
|
],
|
|
padding: const EdgeInsets.fromLTRB(0.0, 16.0, 0.0, 0.0),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|