I recently upgraded flutter. After upgrading, when I going to use Get it's showing down error. 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" 依赖
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.