divider_test.dart 628 Bytes
Newer Older
1 2 3 4 5 6
// Copyright 2016 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/material.dart';
import 'package:flutter_test/flutter_test.dart';
7
import '../rendering/mock_canvas.dart';
8 9 10

void main() {
  testWidgets('Divider control test', (WidgetTester tester) async {
11
    await tester.pumpWidget(const Center(child: const Divider()));
12
    final RenderBox box = tester.firstRenderObject(find.byType(Divider));
13 14
    expect(box.size.height, 16.0);
    expect(find.byType(Divider), paints..path(strokeWidth: 0.0));
15 16
  });
}