Skip to content

Instantly share code, notes, and snippets.

@Kevin-Gomez10
Created June 19, 2021 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kevin-Gomez10/b3e3216b600524eb69cb09750b486204 to your computer and use it in GitHub Desktop.
Save Kevin-Gomez10/b3e3216b600524eb69cb09750b486204 to your computer and use it in GitHub Desktop.
POO Act15 Drawer ***main.dart***
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}// fin de main
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Proyecto Drawer',
home: new PantallaInicio()
); //fin MaterialApp
} //fin de widget
} //fin clase Kevin
class PantallaInicio extends StatelessWidget{
@override
Widget build(BuildContext context){
return Scaffold(
appBar: AppBar(
title: Text('Gomez Mi Aplicacion '),
backgroundColor: Colors.orangeAccent,
), //fin de appbar
body: Center(
child: Text ('texto en body jajaja'),
), // fin center
drawer: Drawer(
child: new ListView(
children: <Widget> [
UserAccountsDrawerHeader(
accountName: Text('Kevin Gomez'),
accountEmail: Text('elkevingomez2004@gmail.com'),
currentAccountPicture: CircleAvatar(
backgroundColor: Colors.green,
) //fin circulo avatar
), //fin cabecera
ListTile(
title: Text('Configuracion'),
leading: Icon(Icons.access_alarms_sharp),
), // fin ListTile
ListTile(
title: Text('Juguetes'),
leading: Icon(Icons.ac_unit_rounded),
), // fin ListTile
ListTile(
title: Text('Autos'),
leading: Icon(Icons.flight),
), // fin ListTile
], //fin de widget []
) // fin de listview
), // fin drawer
); // fin de scaffold
} //fin widget
}// fin clase PantallaInicio herencia StatelessWidget
@Kevin-Gomez10
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment