From 7ae0001a4c01454040d8967de67d227ac680336b Mon Sep 17 00:00:00 2001 From: singerdmx Date: Wed, 10 Feb 2021 00:14:20 -0800 Subject: [PATCH] Revert changes in _SelectHeaderStyleButtonState --- app/pubspec.lock | 38 +++++++++++++++++++------------------- lib/widgets/text_line.dart | 2 +- lib/widgets/toolbar.dart | 8 +------- 3 files changed, 21 insertions(+), 27 deletions(-) diff --git a/app/pubspec.lock b/app/pubspec.lock index 6a2ba4df3..e07941f61 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -7,42 +7,42 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.3" + version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.5" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.2.0" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.5" + version: "1.15.0" cupertino_icons: dependency: "direct main" description: @@ -56,7 +56,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -127,28 +127,28 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3-nullsafety.3" + version: "0.6.3" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.3" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.6" + version: "1.3.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.3" + version: "1.8.0" pedantic: dependency: transitive description: @@ -202,42 +202,42 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.4" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.6" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.6" + version: "0.2.19" tuple: dependency: transitive description: @@ -251,7 +251,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.5" + version: "1.3.0" url_launcher: dependency: transitive description: @@ -300,7 +300,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.5" + version: "2.1.0" sdks: dart: ">=2.12.0-0.0 <3.0.0" flutter: ">=1.22.0" diff --git a/lib/widgets/text_line.dart b/lib/widgets/text_line.dart index 53bb07f8f..a90a68831 100644 --- a/lib/widgets/text_line.dart +++ b/lib/widgets/text_line.dart @@ -60,7 +60,7 @@ class TextLine extends StatelessWidget { textAlign, textDirection, 1.0, - Localizations.localeOf(context), + Localizations.localeOf(context, nullOk: true), strutStyle, TextWidthBasis.parent, null); diff --git a/lib/widgets/toolbar.dart b/lib/widgets/toolbar.dart index 1f54bd797..6818803ab 100644 --- a/lib/widgets/toolbar.dart +++ b/lib/widgets/toolbar.dart @@ -446,13 +446,7 @@ Widget _selectHeadingStyleButtonBuilder( height: iconSize * 1.77, fillColor: Theme.of(context).canvasColor, child: Text( - _valueToText[value.key == "header" - ? Attribute.header - : (value.key == "h1") - ? Attribute.h1 - : (value.key == "h2") - ? Attribute.h2 - : Attribute.h3], + _valueToText[value], style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600), ), initialValue: value,