Skip to content

Instantly share code, notes, and snippets.

@sandeep0402
Last active June 3, 2020 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sandeep0402/edbe858f3a730c42f7285d59893a6aa2 to your computer and use it in GitHub Desktop.
Save sandeep0402/edbe858f3a730c42f7285d59893a6aa2 to your computer and use it in GitHub Desktop.
Flutter login page sample
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.teal,
body: SafeArea(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
CircleAvatar(
radius: 50,
backgroundImage: NetworkImage(
'https://homepages.cae.wisc.edu/~ece533/images/zelda.png')),
Text(
'New User here',
style: TextStyle(
fontSize: 40.0,
color: Colors.white,
fontWeight: FontWeight.bold,
fontFamily: 'Black 700 italic'),
),
Text(
'Please login',
style: TextStyle(
color: Colors.teal.shade200,
fontWeight: FontWeight.bold,
letterSpacing: 2.5,
fontSize: 20.0,
fontFamily: 'Black 700 italic'),
),
SizedBox(
height: 30.0,
width: 150,
child: Divider(
color: Colors.teal.shade50,
),
),
Card(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 25),
child: ListTile(
leading: const Icon(Icons.phone, color: Colors.teal),
title: const Text('+0 980 328 0192',
style: TextStyle(
color: Colors.teal, fontSize: 20.0)))),
Card(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 25),
child: ListTile(
leading: const Icon(Icons.mail, color: Colors.teal),
title: const Text('email@website.com',
style:
TextStyle(color: Colors.teal, fontSize: 20.0))),
)
],
),
),
),
floatingActionButton: FloatingActionButton(
backgroundColor: Colors.green,
child: Icon(Icons.access_alarm),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment