0

我已经构建了一个应用程序,并且正在尝试显示功能发现,但是它没有显示发现。也没有显示任何错误。

我提到解决问题的问题

主要.dart

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
      .then((_) async {
    runApp(
      FeatureDiscovery(
        child: MaterialApp(
        home: SplashScreen(),
        ),
      ),
    );
  });
}

ServicesOffersReviewsPhotos.dart

class ServicesOffersReviewsPhotos extends StatefulWidget {
  @override
  _ServicesOffersReviewsPhotosState createState() =>
      _ServicesOffersReviewsPhotosState();
}
class _ServicesOffersReviewsPhotosState
    extends State<ServicesOffersReviewsPhotos>
    with SingleTickerProviderStateMixin {
  late TabController _controller;

  @override
  void initState() {
    _controller = TabController(length: 4, vsync: this, initialIndex: 0);
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: kOffWhiteBackGroundColor,
      appBar: AppBar(
        backgroundColor: kOffWhiteBackGroundColor,
        elevation: 0,
        leading: IconButton(
          icon: Icon(
            Icons.arrow_back_ios,
            color: kDarkGrey,
            size: MediaQuery.of(context).size.width*0.05,
          ),
          onPressed: () {
            Navigator.pop(context);
          },
        ),
        actions: [
          IconButton(
            icon: Icon(
              Icons.favorite_border,
              color: kDarkGrey,
              size: MediaQuery.of(context).size.width*0.05,
            ),
            onPressed: () {},
          ),
          IconButton(
            icon: Icon(
              Icons.share,
              color: kDarkGrey,
              size: MediaQuery.of(context).size.width*0.05,
            ),
            onPressed: () {},
          ),
        ],
      ),
      body: SafeArea(
        child: DescribedFeatureOverlay(
          featureId: 'add_item_feature_id', // Unique id that identifies this overlay.
          tapTarget: const Icon(Icons.add), // The widget that will be displayed as the tap target.
          title: Text('Add item'),
          description: Text('Tap the plus icon to add an item to your list.'),
          backgroundColor: Theme.of(context).primaryColor,
          targetColor: Colors.black,
          textColor: Colors.black,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              children's...
            ],
          ),
        ),
      ),
    );
  }
}

我的申请流程

SplashScreen (PushReplacement) -> onBoardingScreen(PushReplacement) -> LoginScreen(PushReplacement) -> Home(push) -> ServicesOffersReviewsPhotos

我尝试将功能发现放在 servicesoffersReviewsPhotos Scaffold 的顶部,但没有得到任何输出。

我已经参考了媒体、youtube 视频上的每个博客。但没有找到任何解决方案。

4

0 回答 0