dart-lang / build

A build system for Dart written in Dart
https://pub.dev/packages/build
BSD 3-Clause "New" or "Revised" License
768 stars 205 forks source link

I am unable to run the command ==> flutter pub run build_runner watch --delete-conflicting-outputs.. #3543

Closed karthik14344 closed 1 year ago

karthik14344 commented 1 year ago

I need to generate app_router.gr.dart using this command ==> flutter pub run build_runner watch --delete-conflicting-outputs.. But while writing the route code i was being notified by different errors.

THIS IS MY pubspec.yaml FILE

name: repo_viewer description: A new Flutter project.

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment: sdk: '>=2.12.0 <3.0.0'

dependencies: flutter: sdk: flutter oauth2: ^2.0.2 flutter_secure_storage: ^8.0.0 dartz: ^0.10.1 dio: ^4.0.0 flutter_hooks: ^0.18.6 hooks_riverpod: git: url: https://github.com/rrousselGit/river_pod.git ref: master path: packages/hooks_riverpod freezed_annotation: ^2.2.0 webview_flutter: ^4.2.2 auto_route: ^7.6.0 material_design_icons_flutter: ^7.0.7296 json_annotation: ^4.8.1 sembast: ^3.4.9 path_provider: ^2.0.15 path: ^1.8.3 cached_network_image: ^3.2.3 shimmer: ^3.0.0 flash: ^3.0.5+1 material_floating_search_bar: ^0.3.7 url_launcher: ^6.1.11

dev_dependencies: flutter_test: sdk: flutter build_runner: ^2.4.6 freezed: ^2.3.5 auto_route_generator: ^7.1.2 json_serializable: ^6.7.1 lint: ^2.1.2

dependency_overrides: flutter_riverpod: git: url: https://github.com/rrousselGit/river_pod.git ref: master path: packages/flutter_riverpod riverpod: git: url: https://github.com/rrousselGit/river_pod.git ref: master path: packages/riverpod

flutter: uses-material-design: true

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

This the route code i am using in the file app_router.dart

import 'package:auto_route/auto_route.dart'; import 'package:repo_viewer/auth/presentation/sign_in_page.dart'; import 'package:repo_viewer/splash/presentation/splash_page.dart'; import 'package:repo_viewer/starred_repos/presentation/starred_repos_page.dart';

@MaterialAutoRouter(routes:[ MaterialRoute(page: SplashPage, initial: true), MaterialRoute(page: SignInPage), MaterialRoute(page: StarredReposPage), ]) class $AppRouter{}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

It will be great if i can find solution for this error image_2023-07-05_214256060 image_2023-07-05_214611282 here...

jakemac53 commented 1 year ago

Dupe of https://github.com/dart-lang/build/issues/3540 - please don't open new issues. I can continue to help you on that issue even though it is closed.