Skip to content

Commit

Permalink
Update drawer items order
Browse files Browse the repository at this point in the history
  • Loading branch information
vyPal committed Sep 20, 2023
1 parent 57175ef commit 7fc1376
Showing 1 changed file with 58 additions and 44 deletions.
102 changes: 58 additions & 44 deletions lib/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -697,53 +697,29 @@ class HomePageState extends State<HomePage> {
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
child: ListTile(
leading: const Icon(Icons.lunch_dining_rounded),
title: Text(local!.homeSetupICanteen),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ICanteenSetupScreen(
sessionManager: widget.sessionManager,
loadedCallback: () {
widget.reLogin();
},
),
),
);
},
),
),
InkWell(
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
child: Badge(
label: Text(local.homePreview),
alignment: AlignmentDirectional.topEnd,
child: ListTile(
leading: const Icon(Icons.bolt_rounded),
title: Text(local.homeQuickstart),
trailing: Transform.scale(
scale: 0.75,
child: Switch(
value: quickstart,
onChanged: (bool value) {
sharedPreferences.setBool('quickstart', value);
setState(() {
quickstart = value;
});
},
),
leading: const Icon(Icons.bolt_rounded),
title: Text(local!.homeQuickstart),
trailing: Transform.scale(
scale: 0.75,
child: Switch(
value: quickstart,
onChanged: (bool value) {
sharedPreferences.setBool('quickstart', value);
setState(() {
quickstart = value;
});
},
),
onTap: () {
sharedPreferences.setBool('quickstart', !quickstart);
setState(() {
quickstart = !quickstart;
});
},
),
onTap: () {
sharedPreferences.setBool('quickstart', !quickstart);
setState(() {
quickstart = !quickstart;
});
},
),
),
/*
const Divider(),
ListTile(
leading: const Icon(Icons.language),
Expand Down Expand Up @@ -775,8 +751,29 @@ class HomePageState extends State<HomePage> {
),
),
),
),
),*/
const Divider(),
InkWell(
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
child: ListTile(
leading: const Icon(Icons.lunch_dining_rounded),
title: Text(local.homeSetupICanteen),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ICanteenSetupScreen(
sessionManager: widget.sessionManager,
loadedCallback: () {
widget.reLogin();
},
),
),
);
},
),
),
InkWell(
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
Expand All @@ -791,6 +788,23 @@ class HomePageState extends State<HomePage> {
},
),
),
const Divider(),
InkWell(
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
child: ListTile(
leading: const Icon(Icons.discord),
title: const Text("EduPage2 Discord"),
onTap: () async {
final url = Uri.parse('https://discord.gg/xy5nqWa2kQ');
if (await canLaunchUrl(url)) {
await launchUrl(url);
} else {
throw 'Could not launch $url';
}
},
),
),
const AboutListTile(
icon: Icon(Icons.info_outline),
applicationName: 'EduPage2',
Expand Down

0 comments on commit 7fc1376

Please sign in to comment.