Skip to content

Instantly share code, notes, and snippets.

@cankush625
Created October 28, 2020 08:02
Show Gist options
  • Save cankush625/590953e1ad37d69b2186db07666d4770 to your computer and use it in GitHub Desktop.
Save cankush625/590953e1ad37d69b2186db07666d4770 to your computer and use it in GitHub Desktop.
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