Polishings

This commit is contained in:
warlock
2022-03-07 18:52:36 +05:30
parent f749c4ce8d
commit 455483299f
11 changed files with 461 additions and 230 deletions

View File

@@ -0,0 +1,57 @@
import 'package:flutter/material.dart';
import 'package:tasktracker/Settings/Settings.dart';
import 'package:tasktracker/Data.dart';
class BehaviourSettings extends StatefulWidget {
const BehaviourSettings({Key? key}) : super(key: key);
@override
_BehaviourSettingsState createState() => _BehaviourSettingsState();
}
class _BehaviourSettingsState extends State<BehaviourSettings> {
bool untracked_unprod = true;
@override void initState() {
// TODO: implement initState
super.initState();
init();
}
void init() async{
untracked_unprod=await Settings.getUntrackedUnproductive();
setState(() {
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Behaviour Settings')),
body: SafeArea(
child: Container(
child:Column(
children: [
ListTile(
title:Text("Count untracked time as unproductive"),
subtitle: Text("Not tracking = Not productive"),
trailing: Switch.adaptive(value: untracked_unprod, onChanged: (val){
untracked_unprod=val;
setState(() {
Settings.setUntrackedUnproductive(val);
});
setState(() {
});
}),
),
],
)
),
)
);
}
}