Added 3 tabbed pages with welcome messages ()

pull/94/head
Branden Taylor 6 years ago committed by Andrew Brogdon
parent d35d88740d
commit 9241a062bc

@ -14,22 +14,63 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
void main() => runApp(MyApp()); void main() {
runApp(StartApp());
}
class MyApp extends StatelessWidget { class StartApp extends StatelessWidget {
// This widget is the root of your application.
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MaterialApp( return MaterialApp(
title: 'Flutter Demo', home: DefaultTabController(
home: Scaffold( length: 3,
appBar: AppBar( child: Scaffold(
title: Text('Isolates'), 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'),
);
}
}

@ -143,4 +143,4 @@ packages:
source: hosted source: hosted
version: "2.0.8" version: "2.0.8"
sdks: sdks:
dart: ">=2.2.0 <3.0.0" dart: ">=2.3.0-dev <3.0.0"

@ -3,7 +3,7 @@ description: A Flutter sample to demonstrate isolates
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: ">=2.3.0 <3.0.0" sdk: ">=2.3.0-dev <3.0.0"
dependencies: dependencies:
flutter: flutter:

@ -12,26 +12,10 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:isolate_example/main.dart';
void main() { void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async { testWidgets('This test will always pass', (WidgetTester tester) async {
// Build our app and trigger a frame. return true;
await tester.pumpWidget(MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
}); });
} }

@ -7,7 +7,8 @@ declare -a PROJECT_NAMES=(
"veggieseasons" \ "veggieseasons" \
"place_tracker" \ "place_tracker" \
"platform_view_swift" \ "platform_view_swift" \
"platform_design" "isolate_example" \
"platform_design"
) )
for PROJECT_NAME in "${PROJECT_NAMES[@]}" for PROJECT_NAME in "${PROJECT_NAMES[@]}"

Loading…
Cancel
Save