Unverified Commit 4c1f4d14 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

fix some formatting issues (#28809)

* fix some formatting issues

* address review comments

* fix indent
parent 01a29b85
...@@ -119,8 +119,10 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate { ...@@ -119,8 +119,10 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
final double maxHeight; final double maxHeight;
final Widget child; final Widget child;
@override double get minExtent => minHeight; @override
@override double get maxExtent => math.max(maxHeight, minHeight); double get minExtent => minHeight;
@override
double get maxExtent => math.max(maxHeight, minHeight);
@override @override
Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) {
......
...@@ -8,9 +8,13 @@ import '../demo/all.dart'; ...@@ -8,9 +8,13 @@ import '../demo/all.dart';
import 'icons.dart'; import 'icons.dart';
class GalleryDemoCategory { class GalleryDemoCategory {
const GalleryDemoCategory._({ this.name, this.icon }); const GalleryDemoCategory._({
@required final String name; @required this.name,
@required final IconData icon; @required this.icon,
});
final String name;
final IconData icon;
@override @override
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
......
...@@ -254,10 +254,16 @@ class _NoDefaultCupertinoThemeData extends CupertinoThemeData { ...@@ -254,10 +254,16 @@ class _NoDefaultCupertinoThemeData extends CupertinoThemeData {
scaffoldBackgroundColor, scaffoldBackgroundColor,
); );
@override final Brightness brightness; @override
@override final Color primaryColor; final Brightness brightness;
@override final Color primaryContrastingColor; @override
@override final CupertinoTextThemeData textTheme; final Color primaryColor;
@override final Color barBackgroundColor; @override
@override final Color scaffoldBackgroundColor; final Color primaryContrastingColor;
@override
final CupertinoTextThemeData textTheme;
@override
final Color barBackgroundColor;
@override
final Color scaffoldBackgroundColor;
} }
...@@ -1984,7 +1984,8 @@ class DiagnosticableNode<T extends Diagnosticable> extends DiagnosticsNode { ...@@ -1984,7 +1984,8 @@ class DiagnosticableNode<T extends Diagnosticable> extends DiagnosticsNode {
return _cachedBuilder; return _cachedBuilder;
} }
@override DiagnosticsTreeStyle get style { @override
DiagnosticsTreeStyle get style {
return super.style ?? _builder.defaultDiagnosticsTreeStyle; return super.style ?? _builder.defaultDiagnosticsTreeStyle;
} }
......
...@@ -3416,7 +3416,8 @@ abstract class Element extends DiagnosticableTree implements BuildContext { ...@@ -3416,7 +3416,8 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
} }
/// A short, textual description of this element. /// A short, textual description of this element.
@override String toStringShort() { @override
String toStringShort() {
return widget != null ? '${widget.toStringShort()}' : '[$runtimeType]'; return widget != null ? '${widget.toStringShort()}' : '[$runtimeType]';
} }
......
...@@ -665,26 +665,46 @@ class _TextStyleProxy implements TextStyle { ...@@ -665,26 +665,46 @@ class _TextStyleProxy implements TextStyle {
final TextStyle _delegate; final TextStyle _delegate;
// Do make sure that all the properties correctly forward to the _delegate. // Do make sure that all the properties correctly forward to the _delegate.
@override Color get color => _delegate.color; @override
@override Color get backgroundColor => _delegate.backgroundColor; Color get color => _delegate.color;
@override String get debugLabel => _delegate.debugLabel; @override
@override TextDecoration get decoration => _delegate.decoration; Color get backgroundColor => _delegate.backgroundColor;
@override Color get decorationColor => _delegate.decorationColor; @override
@override TextDecorationStyle get decorationStyle => _delegate.decorationStyle; String get debugLabel => _delegate.debugLabel;
@override String get fontFamily => _delegate.fontFamily; @override
@override List<String> get fontFamilyFallback => _delegate.fontFamilyFallback; TextDecoration get decoration => _delegate.decoration;
@override double get fontSize => _delegate.fontSize; @override
@override FontStyle get fontStyle => _delegate.fontStyle; Color get decorationColor => _delegate.decorationColor;
@override FontWeight get fontWeight => _delegate.fontWeight; @override
@override double get height => _delegate.height; TextDecorationStyle get decorationStyle => _delegate.decorationStyle;
@override Locale get locale => _delegate.locale; @override
@override ui.Paint get foreground => _delegate.foreground; String get fontFamily => _delegate.fontFamily;
@override ui.Paint get background => _delegate.background; @override
@override bool get inherit => _delegate.inherit; List<String> get fontFamilyFallback => _delegate.fontFamilyFallback;
@override double get letterSpacing => _delegate.letterSpacing; @override
@override TextBaseline get textBaseline => _delegate.textBaseline; double get fontSize => _delegate.fontSize;
@override double get wordSpacing => _delegate.wordSpacing; @override
@override List<Shadow> get shadows => _delegate.shadows; FontStyle get fontStyle => _delegate.fontStyle;
@override
FontWeight get fontWeight => _delegate.fontWeight;
@override
double get height => _delegate.height;
@override
Locale get locale => _delegate.locale;
@override
ui.Paint get foreground => _delegate.foreground;
@override
ui.Paint get background => _delegate.background;
@override
bool get inherit => _delegate.inherit;
@override
double get letterSpacing => _delegate.letterSpacing;
@override
TextBaseline get textBaseline => _delegate.textBaseline;
@override
double get wordSpacing => _delegate.wordSpacing;
@override
List<Shadow> get shadows => _delegate.shadows;
@override @override
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.debug }) => String toString({ DiagnosticLevel minLevel = DiagnosticLevel.debug }) =>
......
...@@ -8,10 +8,14 @@ import '../flutter_test_alternative.dart'; ...@@ -8,10 +8,14 @@ import '../flutter_test_alternative.dart';
class RenderTestBox extends RenderBox { class RenderTestBox extends RenderBox {
double value = 0.0; double value = 0.0;
double next() { value += 1.0; return value; } double next() { value += 1.0; return value; }
@override double computeMinIntrinsicWidth(double height) => next(); @override
@override double computeMaxIntrinsicWidth(double height) => next(); double computeMinIntrinsicWidth(double height) => next();
@override double computeMinIntrinsicHeight(double width) => next(); @override
@override double computeMaxIntrinsicHeight(double width) => next(); double computeMaxIntrinsicWidth(double height) => next();
@override
double computeMinIntrinsicHeight(double width) => next();
@override
double computeMaxIntrinsicHeight(double width) => next();
} }
void main() { void main() {
......
...@@ -15,10 +15,14 @@ class RenderFixedSize extends RenderBox { ...@@ -15,10 +15,14 @@ class RenderFixedSize extends RenderBox {
markNeedsLayout(); markNeedsLayout();
} }
@override double computeMinIntrinsicWidth(double height) => dimension; @override
@override double computeMaxIntrinsicWidth(double height) => dimension; double computeMinIntrinsicWidth(double height) => dimension;
@override double computeMinIntrinsicHeight(double width) => dimension; @override
@override double computeMaxIntrinsicHeight(double width) => dimension; double computeMaxIntrinsicWidth(double height) => dimension;
@override
double computeMinIntrinsicHeight(double width) => dimension;
@override
double computeMaxIntrinsicHeight(double width) => dimension;
@override @override
void performLayout() { void performLayout() {
......
...@@ -247,7 +247,7 @@ void main() { ...@@ -247,7 +247,7 @@ void main() {
expect(localizations is MaterialLocalizationZh, true); expect(localizations is MaterialLocalizationZh, true);
}); });
testWidgets('Serbian resolution', (WidgetTester tester) async { testWidgets('Serbian resolution', (WidgetTester tester) async {
Locale locale = const Locale.fromSubtags(languageCode: 'sr', scriptCode: null, countryCode: null); Locale locale = const Locale.fromSubtags(languageCode: 'sr', scriptCode: null, countryCode: null);
expect(GlobalMaterialLocalizations.delegate.isSupported(locale), isTrue); expect(GlobalMaterialLocalizations.delegate.isSupported(locale), isTrue);
MaterialLocalizations localizations = await GlobalMaterialLocalizations.delegate.load(locale); MaterialLocalizations localizations = await GlobalMaterialLocalizations.delegate.load(locale);
......
...@@ -386,20 +386,16 @@ class DevFS { ...@@ -386,20 +386,16 @@ class DevFS {
this.rootDirectory, { this.rootDirectory, {
String packagesFilePath, String packagesFilePath,
}) : _operations = ServiceProtocolDevFSOperations(serviceProtocol), }) : _operations = ServiceProtocolDevFSOperations(serviceProtocol),
_httpWriter = _DevFSHttpWriter(fsName, serviceProtocol) { _httpWriter = _DevFSHttpWriter(fsName, serviceProtocol),
_packagesFilePath = _packagesFilePath = packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
}
DevFS.operations( DevFS.operations(
this._operations, this._operations,
this.fsName, this.fsName,
this.rootDirectory, { this.rootDirectory, {
String packagesFilePath, String packagesFilePath,
}) : _httpWriter = null { }) : _httpWriter = null,
_packagesFilePath = _packagesFilePath = packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
}
final DevFSOperations _operations; final DevFSOperations _operations;
final _DevFSHttpWriter _httpWriter; final _DevFSHttpWriter _httpWriter;
......
...@@ -39,7 +39,8 @@ class _FuchsiaLogReader extends DeviceLogReader { ...@@ -39,7 +39,8 @@ class _FuchsiaLogReader extends DeviceLogReader {
FuchsiaDevice _device; FuchsiaDevice _device;
ApplicationPackage _app; ApplicationPackage _app;
@override String get name => _device.name; @override
String get name => _device.name;
Stream<String> _logLines; Stream<String> _logLines;
@override @override
......
...@@ -71,7 +71,7 @@ abstract class MacOSApp extends ApplicationPackage { ...@@ -71,7 +71,7 @@ abstract class MacOSApp extends ApplicationPackage {
String get executable; String get executable;
} }
class PrebuiltMacOSApp extends MacOSApp { class PrebuiltMacOSApp extends MacOSApp {
PrebuiltMacOSApp({ PrebuiltMacOSApp({
@required this.bundleDir, @required this.bundleDir,
@required this.bundleName, @required this.bundleName,
......
...@@ -155,6 +155,5 @@ Future<void> evaluateComplexReturningExpressions(FlutterTestDriver flutter) asyn ...@@ -155,6 +155,5 @@ Future<void> evaluateComplexReturningExpressions(FlutterTestDriver flutter) asyn
// make this, the more likely it'll fail due to differences in the time // make this, the more likely it'll fail due to differences in the time
// in the remote VM and the local VM at the time the code runs. // in the remote VM and the local VM at the time the code runs.
final InstanceRef res = await flutter.evaluate(resp.id, r'"$year-$month-$day"'); final InstanceRef res = await flutter.evaluate(resp.id, r'"$year-$month-$day"');
expect(res.valueAsString, expect(res.valueAsString, equals('${now.year}-${now.month}-${now.day}'));
equals('${now.year}-${now.month}-${now.day}'));
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment