Skip to content

Instantly share code, notes, and snippets.

@Kevin-Gomez10
Created May 27, 2021 23:55
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/130be63f858714cfbdd380af123e28fe to your computer and use it in GitHub Desktop.
Save Kevin-Gomez10/130be63f858714cfbdd380af123e28fe to your computer and use it in GitHub Desktop.
POO Act4 App Tab Bar Paginas 1,2,3 tabbarmain.dart
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
@Kevin-Gomez10
Copy link
Author

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