Created
December 4, 2023 17:02
-
-
Save Suleman-Elahi/48e5b9e9f98fdb4df82e9f8ccfcbbc3b to your computer and use it in GitHub Desktop.
Generated code from pixels2flutter.dev
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'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: LoginScreen(), | |
); | |
} | |
} | |
class LoginScreen extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
backgroundColor: Colors.red, | |
body: SafeArea( | |
child: Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
Placeholder( | |
fallbackHeight: 100, | |
fallbackWidth: 100, | |
color: Colors.white, | |
), | |
SizedBox(height: 30), | |
Text( | |
'Server Name', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 24, | |
fontWeight: FontWeight.bold, | |
), | |
), | |
SizedBox(height: 30), | |
Text( | |
'Please provide your server credentials', | |
style: TextStyle( | |
color: Colors.white70, | |
fontSize: 16, | |
), | |
textAlign: TextAlign.center, | |
), | |
SizedBox(height: 30), | |
TextField( | |
decoration: InputDecoration( | |
filled: true, | |
fillColor: Colors.white, | |
hintText: 'Username', | |
border: OutlineInputBorder( | |
borderRadius: BorderRadius.circular(4), | |
borderSide: BorderSide.none, | |
), | |
), | |
), | |
SizedBox(height: 16), | |
TextField( | |
obscureText: true, | |
decoration: InputDecoration( | |
filled: true, | |
fillColor: Colors.white, | |
hintText: 'Password', | |
border: OutlineInputBorder( | |
borderRadius: BorderRadius.circular(4), | |
borderSide: BorderSide.none, | |
), | |
), | |
), | |
SizedBox(height: 30), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
children: [ | |
Expanded( | |
child: ElevatedButton( | |
onPressed: () {}, | |
child: Text('Cancel'), | |
style: ElevatedButton.styleFrom( | |
primary: Colors.red[800], | |
onPrimary: Colors.white, | |
), | |
), | |
), | |
SizedBox(width: 16), | |
Expanded( | |
child: ElevatedButton( | |
onPressed: () {}, | |
child: Text('Login'), | |
style: ElevatedButton.styleFrom( | |
primary: Colors.red[800], | |
onPrimary: Colors.white, | |
), | |
), | |
), | |
], | |
), | |
TextButton( | |
onPressed: () {}, | |
child: Text( | |
'Forget Password', | |
style: TextStyle(color: Colors.white), | |
), | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment