Last active
August 3, 2022 17:07
-
-
Save mran3/81b7ebf38ddd2f42ca0eeb2c69b1814b to your computer and use it in GitHub Desktop.
Gentle Introduction to Flutter tutorial for Turtle Techies
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() { | |
print('hello world'); | |
runApp( | |
MaterialApp( | |
home: PresentationCard(), | |
debugShowCheckedModeBanner: false, | |
), | |
); | |
} | |
class PresentationCard extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: const Text('Welcome to Flutter'), | |
), | |
body: Center(child: MyList()), | |
); | |
} | |
} | |
class MyList extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return ListView( | |
padding: const EdgeInsets.all(40), | |
children: <Widget>[ | |
const CircleAvatar( | |
maxRadius: 50, | |
backgroundColor: Colors.black, | |
child: Icon(Icons.person, color: Colors.white, size: 30), | |
), | |
const SizedBox(height: 10), | |
const Center( | |
child: Text( | |
'Raul Ricardo', | |
style: TextStyle( | |
fontSize: 50, | |
), | |
), | |
), | |
const SizedBox(height: 20), | |
const Text( | |
"Incredible developer that single-handledly can turn your vapor-machine company into a superstellar spaceship that travels across faster than light across the multiverse.", | |
style: TextStyle( | |
fontSize: 20, | |
), | |
), | |
const SizedBox(height: 30), | |
ElevatedButton( | |
onPressed: _pushSaved, | |
child: const Text('Contact Developer'), | |
), | |
], | |
); | |
} | |
void _pushSaved() { | |
print("Navigating to next screen"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment