Created
May 28, 2021 00:12
-
-
Save Lesliecalvillo/8b61b21a6f97c5c0cfce689d26215b24 to your computer and use it in GitHub Desktop.
POO Act4 App Tab Bar Paginas 1,2,3
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(LeslieApp()); | |
class LeslieApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter calvillo', | |
debugShowCheckedModeBanner: false,//Quitar baner | |
theme: ThemeData( | |
primarySwatch: Colors.brown, | |
), | |
home: PaginaInicio(), | |
); //Fin material | |
} //Fin de Widget | |
}//Fin de clase LeslieApp herencia StatelessWidget | |
class PaginaInicio extends StatefulWidget { | |
PaginaInicio({Key key, this.title}) : super(key: key); | |
final String title; | |
@override | |
_PaginaInicioState createState() => _PaginaInicioState(); | |
} //Fin clase PaginaInicio herencia StatefulWidget | |
class _PaginaInicioState extends State<PaginaInicio> { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: DefaultTabController( | |
length:3, | |
child : Scaffold( | |
appBar : AppBar( | |
bottom: TabBar( | |
tabs: [ | |
Tab(icon:Icon(Icons.home)), | |
Tab(icon:Icon(Icons.bluetooth)), | |
Tab(icon:Icon(Icons.directions_railway)), | |
]//Fin de pestañas | |
),//fin de TaBar | |
title: Text('Barras de pestañas leslie'), | |
),//fin de appBar | |
body: TabBarView( | |
children : [ | |
Icon(Icons.home), | |
Icon(Icons.bluetooth), | |
Icon(Icons.directions_railway), | |
]//fin de niños | |
)//fin de TabbarView | |
)//fin andamio | |
)//fin de home | |
);//fin de materialApp | |
}// fin de widget | |
}//fin clase_PaginaInicioState herenciaState |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
link
https://dartpad.dev/8b61b21a6f97c5c0cfce689d26215b24