Repository: flutter
Issue: Better BoxDecoration directionality error message
Labels: framework,f: material design,a: quality,a: error message,team-design,triaged-design

Running this code sample

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(Container(
    decoration: BoxDecoration(
      border: Border.all(),
      borderRadius: BorderRadiusDirectional.all(Radius.circular(1.0)),
    ),
  ));
}
```

Gives this as output

<details>
<summary>Gives this as output</summary>

```
════════ Exception caught by rendering library ═════════════════════════════════
The following assertion was thrown during paint():
'package:flutter/src/painting/border_radius.dart': Failed assertion: line 727 pos 12: 'direction != null': is not true.
2

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was
Container Container:file:///C:/dev/projects/issues/lib/main.dart:10:12
When the exception was thrown, this was the stack
#2      BorderRadiusDirectional.resolve
package:flutter/…/painting/border_radius.dart:727
#3      _BoxDecorationPainter.paint
package:flutter/…/painting/box_decoration.dart:488
#4      RenderDecoratedBox.paint
package:flutter/…/rendering/proxy_box.dart:2162
#5      RenderObject._paintWithContext
package:flutter/…/rendering/object.dart:2409
#6      PaintingContext.paintChild
package:flutter/…/rendering/object.dart:189
#7      RenderView.paint
package:flutter/…/rendering/view.dart:209
#8      RenderObject._paintWithContext
package:flutter/…/rendering/object.dart:2409
#9      PaintingContext._repaintCompositedChild
package:flutter/…/rendering/object.dart:141
#10     PaintingContext.repaintCompositedChild
package:flutter/…/rendering/object.dart:100
#11     PipelineOwner.flushPaint
package:flutter/…/rendering/object.dart:979
#12     RendererBinding.drawFrame
package:flutter/…/rendering/binding.dart:455
#13     WidgetsBinding.drawFrame
package:flutter/…/widgets/binding.dart:883
#14     RendererBinding._handlePersistentFrameCallback
package:flutter/…/rendering/binding.dart:319
#15     SchedulerBinding._invokeFrameCallback
package:flutter/…/scheduler/binding.dart:1143
#16     SchedulerBinding.handleDrawFrame
package:flutter/…/scheduler/binding.dart:1080
#17     SchedulerBinding.scheduleWarmUpFrame.<anonymous closure>
package:flutter/…/scheduler/binding.dart:863
(elided 13 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
The following RenderObject was being processed when the exception was fired: RenderDecoratedBox#ef365
RenderObject: RenderDecoratedBox#ef365
    parentData: <none>
    constraints: BoxConstraints(w=392.7, h=759.3)
    size: Size(392.7, 759.3)
    decoration: BoxDecoration
        border: Border.all(BorderSide(Color(0xff000000), 1.0, BorderStyle.solid))
        borderRadius: BorderRadiusDirectional.circular(1.0)
    configuration: ImageConfiguration(bundle: PlatformAssetBundle#6a1dc(), devicePixelRatio: 1.0, platform: android)
    child: RenderPadding#0d2c7 NEEDS-PAINT
        parentData: <none> (can use size)
        constraints: BoxConstraints(w=392.7, h=759.3)
        size: Size(392.7, 759.3)
        padding: EdgeInsets.all(1.0)
        child: RenderLimitedBox#7356c NEEDS-PAINT
            parentData: offset=Offset(1.0, 1.0) (can use size)
            constraints: BoxConstraints(w=390.7, h=757.3)
            size: Size(390.7, 757.3)
            maxWidth: 0.0
            maxHeight: 0.0
            child: RenderConstrainedBox#fdce1 NEEDS-PAINT
                parentData: <none> (can use size)
                constraints: BoxConstraints(w=390.7, h=757.3)
                size: Size(390.7, 757.3)
                additionalConstraints: BoxConstraints(biggest)
════════════════════════════════════════════════════════════════════════════════
```
</details>

It would be nice if that would be catched and rethrown with a better error message instructing what I have to do to fix that - similar to the assertion here https://github.com/flutter/flutter/blob/5575bf3c696ebe83ce299d3bf22ba913dbb15bbd/packages/flutter/lib/src/widgets/debug.dart#L270-L296