【发布时间】:2021-02-06 12:47:01
【问题描述】:
我正在尝试在颤振应用程序中使用包 ShowoCaseView,这是我所做的步骤:
GlobalKey _oneShowcaseKey = GlobalKey();
startShowCase() {
WidgetsBinding.instance.addPostFrameCallback((_) async {
ShowCaseWidget.of(context).startShowCase([_oneShowcaseKey]);
});
}
@override
void initState() {
startShowCase();
super.initState();
}
@override
Widget build(BuildContext context) {
super.build(context);
return ShowCaseWidget(
builder: Builder(
builder: (context) => Scaffold(
child: Showcase(
key: _oneShowcaseKey,
title: 'Menu',
description: 'Click here to see menu options',
child: Column())
)
这是我在应用程序中实现包的方式,但出现此错误:
[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Exception: Please provide ShowCaseView context
【问题讨论】:
标签: flutter dart showcaseview