Skip to content

Instantly share code, notes, and snippets.

@ashraf267
Created March 24, 2024 23:20
Show Gist options
  • Save ashraf267/192692bcb975fa1c0f5e0310a48fabe0 to your computer and use it in GitHub Desktop.
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
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