Flashを使ったらLooking up a deactivated widget's ancestor

# Flashを使ったらLooking up a deactivated widget's ancestor

結論から言うと、Builderの中のBuildContextを使用してなかったのが原因でした

## エラーが出る方のshowFlash
```error.dart
import 'package:flutter/material.dart';
import 'package:flash/flash.dart';
void showTopFlash({ required BuildContext context,bool persistent = true,EdgeInsets margin = EdgeInsets.zero}) {
    showFlash(
      context: context, 
      persistent: persistent,
      duration: const Duration(seconds: 10),
      builder: (_, controller) {
        return Flash(
          controller: controller, 
          margin: margin,
          backgroundColor: Theme.of(context).focusColor,
          behavior: FlashBehavior.fixed,
          position: FlashPosition.top,
          borderRadius: BorderRadius.circular(MediaQuery.of(context).size.height/100.0),
          borderColor: Theme.of(context).highlightColor,
          boxShadows: kElevationToShadow[8],
          forwardAnimationCurve: Curves.easeInCirc,
          reverseAnimationCurve: Curves.bounceIn,
          onTap: () async {
            ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('Tap!!!')));
          },
          child: DefaultTextStyle(
            style: const TextStyle(fontWeight: FontWeight.bold), 
            child: FlashBar(
              title: Text(
                'title',
                style: TextStyle(
                  color: Theme.of(context).scaffoldBackgroundColor
                ),
              ),
              content: Text(
                'subTitle',
                style: TextStyle(
                  color: Theme.of(context).scaffoldBackgroundColor
                ),
              ),
              indicatorColor: Theme.of(context).primaryColor,
              icon: Icon(Icons.info,color: Theme.of(context).primaryColor,),
              primaryAction: TextButton(
                onPressed: () => controller.dismiss(),
                child: Text(
                  'DISMISS',
                  style: TextStyle(
                    fontWeight: FontWeight.bold,
                    color: Theme.of(context).primaryColor
                  ),
                ),
              ),
              
            )
          )
        );
      }
    );
  }
```
## 正しい方のshowFlash
```show_flash_bar.dart
import 'package:flutter/material.dart';
import 'package:flash/flash.dart';
void showTopFlash({ required BuildContext context,bool persistent = true,EdgeInsets margin = EdgeInsets.zero}) {
    showFlash(
      context: context, 
      persistent: persistent,
      duration: const Duration(seconds: 10),
      builder: (innerContext, controller) {
        return Flash(
          controller: controller, 
          margin: margin,
          backgroundColor: Theme.of(innerContext).focusColor,
          behavior: FlashBehavior.fixed,
          position: FlashPosition.top,
          borderRadius: BorderRadius.circular(MediaQuery.of(context).size.height/100.0),
          borderColor: Theme.of(innerContext).highlightColor,
          boxShadows: kElevationToShadow[8],
          forwardAnimationCurve: Curves.easeInCirc,
          reverseAnimationCurve: Curves.bounceIn,
          onTap: () async {
            ScaffoldMessenger.of(innerContext).showSnackBar(const SnackBar(content: Text('Tap!!!')));
          },
          child: DefaultTextStyle(
            style: const TextStyle(fontWeight: FontWeight.bold), 
            child: FlashBar(
              title: Text(
                'title',
                style: TextStyle(
                  color: Theme.of(innerContext).scaffoldBackgroundColor
                ),
              ),
              content: Text(
                'subTitle',
                style: TextStyle(
                  color: Theme.of(innerContext).scaffoldBackgroundColor
                ),
              ),
              indicatorColor: Theme.of(innerContext).primaryColor,
              icon: Icon(Icons.info,color: Theme.of(innerContext).primaryColor,),
              primaryAction: TextButton(
                onPressed: () => controller.dismiss(),
                child: Text(
                  'DISMISS',
                  style: TextStyle(
                    fontWeight: FontWeight.bold,
                    color: Theme.of(innerContext).primaryColor
                  ),
                ),
              ),
              
            )
          )
        );
      }
    );
  }
```

Builder内のBuildContextの引数名は関数の引数で受けっとたBuildContextと違う名前にしましょう。
今回の例で言うと、'innerContext'です。