| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'package:analysis_server/src/analysis_server.dart'; |
| 6 |
| 5 /// A set of options used to configure the behavior of IDE functionality. | 7 /// A set of options used to configure the behavior of IDE functionality. |
| 6 abstract class IdeOptions { | 8 abstract class IdeOptions { |
| 9 factory IdeOptions.from(AnalysisServerOptions options) => new IdeOptionsImpl() |
| 10 ..generateFlutterWidgetChildrenBoilerPlate = |
| 11 options.enableVerboseFlutterCompletions; |
| 12 |
| 7 /// Whether to generate boilerplate for lists of Flutter Widget children. | 13 /// Whether to generate boilerplate for lists of Flutter Widget children. |
| 8 /// See: https://github.com/flutter/flutter-intellij/issues/463 | 14 /// See: https://github.com/flutter/flutter-intellij/issues/463 |
| 9 bool get generateFlutterWidgetChildrenBoilerPlate; | 15 bool get generateFlutterWidgetChildrenBoilerPlate; |
| 10 } | 16 } |
| 11 | 17 |
| 12 class IdeOptionsImpl implements IdeOptions { | 18 class IdeOptionsImpl implements IdeOptions { |
| 13 /// Initialize a newly created set of options with default values. | 19 /// Initialize a newly created set of options with default values. |
| 14 IdeOptionsImpl(); | 20 IdeOptionsImpl(); |
| 15 | 21 |
| 16 @override | 22 @override |
| 17 bool generateFlutterWidgetChildrenBoilerPlate = false; | 23 bool generateFlutterWidgetChildrenBoilerPlate = false; |
| 18 } | 24 } |
| OLD | NEW |