Skip to content

Commit

Permalink
Remove login page and service calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-radloff committed Feb 3, 2022
1 parent a5ac223 commit 9588aa5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 170 deletions.
86 changes: 0 additions & 86 deletions compulse/lib/login.dart

This file was deleted.

27 changes: 3 additions & 24 deletions compulse/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import 'package:flutter/material.dart';
import 'fileHandler.dart';
import 'statusTile.dart';
import 'newItemPage.dart';
import 'login.dart';
import 'serviceCalls.dart';
import 'package:google_fonts/google_fonts.dart';

const PRIMARY_COLOR = 0xFF2F3B48;
Expand Down Expand Up @@ -47,15 +45,13 @@ class _CheckUpAppState extends State<CheckUpApp> {
List<StatusTile> s = await _listFuture;
s.remove(t);
write(s);
postUpdate(username, s);
refreshList();
}

void addItemList(StatusTile t) async {
List<StatusTile> s = await _listFuture;
s.add(t);
write(s);
postUpdate(username, s);
refreshList();
}

Expand Down Expand Up @@ -92,7 +88,9 @@ class _CheckUpAppState extends State<CheckUpApp> {
appBar: AppBar(
backgroundColor: Color(PRIMARY_COLOR),
title: const Image(image: AssetImage('assets/banner.png')),
actions: [TextButton(child: Icon(Icons.person, color: Color(BUTTON_GREEN),), onPressed: () {_login(context);},)],
actions: [TextButton(child: Icon(Icons.settings, color: Color(BUTTON_GREEN),), onPressed: () {
// TODO: Add route to settings page here
},)],
),
body: ReorderableListView(
children: items,
Expand All @@ -103,7 +101,6 @@ class _CheckUpAppState extends State<CheckUpApp> {
final StatusTile item = items.removeAt(oldIndex);
items.insert(newIndex, item);
write(items);
postUpdate(username, items);
}),
floatingActionButton: FloatingActionButton(
foregroundColor: Color(SECONDARY_COLOR),
Expand Down Expand Up @@ -132,24 +129,6 @@ class _CheckUpAppState extends State<CheckUpApp> {
});
}

void _login(BuildContext context) async {
final result = await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LoginRoute(),
),
);
username = result[0];
if (result[1] == false) {
postInsert(result[0], await _listFuture);
} else {
_listFuture = getSelect(result[0], removeItemList);
List<StatusTile> s = await _listFuture;
write(s);
refreshList();
}
}

void _awaitAcess(BuildContext context) async {
final result = await Navigator.push(
context,
Expand Down
60 changes: 0 additions & 60 deletions compulse/lib/serviceCalls.dart

This file was deleted.

0 comments on commit 9588aa5

Please sign in to comment.