From 183c8f0d1dc77c7b7514340d62733b03616f5197 Mon Sep 17 00:00:00 2001 From: Abhishek Ghaskata Date: Fri, 16 Jul 2021 03:06:08 +0530 Subject: [PATCH] Null aware operator consistency (#86223) --- .../test/material/flat_button_test.dart | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/flutter/test/material/flat_button_test.dart b/packages/flutter/test/material/flat_button_test.dart index c2739ab71b..9afa205141 100644 --- a/packages/flutter/test/material/flat_button_test.dart +++ b/packages/flutter/test/material/flat_button_test.dart @@ -36,10 +36,10 @@ void main() { expect(material.elevation, 0.0); expect(material.shadowColor, null); expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); - expect(material.textStyle?.color, const Color(0xdd000000)); - expect(material.textStyle?.fontFamily, 'Roboto'); - expect(material.textStyle?.fontSize, 14); - expect(material.textStyle?.fontWeight, FontWeight.w500); + expect(material.textStyle!.color, const Color(0xdd000000)); + expect(material.textStyle!.fontFamily, 'Roboto'); + expect(material.textStyle!.fontSize, 14); + expect(material.textStyle!.fontWeight, FontWeight.w500); expect(material.type, MaterialType.transparency); final Offset center = tester.getCenter(find.byType(FlatButton)); @@ -56,10 +56,10 @@ void main() { expect(material.elevation, 0.0); expect(material.shadowColor, null); expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); - expect(material.textStyle?.color, const Color(0xdd000000)); - expect(material.textStyle?.fontFamily, 'Roboto'); - expect(material.textStyle?.fontSize, 14); - expect(material.textStyle?.fontWeight, FontWeight.w500); + expect(material.textStyle!.color, const Color(0xdd000000)); + expect(material.textStyle!.fontFamily, 'Roboto'); + expect(material.textStyle!.fontSize, 14); + expect(material.textStyle!.fontWeight, FontWeight.w500); expect(material.type, MaterialType.transparency); // Disabled FlatButton @@ -81,10 +81,10 @@ void main() { expect(material.elevation, 0.0); expect(material.shadowColor, null); expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); - expect(material.textStyle?.color, const Color(0x61000000)); - expect(material.textStyle?.fontFamily, 'Roboto'); - expect(material.textStyle?.fontSize, 14); - expect(material.textStyle?.fontWeight, FontWeight.w500); + expect(material.textStyle!.color, const Color(0x61000000)); + expect(material.textStyle!.fontFamily, 'Roboto'); + expect(material.textStyle!.fontSize, 14); + expect(material.textStyle!.fontWeight, FontWeight.w500); expect(material.type, MaterialType.transparency); });