mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-28 17:08:29 +01:00
Add logo to auth screen
This commit is contained in:
BIN
assets/images/logo.png
Normal file
BIN
assets/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
@@ -24,8 +24,7 @@ class AuthScreen extends StatelessWidget {
|
||||
color: const Color(0xff222000),
|
||||
image: new DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
colorFilter: ColorFilter.mode(
|
||||
Colors.black.withOpacity(0.2), BlendMode.dstATop),
|
||||
colorFilter: ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstATop),
|
||||
image: new AssetImage(
|
||||
'assets/images/main.jpg',
|
||||
),
|
||||
@@ -40,11 +39,14 @@ class AuthScreen extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Image(
|
||||
image: AssetImage('assets/images/logo.png'),
|
||||
width: 120,
|
||||
),
|
||||
Flexible(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 20.0),
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8.0, horizontal: 94.0),
|
||||
padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 94.0),
|
||||
// ..translate(-10.0),
|
||||
child: Text(
|
||||
'WGER',
|
||||
@@ -174,8 +176,7 @@ class _AuthCardState extends State<AuthCard> {
|
||||
elevation: 8.0,
|
||||
child: Container(
|
||||
height: _authMode == AuthMode.Signup ? 520 : 320,
|
||||
constraints:
|
||||
BoxConstraints(minHeight: _authMode == AuthMode.Signup ? 520 : 320),
|
||||
constraints: BoxConstraints(minHeight: _authMode == AuthMode.Signup ? 520 : 320),
|
||||
width: deviceSize.width * 0.75,
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Form(
|
||||
@@ -261,20 +262,17 @@ class _AuthCardState extends State<AuthCard> {
|
||||
CircularProgressIndicator()
|
||||
else
|
||||
RaisedButton(
|
||||
child:
|
||||
Text(_authMode == AuthMode.Login ? 'LOGIN' : 'SIGN UP'),
|
||||
child: Text(_authMode == AuthMode.Login ? 'LOGIN' : 'SIGN UP'),
|
||||
onPressed: _submit,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 30.0, vertical: 8.0),
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 8.0),
|
||||
color: wgerPrimaryColor,
|
||||
textColor: Theme.of(context).primaryTextTheme.button.color,
|
||||
),
|
||||
FlatButton(
|
||||
child: Text(
|
||||
'${_authMode == AuthMode.Login ? 'SIGNUP' : 'LOGIN'} INSTEAD'),
|
||||
child: Text('${_authMode == AuthMode.Login ? 'SIGNUP' : 'LOGIN'} INSTEAD'),
|
||||
onPressed: _switchAuthMode,
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 4),
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
|
||||
@@ -69,8 +69,8 @@ flutter:
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
assets:
|
||||
- assets/images/main.jpg
|
||||
- assets/images/logo.png
|
||||
- assets/images/placeholder.png
|
||||
# - images/a_dot_ham.jpeg
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||
|
||||
Reference in New Issue
Block a user