Advertisement
joaopaulofcc

Untitled

Sep 9th, 2020
1,040
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.84 KB | None | 0 0
  1. import "package:flutter/material.dart";
  2.  
  3. void main() => runApp(MyApp());
  4.  
  5. class MyApp extends StatelessWidget {
  6.  
  7.   @override
  8.   Widget build(BuildContext context) {
  9.  
  10.     return MaterialApp(
  11.       home : DefaultTabController(
  12.         length : 3,
  13.         child : Scaffold(
  14.           appBar : AppBar(title : Text("Exemplo - TabBar"),
  15.             bottom : TabBar(
  16.               tabs : [
  17.                 Tab(icon : Icon(Icons.announcement)),
  18.                 Tab(icon : Icon(Icons.cake)),
  19.                 Tab(icon : Icon(Icons.cloud))
  20.               ]
  21.             )
  22.           ),
  23.           body : TabBarView(
  24.             children : [
  25.               Center(child : Text("Avisos")),
  26.               Center(child : Text("Aniversários")),
  27.               Center(child : Text("Dados"))
  28.             ]
  29.           )
  30.         )
  31.       )
  32.     );
  33.   }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement