Created
April 15, 2024 18:51
-
-
Save oluyoung/3ee83bd59e29d30b9a511eef7ce0a783 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: SignUpScreen(), | |
); | |
} | |
} | |
class SignUpScreen extends StatefulWidget { | |
@override | |
_SignUpScreenState createState() => _SignUpScreenState(); | |
} | |
class _SignUpScreenState extends State<SignUpScreen> { | |
final TextEditingController _phoneController = TextEditingController(); | |
Future<void> _createAccount() async { | |
// Simulate an asynchronous operation like network request | |
await Future.delayed(Duration(seconds: 2)); | |
// Handle account creation logic | |
} | |
Future<void> _login() async { | |
// Simulate an asynchronous operation like network request | |
await Future.delayed(Duration(seconds: 2)); | |
// Handle login logic | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
backgroundColor: Colors.white, | |
body: Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
crossAxisAlignment: CrossAxisAlignment.stretch, | |
children: <Widget>[ | |
Image.network( | |
'https://corsproxy.io/?https%3A%2F%2Foaidalleapiprodscus.blob.core.windows.net%2Fprivate%2Forg-wSmXi5iQtZ8IT5ppyif5Bx30%2Fuser-w72LKma5wN5YGd9sEbbKRFb0%2Fimg-slFjNAMhYLrjy0SljomNoTQG.png%3Fst%3D2024-04-15T17%253A51%253A47Z%26se%3D2024-04-15T19%253A51%253A47Z%26sp%3Dr%26sv%3D2021-08-06%26sr%3Db%26rscd%3Dinline%26rsct%3Dimage%2Fpng%26skoid%3D6aaadede-4fb3-4698-a8f6-684d7786b067%26sktid%3Da48cca56-e6da-484e-a814-9c849652bcb3%26skt%3D2024-04-15T08%253A27%253A37Z%26ske%3D2024-04-16T08%253A27%253A37Z%26sks%3Db%26skv%3D2021-08-06%26sig%3DodNSHPMmljGTJJ%252BKyS%2FaIr5wC9QoQgntsHqzCKlIUWY%253D', | |
height: 200.0, | |
width: 200.0, | |
), | |
SizedBox(height: 48.0), | |
Text( | |
'Enter your phone number to start', | |
textAlign: TextAlign.center, | |
style: TextStyle( | |
fontSize: 16.0, | |
color: Colors.black, | |
), | |
), | |
SizedBox(height: 8.0), | |
TextField( | |
controller: _phoneController, | |
keyboardType: TextInputType.number, | |
decoration: InputDecoration( | |
border: OutlineInputBorder(), | |
hintText: '09081234567', | |
), | |
), | |
SizedBox(height: 24.0), | |
Text( | |
'By clicking the “Create your account” button, you agree to our Terms of Use.', | |
textAlign: TextAlign.center, | |
style: TextStyle( | |
fontSize: 14.0, | |
color: Colors.grey, | |
), | |
), | |
SizedBox(height: 24.0), | |
ElevatedButton( | |
onPressed: _createAccount, | |
child: Text('Create Account'), | |
style: ElevatedButton.styleFrom( | |
primary: Colors.green, | |
padding: EdgeInsets.symmetric(vertical: 16.0), | |
), | |
), | |
TextButton( | |
onPressed: _login, | |
child: Text('Existing user, log in'), | |
style: TextButton.styleFrom( | |
primary: Colors.black, | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment