Enable widget load assets in its own package in test (#35991)

This commit is contained in:
chunhtai
2019-07-16 09:47:42 -07:00
committed by GitHub
parent a8c4da22d9
commit 1166015931
7 changed files with 43 additions and 7 deletions

View File

@@ -0,0 +1 @@
[0-9]+:[0-9]+ [+]1: All tests passed!

View File

@@ -0,0 +1,20 @@
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('Rendering Error', (WidgetTester tester) async {
// Assets can load with its package name.
await tester.pumpWidget(
Image.asset('icon/test.png',
width: 54,
height: 54,
fit: BoxFit.none,
package: 'flutter_automated_tests'
),
);
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

View File

@@ -64,5 +64,6 @@ dependencies:
flutter:
uses-material-design: true
assets:
- icon/
# PUBSPEC CHECKSUM: 4625