Repository: flutter
Issue: Add an option to set a Dismissble as 'active'
Labels: c: new feature,framework,f: material design,P3,team-design,triaged-design

Attempt to disable the Dismissible() behavior by setting `.direction = null` causes assert at https://github.com/flutter/flutter/blob/6d134e0c866ce90a4dc7a02af6a8f1079c2a4fdc/packages/flutter/lib/src/widgets/dismissible.dart#L337

This is a feature enhancement to simplify customer code, not a code fault.

## Setup

Flutter version 0.11.9
Framework revision d48e6e433c (5 days ago), 2018-11-20 22:05:23 -0500
Engine revision 5c8147450d
Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
Platform android-27, build-tools 27.0.3

## Repo Scenario

* ListView containing many Dismissible()
* Dismissible's contain a card
* Sometimes, all these cards can not be dismissed. There should be no sliding possible
* Sometimes, all these cards can be dismissed. Slide to remove them.

It would be desired to use the `Dismissible.direction` field to set the means to be dismissed. With flutter v0.11.9,  we can set that field to any choice of `DismissDirection` but unfortunately not to `null`. Naturally, `null` as a `.direction` would indicate there is no direction in which it can be dismissed...making the Dismissible a noop.

Support for `null` as a value to `Dismissible.direction` will simply customer code. Rather than using a condition expression and duplicating the child widget code, it can more easily be done by just setting the `direction` to null.

Today's unhappy duplicate code 😐

```dart
Listview.builder(...
  itemBuilder:
    return isDisabled ?
      CardWidgetAndCode(
        ...
      )
    : Dismissible(
      child: CardWidgetAndCode( //  <-- duplicate code and/or function call
        ...
      )
    )
)
```

Future happy simplified code 🙂
```dart
Listview.builder(...
  itemBuilder:
    Dismissible(
      direction: isDisabled ? null : DismissDirection.horizontal,
      child: CardWidgetAndCode(
        ...
      )
    )
)
```

## Log of assert

```
package:flutter/src/widgets/dismissible.dart': Failed assertion: line 337 pos 12: 'widget.direction != null': is not true
```

## Doctor

```
[√] Flutter (Channel beta, v0.11.9, on Microsoft Windows [Version 10.0.17763.165], locale en-US)
    • Flutter version 0.11.9 at C:\Users\dale\.flutter
    • Framework revision d48e6e433c (5 days ago), 2018-11-20 22:05:23 -0500
    • Engine revision 5c8147450d
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\Users\dale\.android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = C:\Users\dale\.android\Sdk
    • Java binary at: C:\Program Files\Android\android-studio-preview\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\android-studio-preview
    • Flutter plugin version 30.0.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] VS Code, 64-bit edition (version 1.29.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.20.0

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)

• No issues found!
```