94 lines
3.3 KiB
Dart
94 lines
3.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:tasktracker/Settings/AccountSettings.dart';
|
|
import 'package:tasktracker/Settings/AppearanceSettings.dart';
|
|
import 'package:tasktracker/Settings/NotificationSettings.dart';
|
|
import 'package:tasktracker/Settings/BehaviourSettings.dart';
|
|
import 'package:tasktracker/main.dart';
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
|
class SettingsPage extends StatefulWidget {
|
|
const SettingsPage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
_SettingsPageState createState() => _SettingsPageState();
|
|
}
|
|
|
|
class _SettingsPageState extends State<SettingsPage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(title: Row(
|
|
children: [
|
|
FaIcon(FontAwesomeIcons.cog),
|
|
SizedBox(width: 15,),
|
|
Text('Settings'),
|
|
],
|
|
)),
|
|
body: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
ListTile(
|
|
leading: FaIcon(FontAwesomeIcons.paintbrush),
|
|
title: Text('Appearance'),
|
|
subtitle: Text('Just the looks and feels'),
|
|
// trailing: Icon(Icons.arrow_forward_ios),
|
|
onTap: (){
|
|
Navigator.of(context).push(MaterialPageRoute(builder: (context)=> const AppearanceSettings()));
|
|
},
|
|
),
|
|
ListTile(
|
|
leading: FaIcon(FontAwesomeIcons.bell),
|
|
title: Text('Notifications'),
|
|
subtitle: Text("Don't worry, We won't let you forget"),
|
|
// trailing: Icon(Icons.arrow_forward_ios),
|
|
onTap: (){
|
|
Navigator.of(context).push(MaterialPageRoute(builder: (context)=> const NotificationSettings()));
|
|
},
|
|
),
|
|
ListTile(
|
|
leading: FaIcon(FontAwesomeIcons.cogs),
|
|
title:Text("General Behaviour"),
|
|
subtitle: Text("Wanna change how the app works? Go ahead!"),
|
|
// trailing: Icon(Icons.arrow_forward_ios),
|
|
onTap: (){
|
|
Navigator.of(context).push(MaterialPageRoute(builder: (context)=> const BehaviourSettings()));
|
|
},
|
|
),
|
|
ListTile(
|
|
leading: FaIcon(FontAwesomeIcons.user),
|
|
title:Text("Account Settings"),
|
|
subtitle: Text("Login preferences"),
|
|
// trailing: Icon(Icons.arrow_forward_ios),
|
|
onTap: (){
|
|
Navigator.of(context).push(MaterialPageRoute(builder: (context)=> const AccountSettings()));
|
|
},
|
|
)
|
|
// SettingItem('Appearance', ()=>Navigator.of(context).push(MaterialPageRoute(builder: (context)=> const AppearanceSettings()))),
|
|
// Divider(),
|
|
// SettingItem('Notifications', ()=>Navigator.of(context).push(MaterialPageRoute(builder: (context)=> const NotificationSettings()))),
|
|
],
|
|
)
|
|
);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
Widget SettingItem(String name, Function onTap){
|
|
return InkWell(
|
|
onTap: ()=>onTap(),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(15.0),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Text(name, style: TextStyle(fontSize: 18)),
|
|
Icon(Icons.arrow_forward,size: 20,)
|
|
],
|
|
),
|
|
)
|
|
);
|
|
} |