我想在我的AppBar中有渐变,所以我添加了
return Scaffold(
appBar: GradientAppBar(和
import 'package:gradient_app_bar/gradient_app_bar.dart';在我的pubspec.yaml中,我添加了
dependencies:
gradient_app_bar: ^0.0.1但我还是遇到了以下问题:
- 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/C:/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'ancestorRenderObjectOfType'.
return context.ancestorRenderObjectOfType(
^^^^^^^^^^^^^^^^^^^^^^^^^^它如何修复它呢?
发布于 2021-05-04 17:35:07
尝试更新到最新版本(0.1.3)。
https://stackoverflow.com/questions/67382144
复制相似问题