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 {
final double maxHeight;
final Widget child;
@override double get minExtent => minHeight;
@override double get maxExtent => math.max(maxHeight, minHeight);
@override
double get minExtent => minHeight;
@override
double get maxExtent => math.max(maxHeight, minHeight);
@override
Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) {
......
......@@ -8,9 +8,13 @@ import '../demo/all.dart';
import 'icons.dart';
class GalleryDemoCategory {
const GalleryDemoCategory._({ this.name, this.icon });
@required final String name;
@required final IconData icon;
const GalleryDemoCategory._({
@required this.name,
@required this.icon,
});
final String name;
final IconData icon;
@override
bool operator ==(dynamic other) {
......
......@@ -254,10 +254,16 @@ class _NoDefaultCupertinoThemeData extends CupertinoThemeData {
scaffoldBackgroundColor,
);
@override final Brightness brightness;
@override final Color primaryColor;
@override final Color primaryContrastingColor;
@override final CupertinoTextThemeData textTheme;
@override final Color barBackgroundColor;
@override final Color scaffoldBackgroundColor;
@override
final Brightness brightness;
@override
final Color primaryColor;
@override
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 {
return _cachedBuilder;
}
@override DiagnosticsTreeStyle get style {
@override
DiagnosticsTreeStyle get style {
return super.style ?? _builder.defaultDiagnosticsTreeStyle;
}
......
......@@ -3416,7 +3416,8 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
}
/// A short, textual description of this element.
@override String toStringShort() {
@override
String toStringShort() {
return widget != null ? '${widget.toStringShort()}' : '[$runtimeType]';
}
......
......@@ -665,26 +665,46 @@ class _TextStyleProxy implements TextStyle {
final TextStyle _delegate;
// Do make sure that all the properties correctly forward to the _delegate.
@override Color get color => _delegate.color;
@override Color get backgroundColor => _delegate.backgroundColor;
@override String get debugLabel => _delegate.debugLabel;
@override TextDecoration get decoration => _delegate.decoration;
@override Color get decorationColor => _delegate.decorationColor;
@override TextDecorationStyle get decorationStyle => _delegate.decorationStyle;
@override String get fontFamily => _delegate.fontFamily;
@override List<String> get fontFamilyFallback => _delegate.fontFamilyFallback;
@override double get fontSize => _delegate.fontSize;
@override 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
Color get color => _delegate.color;
@override
Color get backgroundColor => _delegate.backgroundColor;
@override
String get debugLabel => _delegate.debugLabel;
@override
TextDecoration get decoration => _delegate.decoration;
@override
Color get decorationColor => _delegate.decorationColor;
@override
TextDecorationStyle get decorationStyle => _delegate.decorationStyle;
@override
String get fontFamily => _delegate.fontFamily;
@override
List<String> get fontFamilyFallback => _delegate.fontFamilyFallback;
@override
double get fontSize => _delegate.fontSize;
@override
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
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.debug }) =>
......
......@@ -8,10 +8,14 @@ import '../flutter_test_alternative.dart';
class RenderTestBox extends RenderBox {
double value = 0.0;
double next() { value += 1.0; return value; }
@override double computeMinIntrinsicWidth(double height) => next();
@override double computeMaxIntrinsicWidth(double height) => next();
@override double computeMinIntrinsicHeight(double width) => next();
@override double computeMaxIntrinsicHeight(double width) => next();
@override
double computeMinIntrinsicWidth(double height) => next();
@override
double computeMaxIntrinsicWidth(double height) => next();
@override
double computeMinIntrinsicHeight(double width) => next();
@override
double computeMaxIntrinsicHeight(double width) => next();
}
void main() {
......
......@@ -15,10 +15,14 @@ class RenderFixedSize extends RenderBox {
markNeedsLayout();
}
@override double computeMinIntrinsicWidth(double height) => dimension;
@override double computeMaxIntrinsicWidth(double height) => dimension;
@override double computeMinIntrinsicHeight(double width) => dimension;
@override double computeMaxIntrinsicHeight(double width) => dimension;
@override
double computeMinIntrinsicWidth(double height) => dimension;
@override
double computeMaxIntrinsicWidth(double height) => dimension;
@override
double computeMinIntrinsicHeight(double width) => dimension;
@override
double computeMaxIntrinsicHeight(double width) => dimension;
@override
void performLayout() {
......
......@@ -247,7 +247,7 @@ void main() {
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);
expect(GlobalMaterialLocalizations.delegate.isSupported(locale), isTrue);
MaterialLocalizations localizations = await GlobalMaterialLocalizations.delegate.load(locale);
......
......@@ -386,20 +386,16 @@ class DevFS {
this.rootDirectory, {
String packagesFilePath,
}) : _operations = ServiceProtocolDevFSOperations(serviceProtocol),
_httpWriter = _DevFSHttpWriter(fsName, serviceProtocol) {
_packagesFilePath =
packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
}
_httpWriter = _DevFSHttpWriter(fsName, serviceProtocol),
_packagesFilePath = packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
DevFS.operations(
this._operations,
this.fsName,
this.rootDirectory, {
String packagesFilePath,
}) : _httpWriter = null {
_packagesFilePath =
packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
}
}) : _httpWriter = null,
_packagesFilePath = packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
final DevFSOperations _operations;
final _DevFSHttpWriter _httpWriter;
......
......@@ -39,7 +39,8 @@ class _FuchsiaLogReader extends DeviceLogReader {
FuchsiaDevice _device;
ApplicationPackage _app;
@override String get name => _device.name;
@override
String get name => _device.name;
Stream<String> _logLines;
@override
......
......@@ -71,7 +71,7 @@ abstract class MacOSApp extends ApplicationPackage {
String get executable;
}
class PrebuiltMacOSApp extends MacOSApp {
class PrebuiltMacOSApp extends MacOSApp {
PrebuiltMacOSApp({
@required this.bundleDir,
@required this.bundleName,
......
......@@ -155,6 +155,5 @@ Future<void> evaluateComplexReturningExpressions(FlutterTestDriver flutter) asyn
// 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.
final InstanceRef res = await flutter.evaluate(resp.id, r'"$year-$month-$day"');
expect(res.valueAsString,
equals('${now.year}-${now.month}-${now.day}'));
expect(res.valueAsString, 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