简体   繁体   English

flutter getx 包不工作,显示错误

[英]flutter getx package not working, showing error

I recently upgraded flutter.我最近升级了颤振。 After upgrading, when I going to use Get it's showing down error.升级后,当我要使用Get 时,它显示错误。 without adding get my project work fine.不添加我的项目工作正常。

Codes代码

import 'package:flutter/material.dart';
import 'package:flutterfire_auth/src/homepage.dart';
import 'package:get/get.dart';

void main() {
  return runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Flutter App',
      debugShowCheckedModeBanner: false,
      home: Homepage(),
    );
  }
}

errors错误

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/get-3.15.0/lib/get_navigation/src/extension_navigation.dart:235:37: Error: No named parameter with the name 'shadowThemeOnly'.
    final theme = Theme.of(context, shadowThemeOnly: true);
                                    ^^^^^^^^^^^^^^^
/C:/src/flutter/packages/flutter/lib/src/material/theme.dart:119:20: Context: Found this candidate, but the arguments don't match.
  static ThemeData of(BuildContext context) {
                   ^^

在 vscode "Pubspec Dependency Search" 中添加 pub 依赖扩展,这将有助于自动添加 "get" 依赖

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Flutter 中,Getx 包 unknownRoute 不起作用 - In Flutter, Getx package unknownRoute not working Obx 不工作 - Flutter Getx package - Obx is not working - Flutter Getx package 自定义小部件无法按预期工作 - GetX package Flutter - Custom widget not working as expected - GetX package Flutter Flutter getx package - 错误:没有名为“findProxy”的命名参数 - Flutter getx package - Error: No named parameter with the name 'findProxy' 使用 Getx 小部件-Flutter 运行时显示错误 - showing Error while running using Getx widget-Flutter GetMidleware 在底部导航栏上不起作用 - flutter - GetX - GetMidleware not working on bottomNavigationBar - flutter - GetX 为什么在颤动中点击通知时路由不起作用? (项目基于GetX和flutter本地推送通知包) - why routing is not working when tap on the notification in flutter? ( the project is based on GetX and flutter local push notification package ) 在 flutter 中使用 GetX package 的导航问题 - Navigation problem using GetX package in flutter Flutter Getx 和 SfCalendar 组合抛出 GetX 使用不当的错误 - flutter Getx and SfCalendar combination throw improper use of a GetX error 带有 GetX 标签的多实例在 flutter 中不起作用 - Multiple Instance with GetX tag not working in flutter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM