Skip to content

Commit

Permalink
Fix visual bug on homescreen [light theme only]
Browse files Browse the repository at this point in the history
  • Loading branch information
flofriday committed Aug 16, 2021
1 parent b5bd694 commit a6d7faf
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 38 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ API, the app itself is not official!

## Future Features

So, I currently implemented all features I can think of. However, I will still
maintain the app and update it to be compatible with future OS versions.

If you have ideas for new features or bug reports, feel free to open an issue.
- Fix light theme

## Build it yourself

Expand Down
61 changes: 30 additions & 31 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class App extends StatelessWidget {
locale: Locale('en'),
theme: ThemeData(
brightness: Brightness.light,
accentColor: Colors.indigo[400],
primarySwatch: Colors.blueGrey,
scaffoldBackgroundColor: Colors.blueGrey[50],
accentColor: Colors.indigo,
primarySwatch: Colors.indigo,
scaffoldBackgroundColor: Colors.indigo[50],
cardTheme: CardTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10)))),
Expand Down Expand Up @@ -104,9 +104,10 @@ class _MainPageState extends State<MainPage> {
padding: EdgeInsets.all(16),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0),
)),
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0),
),
),
onPressed: () {
showSearch(context: context, delegate: PersonSearch());
},
Expand Down Expand Up @@ -137,28 +138,28 @@ class _MainPageState extends State<MainPage> {
return Text("");

return RichText(
text: TextSpan(children: [
TextSpan(
text: 'Login',
style:
TextStyle(decoration: TextDecoration.underline),
recognizer: TapGestureRecognizer()
..onTap = () async {
print('WTF');
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LoginScreen(),
),
);
print('NOW');
setState(() {
this._isLoggedIn =
TissLoginManager().isLoggedIn();
});
}),
TextSpan(text: ' to find students.')
]),
text: TextSpan(
style: Theme.of(context).textTheme.bodyText1,
children: [
TextSpan(
text: 'Login',
style: TextStyle(
decoration: TextDecoration.underline),
recognizer: TapGestureRecognizer()
..onTap = () async {
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LoginScreen(),
),
);
setState(() {
this._isLoggedIn =
TissLoginManager().isLoggedIn();
});
}),
TextSpan(text: ' to find students.')
]),
);
},
),
Expand All @@ -170,9 +171,7 @@ class _MainPageState extends State<MainPage> {
padding: EdgeInsets.all(8),
child: RichText(
text: TextSpan(
style: TextStyle(
fontSize:
Theme.of(context).textTheme.caption!.fontSize),
style: Theme.of(context).textTheme.bodyText2,
children: [
TextSpan(
text: "Made with ❤️ by ",
Expand Down
8 changes: 7 additions & 1 deletion lib/screens/image_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ class ImageScreen extends StatelessWidget {
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
brightness: Brightness.dark,
foregroundColor: Colors.black,
backgroundColor: Color.fromARGB(0xAA, 0x00, 0x00, 0x00),
elevation: 0,
title: Text(_title),
title: Text(
_title,
style: TextStyle(color: Colors.white),
),
iconTheme: IconThemeData(color: Colors.white),
),
body: InteractiveViewer(
clipBehavior: Clip.none,
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 @@ -173,7 +173,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
child: ListBody(
children: const <Widget>[
Text(
'Oh no!\nYou found on of my eastereggs, how emberassing. 🙈\n\nOk you can keep it, but please don\'t tell the other about this.'),
'Oh no!\nYou found on of my eastereggs, how emberassing. 🙈\n\nOk you can keep it, but please don\'t tell the others about this.'),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: An addressbook for TU Wien
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.3.0
version: 1.3.1

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down

0 comments on commit a6d7faf

Please sign in to comment.