我一直得到这个错误(Android Studio).lib/routes/router.dart
:
import 'package:auto_route/auto_route.dart';
import 'package:salomon_routing_tutorial/home_page.dart';
...
@AdaptiveAutoRouter(
replaceInRouteName: 'Page,Route',
...
pubspec.yaml
:
name: salomon_routing_tutorial
description: Flutter Bottom Navigation with Nested Routing Tutorial.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ">=2.17.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
auto_route: ^6.0.5
salomon_bottom_bar: ^3.1.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.4
auto_route_generator: ^6.0.3
build_runner: ^2.1.2
analyzer: ^5.10.0
flutter:
uses-material-design: true
一个错字应该是不可能的,有问题的名字是从一个工作项目中复制的。它会是什么呢?
1条答案
按热度按时间6gpjuf901#
试试这个。
1.删除router.dart和router.gr.dart(如果已创建)文件
1.创建一个文件app_router.dart并复制下面的代码。
保存并运行build_runner