Issue 1:
Steps to Reproduce

Configuring TargetPlatform.iOS problems will appear

MaterialApp(
title: 'app,
theme: new ThemeData(
primarySwatch: Colors.red,
platform: TargetPlatform.iOS, // ------>>>>>
),
navigatorObservers: <NavigatorObserver>[observers],
onGenerateRoute: Application.router.generator,
home: MyHomePage(title: 'app'),
)

Logs

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v0.11.3, on Mac OS X 10.13.6 17G3025, locale
zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
✗ Android license status unknown.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.2)
[✓] VS Code (version 1.28.2)
[✓] Connected device (1 available)

I/flutter (28074): ══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════
I/flutter (28074): The following assertion was thrown during a service extension callback for
I/flutter (28074): "ext.flutter.inspector.getRootWidgetSummaryTree":
I/flutter (28074): 'package:flutter/src/material/typography.dart': Failed assertion: line 121 pos 14: 'black != null':
I/flutter (28074): is not true.
I/flutter (28074):
I/flutter (28074): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (28074): more information in this error message to help you determine and fix the underlying cause.
I/flutter (28074): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (28074): https://github.com/flutter/flutter/issues/new?template=BUG.md
I/flutter (28074):
I/flutter (28074): When the exception was thrown, this was the stack:
I/flutter (28074): #2 new Typography._ (package:flutter/src/material/typography.dart:121:14)
I/flutter (28074): #3 new Typography (package:flutter/src/material/typography.dart:117:23)
I/flutter (28074): #4 Typography.debugFillProperties (package:flutter/src/material/typography.dart:254:42)
I/flutter (28074): #5 DiagnosticableNode._builder (package:flutter/src/foundation/diagnostics.dart:1983:14)
I/flutter (28074): #6 DiagnosticableNode.getProperties (package:flutter/src/foundation/diagnostics.dart:1996:44)
I/flutter (28074): #7 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:899:46)
I/flutter (28074): #8 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
I/flutter (28074): #9 Diagnosticable.toString (package:flutter/src/foundation/diagnostics.dart:2131:70)
I/flutter (28074): #10 DiagnosticsProperty.valueToString (package:flutter/src/foundation/diagnostics.dart:1808:60)
I/flutter (28074): #11 DiagnosticsProperty.toDescription (package:flutter/src/foundation/diagnostics.dart:1822:21)
I/flutter (28074): #12 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:879:32)
I/flutter (28074): #13 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
I/flutter (28074): #14 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:940:39)
I/flutter (28074): #15 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
I/flutter (28074): #16 Diagnosticable.toString (package:flutter/src/foundation/diagnostics.dart:2131:70)
I/flutter (28074): #17 _StringBase._interpolate (dart:core/runtime/libstring_patch.dart:827:19)
I/flutter (28074): #18 Tween.toString (package:flutter/src/animation/tween.dart:264:58)
I/flutter (28074): #19 DiagnosticsProperty.valueToString (package:flutter/src/foundation/diagnostics.dart:1808:60)
I/flutter (28074): #20 DiagnosticsProperty.toDescription (package:flutter/src/foundation/diagnostics.dart:1822:21)
I/flutter (28074): #21 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:879:32)
I/flutter (28074): #22 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
I/flutter (28074): #23 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:940:39)
I/flutter (28074): #24 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
I/flutter (28074): #25 Diagnosticable.toString (package:flutter/src/foundation/diagnostics.dart:2131:70)
I/flutter (28074): #26 DiagnosticsProperty.valueToString (package:flutter/src/foundation/diagnostics.dart:1808:60)
I/flutter (28074): #27 DiagnosticsProperty.toDescription (package:flutter/src/foundation/diagnostics.dart:1822:21)
I/flutter (28074): #28 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:879:32)
I/flutter (28074): #29 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
I/flutter (28074): #30 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:940:39)
I/flutter (28074): #31 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
I/flutter (28074): #32 Diagnosticable.toString (package:flutter/src/foundation/diagnostics.dart:2131:70)
I/flutter (28074): #33 DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:771:30)
I/flutter (28074): #34 _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1389:43)
I/flutter (28074): #35 _WidgetInspectorService._nodesToJson.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:1523:16)
I/flutter (28074): #36 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
I/flutter (28074): #37 ListIterable.toList (dart:_internal/iterable.dart:219:19)
I/flutter (28074): #38 _WidgetInspectorService._nodesToJson (package:flutter/src/widgets/widget_inspector.dart:1528:10)
I/flutter (28074): #39 _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1421:26)
I/flutter (28074): #40 _WidgetInspectorService._nodesToJson.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:1523:16)
I/flutter (28074): #41 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
I/flutter (28074): #42 ListIterable.toList (dart:_internal/iterable.dart:219:19)
I/flutter (28074): #43 _WidgetInspectorService._nodesToJson (package:flutter/src/widgets/widget_inspector.dart:1528:10)
I/flutter (28074): #44 _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1421:26)
I/flutter (28074): #45 _WidgetInspectorService._nodesToJson.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:1523:16)
I/flutter (28074): #46 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
I/flutter (28074): #47 ListIterable.toList (dart:_internal/iterable.dart:219:19)
I/flutter (28074): #48 _WidgetInspectorService._nodesToJson (package:flutter/src/widgets/widget_inspector.dart:1528:10)
I/flutter (28074): #49 _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1421:26)
I/flutter (28074): #50 _WidgetInspectorService._nodesToJson.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:1523:16)
I/flutter (28074): #51 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
I/flutter (28074): #52 ListIterable.toList (dart:_internal/iterable.dart:219:19)
I/flutter (28074): #53 _WidgetInspectorService._nodesToJson (package:flutter/src/widgets/widget_inspector.dart:1528:10)
I/flutter (28074): #54 _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1421:26)
I/flutter (28074): #55 _WidgetInspectorService._getRootWidgetSummaryTree (package:flutter/src/widgets/widget_inspector.dart:1643:12)
I/flutter (28074): #56 _WidgetInspectorService._registerObjectGroupServiceExtension.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:843:57)
I/flutter (28074): <asynchronous suspension>
I/flutter (28074): #57 BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:438:32)
I/flutter (28074): <asynchronous suspension>
I/flutter (28074): #58 _runExtension (dart:developer/runtime/libdeveloper.dart:86:23)
I/flutter (28074): (elided 2 frames from class _AssertionError)
I/flutter (28074): ════════════════════════════════════════════════════════════════════════════════════════════════════
Error -32000 received from application: Server error

Issue 2:
Steps to Reproduce

Run this demo app:

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final platform = defaultTargetPlatform;

final companyBlackMountainView = Typography.blackMountainView.copyWith(
caption: Typography.blackMountainView.caption.copyWith(
color: Color(0x99020303),
),
);

final companyBlackCupertino = Typography.blackCupertino.copyWith(
caption: Typography.blackCupertino.caption.copyWith(
color: Color(0x99020303),
),
);

TextTheme black;
TextTheme white;

switch (platform) {
case TargetPlatform.iOS:
black = companyBlackCupertino;
white = Typography.whiteCupertino;
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
black = companyBlackMountainView;
white = Typography.whiteMountainView;
}

return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
typography: Typography(
platform: defaultTargetPlatform,
englishLike: Typography.englishLike2018,
dense: Typography.dense2018,
tall: Typography.tall2018,
black: black,
white: white,
),
),
home: Container(),
);
}
}

In console this error is registered:

11:16:46.458 5 info flutter.tools flutter: ══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════
11:16:46.458 6 info flutter.tools flutter: The following assertion was thrown during a service extension callback for
11:16:46.458 7 info flutter.tools flutter: "ext.flutter.inspector.getRootWidgetSummaryTree":
11:16:46.458 8 info flutter.tools flutter: 'package:flutter/src/material/typography.dart': Failed assertion: line 121 pos 14: 'black != null':
11:16:46.458 9 info flutter.tools flutter: is not true.
11:16:46.458 10 info flutter.tools flutter:
11:16:46.458 11 info flutter.tools flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
11:16:46.458 12 info flutter.tools flutter: more information in this error message to help you determine and fix the underlying cause.
11:16:46.458 13 info flutter.tools flutter: In either case, please report this assertion by filing a bug on GitHub:
11:16:46.458 14 info flutter.tools flutter: https://github.com/flutter/flutter/issues/new?template=BUG.md
11:16:46.458 15 info flutter.tools flutter:
11:16:46.458 16 info flutter.tools flutter: When the exception was thrown, this was the stack:
11:16:46.431 17 finer runtime.gc collection time 59ms • 28.7MB used of 32.7MB • isolates/177527503
11:16:46.464 18 info flutter.tools flutter: #2 new Typography._ (package:flutter/src/material/typography.dart:121:14)
11:16:46.464 19 info flutter.tools flutter: #3 new Typography (package:flutter/src/material/typography.dart:117:23)
11:16:46.464 20 info flutter.tools flutter: #4 Typography.debugFillProperties (package:flutter/src/material/typography.dart:254:42)
11:16:46.464 21 info flutter.tools flutter: #5 DiagnosticableNode._builder (package:flutter/src/foundation/diagnostics.dart:1983:14)
11:16:46.464 22 info flutter.tools flutter: #6 DiagnosticableNode.getProperties (package:flutter/src/foundation/diagnostics.dart:1996:44)
11:16:46.464 23 info flutter.tools flutter: #7 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:899:46)
11:16:46.464 24 info flutter.tools flutter: #8 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
11:16:46.464 25 info flutter.tools flutter: #9 Diagnosticable.toString (package:flutter/src/foundation/diagnostics.dart:2131:70)
11:16:46.465 26 info flutter.tools flutter: #10 DiagnosticsProperty.valueToString (package:flutter/src/foundation/diagnostics.dart:1808:60)
11:16:46.465 27 info flutter.tools flutter: #11 DiagnosticsProperty.toDescription (package:flutter/src/foundation/diagnostics.dart:1822:21)
11:16:46.465 28 info flutter.tools flutter: #12 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:879:32)
11:16:46.465 29 info flutter.tools flutter: #13 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
11:16:46.465 30 info flutter.tools flutter: #14 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:940:39)
11:16:46.465 31 info flutter.tools flutter: #15 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
11:16:46.465 32 info flutter.tools flutter: #16 Diagnosticable.toString (package:flutter/src/foundation/diagnostics.dart:2131:70)
11:16:46.465 33 info flutter.tools flutter: #17 _StringBase._interpolate (dart:core/runtime/libstring_patch.dart:827:19)
11:16:46.465 34 info flutter.tools flutter: #18 Tween.toString (package:flutter/src/animation/tween.dart:264:58)
11:16:46.466 35 info flutter.tools flutter: #19 DiagnosticsProperty.valueToString (package:flutter/src/foundation/diagnostics.dart:1808:60)
11:16:46.466 36 info flutter.tools flutter: #20 DiagnosticsProperty.toDescription (package:flutter/src/foundation/diagnostics.dart:1822:21)
11:16:46.466 37 info flutter.tools flutter: #21 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:879:32)
11:16:46.466 38 info flutter.tools flutter: #22 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
11:16:46.466 39 info flutter.tools flutter: #23 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:940:39)
11:16:46.467 40 info flutter.tools flutter: #24 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
11:16:46.467 41 info flutter.tools flutter: #25 Diagnosticable.toString (package:flutter/src/foundation/diagnostics.dart:2131:70)
11:16:46.467 42 info flutter.tools flutter: #26 DiagnosticsProperty.valueToString (package:flutter/src/foundation/diagnostics.dart:1808:60)
11:16:46.467 43 info flutter.tools flutter: #27 DiagnosticsProperty.toDescription (package:flutter/src/foundation/diagnostics.dart:1822:21)
11:16:46.467 44 info flutter.tools flutter: #28 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:879:32)
11:16:46.467 45 info flutter.tools flutter: #29 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
11:16:46.469 46 info flutter.tools flutter: #30 DiagnosticsNode.toStringDeep (package:flutter/src/foundation/diagnostics.dart:940:39)
11:16:46.469 47 info flutter.tools flutter: #31 DiagnosticsNode.toString (package:flutter/src/foundation/diagnostics.dart:795:14)
11:16:46.469 48 info flutter.tools flutter: #32 Diagnosticable.toString (package:flutter/src/foundation/diagnostics.dart:2131:70)
11:16:46.469 49 info flutter.tools flutter: #33 DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:771:30)
11:16:46.469 50 info flutter.tools flutter: #34 _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1390:43)
11:16:46.469 51 info flutter.tools flutter: #35 _WidgetInspectorService._nodesToJson.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:1524:16)
11:16:46.469 52 info flutter.tools flutter: #36 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
11:16:46.470 53 info flutter.tools flutter: #37 ListIterable.toList (dart:_internal/iterable.dart:219:19)
11:16:46.470 54 info flutter.tools flutter: #38 _WidgetInspectorService._nodesToJson (package:flutter/src/widgets/widget_inspector.dart:1529:10)
11:16:46.470 55 info flutter.tools flutter: #39 _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1422:26)
11:16:46.470 56 info flutter.tools flutter: #40 _WidgetInspectorService._nodesToJson.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:1524:16)
11:16:46.470 57 info flutter.tools flutter: #41 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
11:16:46.470 58 info flutter.tools flutter: #42 ListIterable.toList (dart:_internal/iterable.dart:219:19)
11:16:46.472 59 info flutter.tools flutter: #43 _WidgetInspectorService._nodesToJson (package:flutter/src/widgets/widget_inspector.dart:1529:10)
11:16:46.472 60 info flutter.tools flutter: #44 _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1422:26)
11:16:46.472 61 info flutter.tools flutter: #45 _WidgetInspectorService._nodesToJson.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:1524:16)
11:16:46.472 62 info flutter.tools flutter: #46 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
11:16:46.473 63 info flutter.tools flutter: #47 ListIterable.toList (dart:_internal/iterable.dart:219:19)
11:16:46.473 64 info flutter.tools flutter: #48 _WidgetInspectorService._nodesToJson (package:flutter/src/widgets/widget_inspector.dart:1529:10)
11:16:46.473 65 info flutter.tools flutter: #49 _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1422:26)
11:16:46.473 66 info flutter.tools flutter: #50 _WidgetInspectorService._nodesToJson.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:1524:16)
11:16:46.473 67 info flutter.tools flutter: #51 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
11:16:46.481 68 info flutter.tools flutter: #52 ListIterable.toList (dart:_internal/iterable.dart:219:19)
11:16:46.481 69 info flutter.tools flutter: #53 _WidgetInspectorService._nodesToJson (package:flutter/src/widgets/widget_inspector.dart:1529:10)
11:16:46.481 70 info flutter.tools flutter: #54 _WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1422:26)
11:16:46.481 71 info flutter.tools flutter: #55 _WidgetInspectorService._getRootWidgetSummaryTree (package:flutter/src/widgets/widget_inspector.dart:1644:12)
11:16:46.481 72 info flutter.tools flutter: #56 _WidgetInspectorService._registerObjectGroupServiceExtension.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:843:57)
11:16:46.481 73 info flutter.tools flutter: <asynchronous suspension>
11:16:46.481 74 info flutter.tools flutter: #57 BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:438:32)
11:16:46.481 75 info flutter.tools flutter: <asynchronous suspension>
11:16:46.481 76 info flutter.tools flutter: #58 _runExtension (dart:developer/runtime/libdeveloper.dart:86:23)
11:16:46.481 77 info flutter.tools flutter: (elided 2 frames from class _AssertionError)
11:16:46.481 78 info flutter.tools flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
11:16:46.497 79 info flutter.tools Error -32000 received from application: Server error

Logs

flutter analyze

Analyzing typography_bug ...
No issues found! (ran in 1.5s)

flutter doctor -v

[✓] Flutter (Channel beta, v0.11.12, on Mac OS X 10.14.1 18B75, locale en-LT)
• Flutter version 0.11.12 at /Users/ts/Documents/flutter
• Framework revision 06ec8d3b41 (9 hours ago), 2018-11-28 15:56:58 -0800
• Engine revision 72c7a75672
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/ts/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
✗ Verify that all connected devices have been paired with this computer in Xcode.
If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
To update with Brew, run:
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
• ios-deploy 1.9.4
• CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.0.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[!] VS Code (version 1.29.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
• iPhone XR • D64AFDE4-43A3-46CA-96A7-2C2698A20144 • ios • iOS 12.1 (simulator)

! Doctor found issues in 2 categories.