1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Added 3 tabbed pages with welcome messages (#92)

This commit is contained in:
Branden Taylor
2019-06-17 16:08:45 -07:00
committed by Andrew Brogdon
parent d35d88740d
commit 9241a062bc
5 changed files with 59 additions and 33 deletions

View File

@@ -14,22 +14,63 @@
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
void main() {
runApp(StartApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
class StartApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: Scaffold(
appBar: AppBar(
title: Text('Isolates'),
home: DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
bottom: TabBar(
tabs: [
Tab(icon: Icon(Icons.flash_on), text: 'Performance'),
Tab(icon: Icon(Icons.sync), text: 'Infinite Process'),
Tab(icon: Icon(Icons.storage), text: 'Data Transfer'),
],
),
title: Text('Isolate Example'),
),
body: TabBarView(
children: [
PerformancePage(),
InfiniteProcessPage(),
DataTransferPage(),
],
),
),
body: Center(
child: Text('Here is my app'),
)
)
),
);
}
}
}
class PerformancePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: Text('Welcome to the Performance Page'),
);
}
}
class InfiniteProcessPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: Text('Welcome to the Infinite Process Page'),
);
}
}
class DataTransferPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: Text('Welcome to the Data Transfer Page'),
);
}
}