Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables
- import 'package:flutter/material.dart';
- void main() {
- return runApp(const MaterialApp(
- home: Home(),
- ));
- }
- class Home extends StatefulWidget {
- const Home({Key? key}) : super(key: key);
- @override
- State<Home> createState() => _HomeState();
- }
- class _HomeState extends State<Home> {
- int userLevel = 0;
- List<String> quotes = [
- "A wise man gets more from his enemies than a fool from his Friends ",
- "Mindset is everything",
- "You can have the recipe for Success, but you still have to Cook!",
- "Learn from the mistakes of others. You can't live long enough to make them all yourself.",
- "Man can do what he wills, but he cannot will what he wills."
- ];
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: Colors.grey[900],
- appBar: AppBar(
- title: const Text("Profile"),
- centerTitle: true,
- backgroundColor: Colors.grey[800],
- ),
- body: Padding(
- padding: const EdgeInsets.fromLTRB(30, 20, 30, 0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Center(
- child: CircleAvatar(
- radius: 80,
- backgroundImage: NetworkImage(
- "https://images.unsplash.com/photo-1601645191163-3fc0d5d64e35?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=735&q=80"),
- ),
- ),
- Divider(
- height: 50,
- color: Colors.grey[600],
- ),
- Column(
- children: [
- Text(
- "NAME",
- style: TextStyle(
- color: Colors.grey[400], fontWeight: FontWeight.bold),
- ),
- Text(
- "Bruce Wayne",
- style: TextStyle(color: Colors.amber, fontSize: 25),
- )
- ],
- crossAxisAlignment: CrossAxisAlignment.start,
- ),
- SizedBox(
- height: 20,
- ),
- Column(
- children: [
- Text(
- "AGE",
- style: TextStyle(
- color: Colors.grey[400], fontWeight: FontWeight.bold),
- ),
- Text(
- "24",
- style: TextStyle(color: Colors.amber, fontSize: 25),
- )
- ],
- crossAxisAlignment: CrossAxisAlignment.start,
- ),
- SizedBox(
- height: 20,
- ),
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Column(
- children: [
- Text(
- "GENDER",
- style: TextStyle(
- color: Colors.grey[400], fontWeight: FontWeight.bold),
- ),
- Text(
- 'Male',
- style: TextStyle(color: Colors.amber, fontSize: 25),
- )
- ],
- crossAxisAlignment: CrossAxisAlignment.start,
- ),
- Column(
- children: [
- Text(
- "LEVEL",
- style: TextStyle(
- color: Colors.grey[400], fontWeight: FontWeight.bold),
- ),
- Text(
- '$userLevel',
- style: TextStyle(color: Colors.amber, fontSize: 25),
- )
- ],
- crossAxisAlignment: CrossAxisAlignment.start,
- ),
- ],
- ),
- Center(
- child: OutlinedButton.icon(
- onPressed: () {},
- icon: Icon(
- Icons.email,
- color: Colors.amber,
- ),
- label: Text(
- "bruce@wayne.tech",
- style: TextStyle(color: Colors.amber, fontSize: 25),
- ),
- ),
- ),
- Column(
- children: quotes.map((q) {
- return Container(
- color: Colors.grey[800],
- margin: EdgeInsets.symmetric(vertical: 1, horizontal: 0),
- padding: EdgeInsets.symmetric(vertical: 2, horizontal: 5),
- child: Text(
- q,
- style: TextStyle(color: Colors.amber),
- ),
- );
- }).toList(),
- ),
- Row(
- children: [
- Expanded(
- flex: 2,
- child: Container(
- color: Colors.blue,
- height: 80,
- child: Center(child: Text("1")),
- ),
- ),
- Expanded(
- flex: 1,
- child: Container(
- color: Colors.green,
- height: 80,
- width: 80,
- child: Center(child: Text("2")),
- ),
- ),
- Expanded(
- flex: 3,
- child: Container(
- color: Colors.red,
- height: 80,
- width: 80,
- child: Center(child: Text("3")),
- ),
- ),
- ],
- )
- ],
- ),
- ),
- floatingActionButton: FloatingActionButton(
- onPressed: () {
- setState(() {
- userLevel += 1;
- });
- },
- child: const Icon(Icons.arrow_upward_rounded),
- backgroundColor: Colors.grey[800],
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement