mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-07-15 03:04:25 +08:00
24 lines
771 B
Dart
24 lines
771 B
Dart
// Copyright 2018 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_web/rendering.dart';
|
|
import 'package:flutter_web/widgets.dart';
|
|
import 'package:flutter_web_test/flutter_web_test.dart';
|
|
|
|
void main() {
|
|
testWidgets('provides a value to the layer tree',
|
|
(WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const AnnotatedRegion<int>(
|
|
child: SizedBox(width: 100.0, height: 100.0),
|
|
value: 1,
|
|
),
|
|
);
|
|
final List<Layer> layers = tester.layers;
|
|
final AnnotatedRegionLayer<int> layer =
|
|
layers.firstWhere((Layer layer) => layer is AnnotatedRegionLayer<int>);
|
|
expect(layer.value, 1);
|
|
});
|
|
}
|