mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-12 14:09:12 +08:00
67 lines
2.0 KiB
Dart
67 lines
2.0 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.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),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|