From 556301de437bcab8b5ef1e803b96ab3e300acb8d Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 16 Dec 2019 15:02:23 -0800 Subject: [PATCH] [flutter_tool] Add messaging to --fast-start application (#47155) --- examples/splash/lib/main.dart | 19 +++++++++++++++++-- examples/splash/test/splash_test.dart | 3 ++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/examples/splash/lib/main.dart b/examples/splash/lib/main.dart index 3f5513683e..d6dc8a4315 100644 --- a/examples/splash/lib/main.dart +++ b/examples/splash/lib/main.dart @@ -6,10 +6,25 @@ import 'package:flutter/material.dart'; void main() { runApp( - const DecoratedBox( + DecoratedBox( decoration: BoxDecoration(color: Colors.white), child: Center( - child: FlutterLogo(size: 48), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + textDirection: TextDirection.ltr, + children: const [ + FlutterLogo(size: 48), + Padding( + padding: EdgeInsets.all(32), + child: Text( + 'This app is only meant to be run under the Flutter debugger', + textDirection: TextDirection.ltr, + textAlign: TextAlign.center, + style: TextStyle(color: Colors.black87), + ), + ), + ], + ), ), ), ); diff --git a/examples/splash/test/splash_test.dart b/examples/splash/test/splash_test.dart index e1d597f621..130c0e5f2c 100644 --- a/examples/splash/test/splash_test.dart +++ b/examples/splash/test/splash_test.dart @@ -8,9 +8,10 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:splash/main.dart' as entrypoint; void main() { - testWidgets('Displays flutter logo', (WidgetTester tester) async { + testWidgets('Displays flutter logo and message', (WidgetTester tester) async { entrypoint.main(); expect(find.byType(FlutterLogo), findsOneWidget); + expect(find.text('This app is only meant to be run under the Flutter debugger'), findsOneWidget); }); }