I keep on getting pubsepc.yaml error when running flutter? - sdk

name: churro
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: '>=2.18.4 <3.0.0'
dependencies:
camera: ^0.10.0+4
story_view: ^0.14.0
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter:
uses-material-design: true
assets:
- assets/images/
[churro] flutter pub get
Error detected in pubspec.yaml:
Unexpected child "sdk" found under "flutter".
Please correct the pubspec.yaml file

I believe the problem is your indentation being off. The following should resolve your issue:
name: churro
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: '>=2.18.4 <3.0.0'
dependencies:
flutter:
sdk: flutter
camera: ^0.10.0+4
story_view: ^0.14.0
cupertino_icons: ^1.0.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter:
uses-material-design: true
assets:
- assets/images/

Related

Flutter project Error (Xcode): Invalid depfile

I am creating a cross platform app with Flutter and i am having issues with the iOS build. My app launch on web and android but not on the Iphone simulator. the error i am getting is this:
Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
lib/main.dart:1
Xcode build done. 23,0s
Failed to build iOS app
Error (Xcode): Invalid depfile: /Users/anasseddaoudi/Documents/GitHub/of-mobile/.dart_tool/flutter_build/37678b21c2e582bdb0cea05ff46e8c2b/kernel_snapshot.d
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
Exited
Here's my flutter doctor:
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
Flutter (Channel stable, 3.7.1, on macOS 13.2 22D49 darwin-arm64, locale fr-CA)
Android toolchain - develop for Android devices (Android SDK version 30.0.3)
Xcode - develop for iOS and macOS (Xcode 14.2)
Chrome - develop for the web
Android Studio (version 4.1)
IntelliJ IDEA Community Edition (version 2020.3.3)
VS Code (version 1.56.2)
Connected device (3 available)
HTTP Host Availability
No issues found!
and finaly here's my Pubspec.yaml
name: openfair
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.8.3+46
environment:
sdk: ">=2.17.0 <3.0.5"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^1.0.0
Tools
easy_localization: ^3.0.1
get: ^4.6.5
get_it: 7.2.0
provider: ^6.0.2
intl: ^0.17.0
date_util: ^0.1.4
timeago: ^3.2.2
google_fonts: ^3.0.1
flutter_datetime_picker: 1.5.1
shared_preferences: ^2.0.13
collection: ^1.15.0
another_flushbar: ^1.10.28
google_sign_in: ^5.4.1
flutter_facebook_auth: ^5.0.7
the_apple_sign_in: ^1.1.1
flutter_screenutil: ^5.3.1
image_picker: 0.8.4+6
firebase_storage: ^10.3.1
flutter_stripe: ^4.0.0
flutter_stripe_web: ^1.2.0
firebase_auth: ^3.4.1
firebase_core: ^1.19.1
firebase_analytics: ^9.1.12
firebase_crashlytics: ^2.8.6
cloud_firestore: ^3.2.1
Online
dio: ^4.0.4
pretty_dio_logger: ^1.1.1
UI
flutter_svg: ^1.1.5
flutter_rating_bar: ^4.0.1
cached_network_image: ^3.2.0
modal_bottom_sheet: ^2.1.0
country_picker: ^2.0.19
country_code_picker: ^2.0.2
flutter_image_slideshow: ^0.1.2
firebase_remote_config: ^2.0.2
flutter_keyboard_visibility: ^5.2.0
keyboard_visibility_pro: ^0.0.1
shimmer: ^2.0.0
page_transition: ^2.0.5
http: ^0.13.4
syncfusion_flutter_sliders: ^20.2.36
syncfusion_flutter_charts: ^20.2.36
flutter_dropdown: ^1.0.0+hotfix.1
month_year_picker: ^0.2.0+1
country_state_city_picker: ^1.2.8
credit_card_validator: ^2.0.1
flutter_multi_formatter: ^2.5.8
syncfusion_flutter_datepicker: ^20.2.40
expandable: ^5.0.1
url_launcher: ^6.1.5
flutter_phoenix: ^1.0.0
pay: ^1.1.0
beamer: ^1.5.2
responsive_framework: ^0.2.0
country_phone_code_picker: ^0.0.41
google_tag_manager: ^0.1.0
file_picker: ^3.0.4
flutter_custom_tab_bar: ^1.2.0
email_validator: '^2.1.17'
dialogflow_flutter: ^1.0.0
dropdown_button2: ^1.8.2
badges: ^2.0.3
csv: ^5.0.1
uuid: ^3.0.6
flutter_isolate: ^2.0.4
dropdown_search: ^5.0.3
social_share: ^2.2.1
fluttertoast: ^8.1.2
cloud_functions: ^3.3.9
page_view_indicators: ^2.0.0
universal_html: ^2.0.8
pattern_formatter: ^2.0.0
js: ^0.6.5
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.10.0"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon.png"
min_sdk_android: 21 # android min sdk min:16, default 21
web:
generate: true
image_path: "assets/icon.png"
background_color: "#hexcode"
theme_color: "#hexcode"
flutter:
uses-material-design: true
assets:
assets/
assets/images/
assets/icons/
assets/of-chatbot-pokh-ee6e49888da7.json
assets/gpay.json
assets/Translation/
fonts:
family: OpenSans
fonts:
asset: fonts/open_sans_light.ttf
weight: 300
asset: fonts/open_sans_regular.ttf
weight: 400
asset: fonts/open_sans_semi_bold.ttf
weight: 600
asset: fonts/open_sans_bold.ttf
weight: 700
asset: fonts/open_sans_extra_bold.ttf
weight: 800
family: RozhaOne
fonts:
asset: fonts/rozhaone-regular.ttf
weight: 400
flutter_intl:
enabled: true
I tried flutter clean, deleting the ios repo, cleaning the Xcode cache, upgraded flutter and dart to the latest stable version and even took off dart:html

Submission Flutter App Binary Rejected iOS14

I'm trying to submit a new version of my Flutter App into the Apple Store but the binary from my app is being rejected and I'm not receiving any email's from Apple informing why. I used to receive them but I have no idea of what is going on.
The problem started since since the iOS14 was released.
Any possible ideas?
My pubspec:
name: approachapp
description: A new Flutter application.
version: 1.0.2+14
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
firebase_core: ^0.4.4+3
firebase_analytics: ^5.0.11
firebase_auth: ^0.16.0
firebase_database: ^3.1.3
firebase_storage: ^3.1.5
cloud_firestore: ^0.13.5
device_info: ^0.4.1+4
apple_sign_in: ^0.1.0
google_sign_in: ^4.4.4
geolocator: ^5.3.2+2
intl: ^0.16.1
qr_flutter: ^3.1.0
flutter_geofire:
git:
url: git://github.com/marcuslindemannrohden/flutter_geofire
ref: update_query
image_cropper: ^1.3.1
font_awesome_flutter: ^8.8.1
image_picker: ^0.6.6+1
carousel_slider: ^2.2.1
google_nav_bar: ^2.2.0
cloud_functions: ^0.5.0
flutter_launcher_icons: ^0.7.5
cached_network_image: ^2.2.0+1
extended_image: ^0.9.0
url_launcher: ^5.4.11
flushbar: ^1.10.4
hive: ^1.4.4
path_provider: ^1.6.9
flutter_mobx: ^1.1.0+1
mobx: ^1.2.1+1
flutter_modular: ^1.3.0
shared_preferences: ^0.5.7+3
firebase_messaging: ^6.0.16
permission_handler: ^5.0.1+1
story_view: ^0.12.3
scrollable_positioned_list: ^0.1.7
dev_dependencies:
mockito: ^4.1.1
modular_codegen: ^1.0.1+3
mobx_codegen: ^1.1.0+1
build_runner: ^1.10.0
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/approachlaunchicon.png"
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/images/
vars:
runner: flutter pub run build_runner
clean: flutter clean
get: flutter pub get
scripts:
mobb: $clean & $get & $runner build --delete-conflicting-outputs
mobw: $clean & $get & $runner watch --delete-conflicting-outputs
updateIcons: flutter pub run flutter_launcher_icons:main
buildAndroidProd: flutter build appbundle --release --flavor prod --target lib/main_prod.dart
buildiOSProd: flutter build ios --release --flavor prod --target lib/main_prod.dart

Flutter IOS release size more than 400Mb

New to Flutter. I'm working on this app and on "flutter build ios --release" command is 407Mb on size, with apk instead i have 25Mb. I've tried downgrade flutter without results, still the same sizes even if my assets folder is just 8.6Mb. This is my yaml file:
name: ragogna
description: Nuova app per la comunita.
version: 1.0.0+1
environment:
sdk: '>=2.7.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
share: ^0.6.3+5
font_awesome_flutter: ^8.5.0
sliver_fill_remaining_box_adapter: ^0.1.1
url_launcher: ^5.4.1
provider: ^3.2.0
add_2_calendar: ^1.3.1
photo_view: ^0.9.2
cached_network_image: ^2.0.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/
- assets/event_images/
- assets/locations/
- assets/itinerari/
fonts:
- family: Kievit
fonts:
- asset: fonts/Kievit-Book.ttf
- asset: fonts/Kievit-Medium.ttf
- family: Charter
fonts:
- asset: fonts/Charter.ttf

flutter generate doesn't annotated classes for test directory

So I've tried generate classes DI classes for the inject.dart using flutter generate
It seems to generate classes under lib/* but not for test/*. It does not throw any error as such. Here are my relevant flutter classes.
pubspec.yaml
name: gc_client
description: A gc
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
json_annotation: ^2.0.0
rxdart: ^0.22.0
dio: ^2.1.3
inject:
path: ./inject.dart/package/inject
builders:
json_serializable: ^2.0.0
inject_generator:
path: ./inject.dart/package/inject_generator
dev_dependencies:
test: 1.6.1
flutter_test:
sdk: flutter
mockito: ^4.0.0
flutter:
uses-material-design: true
fonts:
- family: Raleway
fonts:
- asset: assets/fonts/raleway_regular.ttf
- asset: assets/fonts/raleway_medium.ttf
weight: 700
assets:
- assets/
Component classes
Am I missing something? Let me know if you need more info. Thanks in advance.
The issue is with the build runner.
Here's a relevant fix for the same
https://github.com/flutter/flutter/issues/33266

pubspec.yaml Conflicting deps with web3dart

Trying to incorporate the web3dart package into my project. When I run pub get I receive the error:
web3dart ^0.3.0 requires build_runner ^0.8.0.
When I change build_runner to ^0.8.0 my project will not build and I get the error:
The build_runner version – 0.8.3 – is not within the allowed
constraint – >=0.8.10 <0.10.0.
Appears I'm in a bind, in need of advice on how to proceed.
pubspec.yaml for reference:
environment:
sdk: '>=2.0.0-dev.67.0 <3.0.0'
dependencies:
angular: ^5.0.0-beta
angular_components: ^0.9.0-beta
angular_forms: ^2.0.0-beta
angular_router: ^2.0.0-alpha+15
firebase: ^5.0.0
json_serializable: ^0.5.2
web3dart: ^0.3.0
dev_dependencies:
angular_test: ^2.0.0-beta
build_runner: ^0.9.0
build_test: ^0.10.2
build_web_compilers: ^0.4.0
sass_builder: ^2.0.0
test: ^1.0.0

Resources