{"action":"closed","issue":{"url":"https://api.github.com/repos/dart-lang/dart_style/issues/447","repository_url":"https://api.github.com/repos/dart-lang/dart_style","labels_url":"https://api.github.com/repos/dart-lang/dart_style/issues/447/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/dart_style/issues/447/comments","events_url":"https://api.github.com/repos/dart-lang/dart_style/issues/447/events","html_url":"https://github.com/dart-lang/dart_style/issues/447","id":113116391,"number":447,"title":"Constructors declaration style","user":{"login":"Hixie","id":551196,"avatar_url":"https://avatars.githubusercontent.com/u/551196?v=3","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2015-10-23T23:28:29Z","updated_at":"2016-07-29T22:18:34Z","closed_at":"2016-07-29T22:18:34Z","body":"Input:\r\n```dart\r\nclass RenderOverflowBox extends RenderBox with RenderObjectWithChildMixin<RenderBox> {\r\n  RenderOverflowBox({\r\n    RenderBox child,\r\n    double minWidth,\r\n    double maxWidth,\r\n    double minHeight,\r\n    double maxHeight\r\n  }) : _minWidth = minWidth, _maxWidth = maxWidth, _minHeight = minHeight, _maxHeight = maxHeight {\r\n    this.child = child;\r\n  }\r\n```\r\n\r\nCurrent output:\r\n```dart\r\nclass RenderOverflowBox extends RenderBox\r\n    with RenderObjectWithChildMixin<RenderBox> {\r\n  RenderOverflowBox(\r\n      {RenderBox child,\r\n      double minWidth,\r\n      double maxWidth,\r\n      double minHeight,\r\n      double maxHeight})\r\n      : _minWidth = minWidth,\r\n        _maxWidth = maxWidth,\r\n        _minHeight = minHeight,\r\n        _maxHeight = maxHeight {\r\n    this.child = child;\r\n  }\r\n```\r\n\r\nSuggested output:\r\n```dart\r\nclass RenderOverflowBox extends RenderBox\r\n    with RenderObjectWithChildMixin<RenderBox> {\r\n  RenderOverflowBox({\r\n    RenderBox child,\r\n    double minWidth,\r\n    double maxWidth,\r\n    double minHeight,\r\n    double maxHeight\r\n  }) : _minWidth = minWidth,\r\n       _maxWidth = maxWidth,\r\n       _minHeight = minHeight,\r\n       _maxHeight = maxHeight {\r\n    this.child = child;\r\n  }\r\n```\r\n\r\n:star:\r\n\r\nInput:\r\n```dart\r\nclass RenderFractionallySizedBox extends RenderProxyBox {\r\n  RenderFractionallySizedBox({\r\n    RenderBox child,\r\n    double widthFactor,\r\n    double heightFactor\r\n  }) : _widthFactor = widthFactor, _heightFactor = heightFactor, super(child) {\r\n    assert(_widthFactor == null || _widthFactor > 0.0);\r\n    assert(_heightFactor == null || _heightFactor > 0.0);\r\n  }\r\n```\r\n\r\nCurrent output:\r\n```dart\r\nclass RenderFractionallySizedBox extends RenderProxyBox {\r\n  RenderFractionallySizedBox(\r\n      {RenderBox child, double widthFactor, double heightFactor})\r\n      : _widthFactor = widthFactor,\r\n        _heightFactor = heightFactor,\r\n        super(child) {\r\n     assert(_widthFactor == null || _widthFactor > 0.0);\r\n     assert(_heightFactor == null || _heightFactor > 0.0);\r\n   }\r\n```\r\n\r\nSuggested output:\r\n```dart\r\nclass RenderFractionallySizedBox extends RenderProxyBox {\r\n  RenderFractionallySizedBox({\r\n    RenderBox child,\r\n    double widthFactor,\r\n    double heightFactor\r\n  }) : _widthFactor = widthFactor,\r\n       _heightFactor = heightFactor,\r\n       super(child) {\r\n    assert(_widthFactor == null || _widthFactor > 0.0);\r\n    assert(_heightFactor == null || _heightFactor > 0.0);\r\n  }\r\n```\r\n\r\n:star:\r\n\r\nCurrent input (and suggested output):\r\n```dart\r\nclass ScrollableList<T> extends ScrollableWidgetList {\r\n  ScrollableList({\r\n    Key key,\r\n    double initialScrollOffset,\r\n    ScrollDirection scrollDirection: ScrollDirection.vertical,\r\n    ScrollListener onScroll,\r\n    SnapOffsetCallback snapOffsetCallback,\r\n    double snapAlignmentOffset: 0.0,\r\n    this.items,\r\n    this.itemBuilder,\r\n    itemsWrap: false,\r\n    double itemExtent,\r\n    EdgeDims padding,\r\n    ScrollableListPainter scrollableListPainter\r\n  }) : super(\r\n    key: key,\r\n    initialScrollOffset: initialScrollOffset,\r\n    scrollDirection: scrollDirection,\r\n    onScroll: onScroll,\r\n    snapOffsetCallback: snapOffsetCallback,\r\n    snapAlignmentOffset: snapAlignmentOffset,\r\n    itemsWrap: itemsWrap,\r\n    itemExtent: itemExtent,\r\n    padding: padding,\r\n    scrollableListPainter: scrollableListPainter\r\n  );\r\n```\r\n\r\nCurrent output:\r\n```dart\r\nclass ScrollableList<T> extends ScrollableWidgetList {\r\n  ScrollableList(\r\n      {Key key,\r\n      double initialScrollOffset,\r\n      ScrollDirection scrollDirection: ScrollDirection.vertical,\r\n      ScrollListener onScroll,\r\n      SnapOffsetCallback snapOffsetCallback,\r\n      double snapAlignmentOffset: 0.0,\r\n      this.items,\r\n      this.itemBuilder,\r\n      itemsWrap: false,\r\n      double itemExtent,\r\n      EdgeDims padding,\r\n      ScrollableListPainter scrollableListPainter})\r\n      : super(\r\n            key: key,\r\n            initialScrollOffset: initialScrollOffset,\r\n            scrollDirection: scrollDirection,\r\n            onScroll: onScroll,\r\n            snapOffsetCallback: snapOffsetCallback,\r\n            snapAlignmentOffset: snapAlignmentOffset,\r\n            itemsWrap: itemsWrap,\r\n            itemExtent: itemExtent,\r\n            padding: padding,\r\n            scrollableListPainter: scrollableListPainter);\r\n```\r\n"}}
{"actor":{"display_login":"munificent"}}