mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This feature is the implementation of an accessibility feature that changes the size of text by a constant factor. Fixes #5873
23 lines
693 B
Dart
23 lines
693 B
Dart
// Copyright 2015 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_test/flutter_test.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
void main() {
|
|
testWidgets('Can set opacity for an Icon', (WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
new IconTheme(
|
|
data: new IconThemeData(
|
|
color: Colors.green[500],
|
|
opacity: 0.5
|
|
),
|
|
child: new Icon(Icons.add)
|
|
)
|
|
);
|
|
RichText text = tester.widget(find.byType(RichText));
|
|
expect(text.text.style.color, equals(Colors.green[500].withOpacity(0.5)));
|
|
});
|
|
}
|