Created
October 28, 2020 08:02
-
-
Save cankush625/590953e1ad37d69b2186db07666d4770 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class Auth extends StatefulWidget { | |
@override | |
_AuthState createState() => _AuthState(); | |
} | |
class _AuthState extends State<Auth> { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('ChatApp'), | |
backgroundColor: Colors.blueAccent[700], | |
), | |
body: Center( | |
child: Container( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
Image.asset( | |
'assets/ChatApp.png', | |
), | |
SizedBox( | |
height: 50, | |
), | |
Material( | |
color: Colors.blueAccent[700], | |
borderRadius: BorderRadius.circular(10), | |
elevation: 10, | |
child: MaterialButton( | |
minWidth: 200, | |
height: 40, | |
child: Text('Registration'), | |
onPressed: () { | |
Navigator.pushNamed(context, "reg"); | |
}, | |
), | |
), | |
SizedBox( | |
height: 40, | |
), | |
Material( | |
color: Colors.blueAccent[700], | |
borderRadius: BorderRadius.circular(10), | |
elevation: 10, | |
child: MaterialButton( | |
minWidth: 200, | |
height: 40, | |
child: Text('Login'), | |
onPressed: () { | |
Navigator.pushNamed(context, "login"); | |
}, | |
), | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment