diff --git a/lib/components/GravatarImage.dart b/lib/components/GravatarImage.dart index cab902c..a3f4efc 100644 --- a/lib/components/GravatarImage.dart +++ b/lib/components/GravatarImage.dart @@ -3,12 +3,7 @@ import 'package:flutter/material.dart'; import 'package:crypto/crypto.dart'; class GravatarImageProvider extends NetworkImage { - GravatarImageProvider(String email) : super( - "https://secure.gravatar.com/avatar/" + md5.convert( - email - .trim() - .toLowerCase() - .codeUnits - ).toString() - ); + GravatarImageProvider(String email) + : super("https://secure.gravatar.com/avatar/" + + md5.convert(email.trim().toLowerCase().codeUnits).toString()); } diff --git a/lib/global.dart b/lib/global.dart index d634c09..79e5fe7 100644 --- a/lib/global.dart +++ b/lib/global.dart @@ -16,7 +16,8 @@ class VikunjaGlobal extends StatefulWidget { VikunjaGlobalState createState() => VikunjaGlobalState(); static VikunjaGlobalState of(BuildContext context) { - var widget = context.inheritFromWidgetOfExactType(_VikunjaGlobalInherited) as _VikunjaGlobalInherited; + var widget = context.inheritFromWidgetOfExactType(_VikunjaGlobalInherited) + as _VikunjaGlobalInherited; return widget.data; } } @@ -93,7 +94,8 @@ class _VikunjaGlobalInherited extends InheritedWidget { @override bool updateShouldNotify(_VikunjaGlobalInherited oldWidget) { - return (data.currentUser != null && data.currentUser.id != oldWidget.data.currentUser.id) || + return (data.currentUser != null && + data.currentUser.id != oldWidget.data.currentUser.id) || data.client != oldWidget.data.client; } } diff --git a/lib/main.dart b/lib/main.dart index 0feae67..86eeff1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,4 +18,4 @@ class VikunjaApp extends StatelessWidget { home: VikunjaGlobal(child: new HomePage(), login: new LoginPage()), ); } -} \ No newline at end of file +} diff --git a/lib/models/user.dart b/lib/models/user.dart index b7b61c7..d136ebc 100644 --- a/lib/models/user.dart +++ b/lib/models/user.dart @@ -15,4 +15,4 @@ class UserTokenPair { final User user; final String token; UserTokenPair(this.user, this.token); -} \ No newline at end of file +} diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index d8d2ce8..c0196bc 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -87,9 +87,10 @@ class HomePageState extends State { new UserAccountsDrawerHeader( accountEmail: currentUser == null ? null : Text(currentUser.email), accountName: currentUser == null ? null : Text(currentUser.username), - currentAccountPicture: currentUser == null ? null : CircleAvatar( - backgroundImage: GravatarImageProvider(currentUser.username) - ), + currentAccountPicture: currentUser == null + ? null + : CircleAvatar( + backgroundImage: GravatarImageProvider(currentUser.username)), decoration: BoxDecoration( image: DecorationImage( image: AssetImage("assets/graphics/hypnotize.png"), diff --git a/lib/service/services.dart b/lib/service/services.dart index 82428ee..2a0a4ff 100644 --- a/lib/service/services.dart +++ b/lib/service/services.dart @@ -29,4 +29,4 @@ abstract class TaskService { abstract class UserService { Future login(String username, password); Future get(int userId); -} \ No newline at end of file +}