joaopaulofcc

Untitled

Sep 22nd, 2020
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.50 KB | None | 0 0
  1. import "package:flutter/material.dart";
  2.  
  3. void main() => runApp(ExercicioAula04());
  4.  
  5. class ExercicioAula04 extends StatelessWidget
  6. {
  7.   @override
  8.   Widget build(BuildContext context)
  9.   {
  10.     return MaterialApp
  11.     (
  12.       home: DefaultTabController
  13.       (
  14.         length: 2,
  15.  
  16.         child: Scaffold
  17.         (
  18.           appBar: AppBar
  19.           (
  20.             title: Text("ExercicioAula04"),
  21.  
  22.             bottom: TabBar
  23.             (
  24.               tabs:
  25.               [
  26.                 Tab(icon: Icon(Icons.image)),
  27.                 Tab(icon: Icon(Icons.list))
  28.               ]
  29.             )
  30.           ),
  31.  
  32.           body: TabBarView
  33.           (
  34.             children:
  35.             [
  36.               Center
  37.               (
  38.                 child: Image.network('https://unilavras.edu.br/new_site/wp-content/uploads/2018/11/Logo-Unilavras-Oficial_2019.png'),
  39.               ),
  40.              
  41.               Center
  42.               (
  43.                 child: GridView.count
  44.                 (
  45.                   crossAxisCount: 3,
  46.                   children: List.generate(100, (index)
  47.                   {
  48.                     return Center
  49.                     (
  50.                       child: Text
  51.                       (
  52.                         'Item $index',
  53.                         style: Theme.of(context).textTheme.headline5,
  54.                       ),
  55.                     );
  56.                   })
  57.                 )
  58.               ),
  59.             ]
  60.           )
  61.         )
  62.       )
  63.     );
  64.   }
  65. }
Add Comment
Please, Sign In to add comment