Created
June 19, 2021 00:38
-
-
Save Kevin-Gomez10/b3e3216b600524eb69cb09750b486204 to your computer and use it in GitHub Desktop.
POO Act15 Drawer ***main.dart***
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() { | |
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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
link codigo funcionando -----> https://dartpad.dev/b3e3216b600524eb69cb09750b486204