Created
May 27, 2021 23:55
-
-
Save Kevin-Gomez10/130be63f858714cfbdd380af123e28fe to your computer and use it in GitHub Desktop.
POO Act4 App Tab Bar Paginas 1,2,3 tabbarmain.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(KevinApp()); | |
class KevinApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter jorge luis', | |
debugShowCheckedModeBanner: false, // quitar baner | |
theme: ThemeData( | |
primarySwatch: Colors.purple, | |
), | |
home: PaginaInicio(title: 'Barra de pestañas Kevin'), | |
); //fin de material | |
} // fin de Widget | |
}// fin de clase JorgeApp herencia StatelessWidget | |
class PaginaInicio extends StatefulWidget { | |
PaginaInicio({Key key, this.title}) : super(key: key); | |
final String title; | |
@override | |
_PaginaInicio createState() => _PaginaInicio(); | |
} // fin clase paginaInicio Herencia Statelesswidget | |
class _PaginaInicio extends State<PaginaInicio> { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, // quitar baner | |
home: DefaultTabController( | |
length:3, | |
child : Scaffold( | |
appBar : AppBar( | |
bottom: TabBar( | |
tabs: [ | |
Tab(icon: Icon(Icons.account_circle)), | |
Tab(icon: Icon(Icons.accessibility)), | |
Tab(icon: Icon(Icons.exit_to_app)), | |
]// fin de pestañas | |
), //fin de TaBar | |
title: Text("Barra de pestañas Kevin") | |
), // fin de appBar | |
body: TabBarView( | |
children : [ | |
Icon(Icons.account_circle), | |
Icon(Icons.accessibility), | |
Icon(Icons.exit_to_app), | |
] // fin de niños | |
)// fin de TabbarView | |
)// fin andamio | |
)// fin home | |
); // fin MaterialApp | |
} // fin Widget | |
}// fin clase_PaginaInicioState Herencia State | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Codigo funcilnando ------> https://dartpad.dev/130be63f858714cfbdd380af123e28fe