Skip to content

Commit

Permalink
Fix unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
flofriday committed Aug 16, 2021
1 parent a6d7faf commit 6cba01c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 13 deletions.
1 change: 0 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tu_wien_addressbook/models/tiss_login_manager.dart';
import 'package:tu_wien_addressbook/models/update_manager.dart';
import 'package:tu_wien_addressbook/screens/login_screen.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/models/tiss_login_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ class TissLoginManager {
if (!resp.isRedirect) {
break;
} else {
if (resp.headers['location'] == null) break;
sessionUrl = resp.headers['location']!;
print("Redirect to: ${resp.headers['location']}");
if (sessionUrl == null) break;
}
}

Expand Down
1 change: 0 additions & 1 deletion lib/models/update_manager.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:convert';

import 'package:package_info_plus/package_info_plus.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tu_wien_addressbook/models/github_tag.dart';
import 'package:tu_wien_addressbook/models/semver.dart';
import 'package:http/http.dart' as http;
Expand Down
13 changes: 6 additions & 7 deletions lib/screens/login_screen.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tu_wien_addressbook/models/tiss_login_manager.dart';
import 'package:tu_wien_addressbook/widgets/utils.dart';

class LoginScreen extends StatefulWidget {
const LoginScreen({Key? key}) : super(key: key);
Expand All @@ -17,7 +15,6 @@ class _LoginScreenState extends State<LoginScreen> {
TextEditingController _passwordController = TextEditingController();
bool _loading = false;

// TODO: On Android (release build) the app is stuck here and never leaves
void _login() async {
setState(() {
_loading = true;
Expand Down Expand Up @@ -51,7 +48,7 @@ class _LoginScreenState extends State<LoginScreen> {
),
actions: <Widget>[
TextButton(
child: const Text('Close'),
child: const Text('CLOSE'),
onPressed: () {
Navigator.of(context).pop();
},
Expand Down Expand Up @@ -104,7 +101,7 @@ class _LoginScreenState extends State<LoginScreen> {
if (!_loading)
ElevatedButton(
onPressed: () => _login(),
child: Text("Login"),
child: Text("LOGIN"),
),
if (_loading)
Padding(
Expand All @@ -113,7 +110,7 @@ class _LoginScreenState extends State<LoginScreen> {
if (_loading)
ElevatedButton(
onPressed: null,
child: Text("Login"),
child: Text("LOGIN"),
)
],
),
Expand Down Expand Up @@ -191,7 +188,9 @@ class _LoginScreenState extends State<LoginScreen> {
mainAxisSize: MainAxisSize.min,
children: [
Text("TISS protects students privacy, therefore you "
"need to be logged in to find them.\n\n"
"need to be logged in to find them.\n"
"Without logging in you can still search for faculty "
"staff.\n\n"
"Your credentials are only saved locally on this "
"device and are only ever used to authenticate "
"you with TISS."),
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all(Colors.red)),
child: const Text('Delete'),
child: const Text('DELETE'),
onPressed: () async {
await SuggestionManager().clear();
Navigator.of(context).pop();
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/employee_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class EmployeeCard extends StatelessWidget {

// Open a bottom modal sheet and ask the user which website
// they wanna see
String choice = await showModalBottomSheet(
String? choice = await showModalBottomSheet(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(10)),
Expand Down Expand Up @@ -154,7 +154,7 @@ class EmployeeCard extends StatelessWidget {

// Open a bottom modal sheet and ask the user which website
// they wanna see
String choice = await showModalBottomSheet(
String? choice = await showModalBottomSheet(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(10)),
Expand Down

0 comments on commit 6cba01c

Please sign in to comment.