Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 4.67 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:google_fonts/google_fonts.dart';
  3.  
  4. void main() => runApp(MyApp());
  5.  
  6. class MyApp extends StatelessWidget {
  7.   // This widget is the root of your application.
  8.   @override
  9.   Widget build(BuildContext context) {
  10.     return MaterialApp(
  11.       title: 'Login Page',
  12.       debugShowCheckedModeBanner: false,
  13.       theme: ThemeData(
  14.         primarySwatch: Colors.blue,
  15.         hintColor: Colors.white,
  16.         accentColor: Colors.white,
  17.       ),
  18.       home: MyHomePage(),
  19.     );
  20.   }
  21. }
  22.  
  23. class MyHomePage extends StatelessWidget {
  24.   @override
  25.   Widget build(BuildContext context) {
  26.     return Scaffold(
  27.       backgroundColor: Colors.redAccent,
  28.       body: Container(
  29.         margin: EdgeInsets.only(left: 23, right: 23),
  30.         child: SingleChildScrollView(
  31.           child: Center(
  32.             child: Column(
  33.               children: <Widget>[
  34.                 SizedBox(height: 100),
  35.                 Text(
  36.                   "Byneet",
  37.                   style: GoogleFonts.mrDafoe(
  38.                       fontSize: 65,
  39.                       fontWeight: FontWeight.w500,
  40.                       textStyle: TextStyle(
  41.                         color: Colors.white,
  42.                       )),
  43.                 ),
  44.                 SizedBox(height: 50),
  45.                 Theme(
  46.                   data: ThemeData(
  47.                     primaryColor: Colors.white,
  48.                     primaryColorDark: Colors.white,
  49.                   ),
  50.                   child: TextField(
  51.                     keyboardType: TextInputType.emailAddress,
  52.                     cursorColor: Colors.white,
  53.                     decoration: InputDecoration(
  54.                       border: OutlineInputBorder(
  55.                         borderRadius: BorderRadius.circular(14),
  56.                         borderSide: BorderSide(color: Colors.white),
  57.                       ),
  58.                       fillColor: Colors.white,
  59.                       focusColor: Colors.white,
  60.                       hoverColor: Colors.white,
  61.                       labelText: "Username",
  62.                       labelStyle: GoogleFonts.sourceSansPro(
  63.                         textStyle: TextStyle(
  64.                           color: Colors.white,
  65.                         ),
  66.                       ),
  67.                     ),
  68.                     style: TextStyle(
  69.                       color: Colors.white,
  70.                     ),
  71.                   ),
  72.                 ),
  73.                 SizedBox(height: 20),
  74.                 Theme(
  75.                   data: ThemeData(
  76.                     primaryColor: Colors.white,
  77.                     primaryColorDark: Colors.white,
  78.                   ),
  79.                   child: TextField(
  80.                     obscureText: true,
  81.                     cursorColor: Colors.white,
  82.                     decoration: InputDecoration(
  83.                       border: OutlineInputBorder(
  84.                         borderSide: BorderSide(style: BorderStyle.none),
  85.                         borderRadius: BorderRadius.circular(14),
  86.                       ),
  87.                       fillColor: Colors.white,
  88.                       focusColor: Colors.white,
  89.                       hoverColor: Colors.white,
  90.                       labelText: "Password",
  91.                       labelStyle: GoogleFonts.sourceSansPro(
  92.                           textStyle: TextStyle(color: Colors.white)),
  93.                     ),
  94.                     style: TextStyle(
  95.                       color: Colors.white,
  96.                     ),
  97.                   ),
  98.                 ),
  99.                 SizedBox(height: 50),
  100.                 RaisedButton(
  101.                   color: Colors.red,
  102.                   onPressed: () {},
  103.                   child: SizedBox(
  104.                     width: MediaQuery.of(context).size.width,
  105.                     height: 50,
  106.                     child: Align(
  107.                         alignment: Alignment.center,
  108.                         child: Text(
  109.                           "LOGIN",
  110.                           style: GoogleFonts.lato(
  111.                               fontWeight: FontWeight.w700,
  112.                               textStyle: TextStyle(color: Colors.white)),
  113.                         )),
  114.                   ),
  115.                 ),
  116.                 SizedBox(height: 15),
  117.                 FlatButton(
  118.                   onPressed: () {},
  119.                   child: Text(
  120.                     "No Account yet? Create One",
  121.                     style: GoogleFonts.andika(
  122.                         fontSize: 15,
  123.                         textStyle: TextStyle(color: Colors.white)),
  124.                   ),
  125.                 )
  126.               ],
  127.             ),
  128.           ),
  129.         ),
  130.       ),
  131.     );
  132.   }
  133. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement