Created
March 24, 2024 23:20
-
-
Save ashraf267/192692bcb975fa1c0f5e0310a48fabe0 to your computer and use it in GitHub Desktop.
Project App - type of user (new or existing) screen. **pad: project-app-design
This file contains hidden or 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(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
backgroundColor: Colors.black, | |
body: Column( | |
children: [ | |
// 3 boxes | |
Expanded( | |
flex: 3, | |
child: Container( | |
child: Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
// logo | |
Icon( | |
Icons.check, | |
color: Colors.green, | |
), | |
// space | |
SizedBox(width: 2), | |
// text | |
Text( | |
'iShow', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 20, | |
), | |
), | |
], | |
), | |
), | |
), | |
Expanded( | |
flex: 1, | |
child: Container( | |
margin: EdgeInsets.all(15), | |
child: MaterialButton( | |
onPressed: () { | |
print('existing user'); | |
}, | |
child: Text( | |
'Existing User', | |
style: TextStyle( | |
color: Colors.white, | |
fontWeight: FontWeight.bold, | |
), | |
), | |
color: Colors.green, | |
minWidth: double.infinity, | |
shape: RoundedRectangleBorder( | |
borderRadius: BorderRadius.circular(5), | |
), | |
), | |
), | |
), | |
Expanded( | |
flex: 1, | |
child: Container( | |
margin: EdgeInsets.all(15), | |
child: MaterialButton( | |
onPressed: () { | |
print('new user'); | |
}, | |
child: Text( | |
'New User', | |
style: TextStyle( | |
color: Colors.white, | |
fontWeight: FontWeight.bold, | |
), | |
), | |
color: Colors.green, | |
minWidth: double.infinity, | |
shape: RoundedRectangleBorder( | |
borderRadius: BorderRadius.circular(5), | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment