• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5import 'package:flutter/material.dart';
6import 'package:flutter_test/flutter_test.dart';
7
8void main() {
9  // Regression test for https://github.com/flutter/flutter/issues/21506.
10  testWidgets('InkSplash receives textDirection', (WidgetTester tester) async {
11    await tester.pumpWidget(MaterialApp(
12      home: Scaffold(
13      appBar: AppBar(title: const Text('Button Border Test')),
14      body: Center(
15        child: RaisedButton(
16          child: const Text('Test'),
17          onPressed: () { },
18          shape: Border.all(
19            color: Colors.blue,
20          ),
21        ),
22      ),
23    )));
24    await tester.tap(find.text('Test'));
25    // start ink animation which asserts for a textDirection.
26    await tester.pumpAndSettle(const Duration(milliseconds: 30));
27    expect(tester.takeException(), isNull);
28  });
29}
30