• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2017 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_driver/driver_extension.dart';
6
7import 'package:flutter/material.dart';
8import 'package:flutter/rendering.dart';
9
10String log = '';
11
12void main() {
13  enableFlutterDriverExtension(handler: (String message) async {
14    log = 'log:';
15    await WidgetsBinding.instance.reassembleApplication();
16    return log;
17  });
18  runApp(const MaterialApp(home: Test()));
19}
20
21class Test extends SingleChildRenderObjectWidget {
22  const Test({ Key key }) : super(key: key);
23
24  @override
25  RenderTest createRenderObject(BuildContext context) {
26    return RenderTest();
27  }
28}
29
30class RenderTest extends RenderProxyBox {
31  RenderTest({ RenderBox child }) : super(child);
32
33  @override
34  void debugPaintSize(PaintingContext context, Offset offset) {
35    super.debugPaintSize(context, offset);
36    log += ' debugPaintSize';
37  }
38
39  @override
40  void paint(PaintingContext context, Offset offset) {
41    log += ' paint';
42  }
43}
44