[flutter_tool] Add messaging to --fast-start application (#47155)
This commit is contained in:
parent
aa071efd17
commit
556301de43
@ -6,10 +6,25 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
runApp(
|
runApp(
|
||||||
const DecoratedBox(
|
DecoratedBox(
|
||||||
decoration: BoxDecoration(color: Colors.white),
|
decoration: BoxDecoration(color: Colors.white),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: FlutterLogo(size: 48),
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
textDirection: TextDirection.ltr,
|
||||||
|
children: const <Widget>[
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -8,9 +8,10 @@ import 'package:flutter_test/flutter_test.dart';
|
|||||||
import 'package:splash/main.dart' as entrypoint;
|
import 'package:splash/main.dart' as entrypoint;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Displays flutter logo', (WidgetTester tester) async {
|
testWidgets('Displays flutter logo and message', (WidgetTester tester) async {
|
||||||
entrypoint.main();
|
entrypoint.main();
|
||||||
|
|
||||||
expect(find.byType(FlutterLogo), findsOneWidget);
|
expect(find.byType(FlutterLogo), findsOneWidget);
|
||||||
|
expect(find.text('This app is only meant to be run under the Flutter debugger'), findsOneWidget);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user