Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Error : Because boilerplate depends on flutter_localizations any from sdk which depends on intl 0.17.0, intl 0.17.0 is required. #94

Closed
lakhbawa opened this issue Apr 27, 2021 · 6 comments

Comments

@lakhbawa
Copy link

Because boilerplate depends on flutter_localizations any from sdk which depends on intl 0.17.0, intl 0.17.0 is required.
So, because boilerplate depends on intl ^0.16.1, version solving failed.
pub get failed (1; So, because boilerplate depends on intl ^0.16.1, version solving failed.)

Things I Tried:
I changed the int version to .0.17.0 it then created another issue which says f_logs requires int version <0.17.0.

Pls fix asap, I am new to flutter

@masreplay
Copy link

please if u find how to run this project send me

@zubairehman
Copy link
Owner

Hi,

I have updated the DI library for this boilerplate template, please go through feature/null-safety branch for more details. Feel free to reach out to me if you find any issues.

Note: I will merge the changes into master as soon as I am done testing and implementing other features.

Thanks

@lakhbawa
Copy link
Author

Sure, Thanks a Lot, I am seeing these errors after updating the code. Pls check

error: Target of URI doesn't exist: 'package:boilerplate/di/components/injection.config.dart'. (uri_does_not_exist at [boilerplate] lib/di/components/injection.dart:1)
error: The function '$initGetIt' isn't defined. (undefined_function at [boilerplate] lib/di/components/injection.dart:9)
error: The class doesn't have a concrete implementation of the super-invoked member 'showError'. (mixin_application_no_concrete_super_invoked_member at [boilerplate] lib/stores/error/error_store.dart:7)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/error/error_store.g.dart:23)
error: The getter 'showError' isn't defined in a superclass of '_$ErrorStore'. (undefined_super_member at [boilerplate] lib/stores/error/error_store.g.dart:33)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/error/error_store.g.dart:39)
error: The setter 'showError' isn't defined in a superclass of '_$ErrorStore'. (undefined_super_member at [boilerplate] lib/stores/error/error_store.g.dart:40)
error: The class doesn't have a concrete implementation of the super-invoked member 'postsList'. (mixin_application_no_concrete_super_invoked_member at [boilerplate] lib/stores/form/form_store.dart:9)
error: A value of type 'Null' can't be assigned to a variable of type 'String'. (invalid_assignment at [boilerplate] lib/stores/form/form_store.dart:87)
error: A value of type 'Null' can't be assigned to a variable of type 'String'. (invalid_assignment at [boilerplate] lib/stores/form/form_store.dart:98)
error: A value of type 'Null' can't be assigned to a variable of type 'String'. (invalid_assignment at [boilerplate] lib/stores/form/form_store.dart:109)
error: '_$FormErrorStore.password=' ('void Function(String)') isn't a valid override of '_FormErrorStore.password=' ('void Function(String?)'). (invalid_override at [boilerplate] lib/stores/form/form_store.dart:158)
error: '_$FormErrorStore.userEmail=' ('void Function(String)') isn't a valid override of '_FormErrorStore.userEmail=' ('void Function(String?)'). (invalid_override at [boilerplate] lib/stores/form/form_store.dart:158)
error: '_$FormErrorStore.confirmPassword=' ('void Function(String)') isn't a valid override of '_FormErrorStore.confirmPassword=' ('void Function(String?)'). (invalid_override at [boilerplate] lib/stores/form/form_store.dart:158)
error: Non-nullable instance field '_$canLoginComputed' must be initialized. (not_initialized_non_nullable_instance_field at [boilerplate] lib/stores/form/form_store.g.dart:12)
error: Non-nullable instance field '_$canRegisterComputed' must be initialized. (not_initialized_non_nullable_instance_field at [boilerplate] lib/stores/form/form_store.g.dart:17)
error: Non-nullable instance field '_$canForgetPasswordComputed' must be initialized. (not_initialized_non_nullable_instance_field at [boilerplate] lib/stores/form/form_store.g.dart:22)
error: Undefined class 'PostsList'. (undefined_class at [boilerplate] lib/stores/form/form_store.g.dart:32)
error: The getter 'postsList' isn't defined in a superclass of '_$FormStore'. (undefined_super_member at [boilerplate] lib/stores/form/form_store.g.dart:34)
error: Undefined class 'PostsList'. (undefined_class at [boilerplate] lib/stores/form/form_store.g.dart:38)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/form/form_store.g.dart:40)
error: The setter 'postsList' isn't defined in a superclass of '_$FormStore'. (undefined_super_member at [boilerplate] lib/stores/form/form_store.g.dart:41)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/form/form_store.g.dart:56)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/form/form_store.g.dart:71)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/form/form_store.g.dart:87)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/form/form_store.g.dart:102)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/form/form_store.g.dart:117)
error: Non-nullable instance field '_$hasErrorsInLoginComputed' must be initialized. (not_initialized_non_nullable_instance_field at [boilerplate] lib/stores/form/form_store.g.dart:216)
error: Non-nullable instance field '_$hasErrorsInRegisterComputed' must be initialized. (not_initialized_non_nullable_instance_field at [boilerplate] lib/stores/form/form_store.g.dart:222)
error: Non-nullable instance field '_$hasErrorInForgotPasswordComputed' must be initialized. (not_initialized_non_nullable_instance_field at [boilerplate] lib/stores/form/form_store.g.dart:228)
error: A value of type 'String?' can't be returned from the function 'userEmail' because it has a return type of 'String'. (return_of_invalid_type at [boilerplate] lib/stores/form/form_store.g.dart:240)
error: '_$FormErrorStore.userEmail=' ('void Function(String)') isn't a valid override of '_FormErrorStore.userEmail=' ('void Function(String?)'). (invalid_override at [boilerplate] lib/stores/form/form_store.g.dart:244)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/form/form_store.g.dart:246)
error: A value of type 'String?' can't be returned from the function 'password' because it has a return type of 'String'. (return_of_invalid_type at [boilerplate] lib/stores/form/form_store.g.dart:256)
error: '_$FormErrorStore.password=' ('void Function(String)') isn't a valid override of '_FormErrorStore.password=' ('void Function(String?)'). (invalid_override at [boilerplate] lib/stores/form/form_store.g.dart:260)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/form/form_store.g.dart:261)
error: A value of type 'String?' can't be returned from the function 'confirmPassword' because it has a return type of 'String'. (return_of_invalid_type at [boilerplate] lib/stores/form/form_store.g.dart:271)
error: '_$FormErrorStore.confirmPassword=' ('void Function(String)') isn't a valid override of '_FormErrorStore.confirmPassword=' ('void Function(String?)'). (invalid_override at [boilerplate] lib/stores/form/form_store.g.dart:275)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/form/form_store.g.dart:277)
error: Target of URI hasn't been generated: 'language_store.g.dart'. (uri_has_not_been_generated at [boilerplate] lib/stores/language/language_store.dart:7)
error: The class doesn't have a concrete implementation of the super-invoked member 'postsList'. (mixin_application_no_concrete_super_invoked_member at [boilerplate] lib/stores/post/post_store.dart:11)
error: Undefined class 'PostsList'. (undefined_class at [boilerplate] lib/stores/post/post_store.g.dart:15)
error: The getter 'postsList' isn't defined in a superclass of '_$PostStore'. (undefined_super_member at [boilerplate] lib/stores/post/post_store.g.dart:17)
error: Undefined class 'PostsList'. (undefined_class at [boilerplate] lib/stores/post/post_store.g.dart:21)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/post/post_store.g.dart:23)
error: The setter 'postsList' isn't defined in a superclass of '_$PostStore'. (undefined_super_member at [boilerplate] lib/stores/post/post_store.g.dart:24)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/post/post_store.g.dart:38)
error: The method 'checkIfStateModificationsAreAllowed' isn't defined for the type 'ReactiveContext'. (undefined_method at [boilerplate] lib/stores/post/post_store.g.dart:53)
error: The setter 'loading' isn't defined in a superclass of '_$PostStore'. (undefined_super_member at [boilerplate] lib/stores/post/post_store.g.dart:54)
error: Target of URI hasn't been generated: 'theme_store.g.dart'. (uri_has_not_been_generated at [boilerplate] lib/stores/theme/theme_store.dart:7)
error: Target of URI hasn't been generated: 'user_store.g.dart'. (uri_has_not_been_generated at [boilerplate] lib/stores/user/user_store.dart:8)
warning: The left operand can't be null, so the right operand is never executed. (dead_null_aware_expression at [boilerplate] lib/stores/form/form_store.g.dart:16)
warning: The left operand can't be null, so the right operand is never executed. (dead_null_aware_expression at [boilerplate] lib/stores/form/form_store.g.dart:21)
warning: The left operand can't be null, so the right operand is never executed. (dead_null_aware_expression at [boilerplate] lib/stores/form/form_store.g.dart:26)
warning: The left operand can't be null, so the right operand is never executed. (dead_null_aware_expression at [boilerplate] lib/stores/form/form_store.g.dart:220)
warning: The left operand can't be null, so the right operand is never executed. (dead_null_aware_expression at [boilerplate] lib/stores/form/form_store.g.dart:226)
warning: The left operand can't be null, so the right operand is never executed. (dead_null_aware_expression at [boilerplate] lib/stores/form/form_store.g.dart:232)
info: 'await' applied to 'Database', which is not a 'Future'. (await_only_futures at [boilerplate] lib/data/local/datasources/post/post_datasource.dart:25)
info: 'await' applied to 'Database', which is not a 'Future'. (await_only_futures at [boilerplate] lib/data/local/datasources/post/post_datasource.dart:29)
info: 'await' applied to 'Database', which is not a 'Future'. (await_only_futures at [boilerplate] lib/data/local/datasources/post/post_datasource.dart:39)
info: 'await' applied to 'Database', which is not a 'Future'. (await_only_futures at [boilerplate] lib/data/local/datasources/post/post_datasource.dart:61)
info: 'await' applied to 'Database', which is not a 'Future'. (await_only_futures at [boilerplate] lib/data/local/datasources/post/post_datasource.dart:83)
info: 'await' applied to 'Database', which is not a 'Future'. (await_only_futures at [boilerplate] lib/data/local/datasources/post/post_datasource.dart:92)
info: 'await' applied to 'Database', which is not a 'Future'. (await_only_futures at [boilerplate] lib/data/local/datasources/post/post_datasource.dart:99)
info: The value of the field '_restClient' isn't used. (unused_field at [boilerplate] lib/data/network/apis/posts/post_api.dart:15)
info: The getter doesn't override an inherited getter. (override_on_non_overriding_member at [boilerplate] lib/stores/error/error_store.g.dart:31)
info: The setter doesn't override an inherited setter. (override_on_non_overriding_member at [boilerplate] lib/stores/error/error_store.g.dart:37)
info: The getter doesn't override an inherited getter. (override_on_non_overriding_member at [boilerplate] lib/stores/form/form_store.g.dart:32)
info: The setter doesn't override an inherited setter. (override_on_non_overriding_member at [boilerplate] lib/stores/form/form_store.g.dart:38)
info: The diagnostic 'lines_longer_than_80_chars' doesn't need to be ignored here because it's already being ignored. (duplicate_ignore at [boilerplate] lib/stores/form/form_store.g.dart:213)
info: The diagnostic 'unnecessary_lambdas' doesn't need to be ignored here because it's already being ignored. (duplicate_ignore at [boilerplate] lib/stores/form/form_store.g.dart:213)
info: The diagnostic 'prefer_expression_function_bodies' doesn't need to be ignored here because it's already being ignored. (duplicate_ignore at [boilerplate] lib/stores/form/form_store.g.dart:213)
info: The diagnostic 'non_constant_identifier_names' doesn't need to be ignored here because it's already being ignored. (duplicate_ignore at [boilerplate] lib/stores/form/form_store.g.dart:213)
info: The value of the field 'TAG' isn't used. (unused_field at [boilerplate] lib/stores/language/language_store.dart:13)
info: The method doesn't override an inherited method. (override_on_non_overriding_member at [boilerplate] lib/stores/language/language_store.dart:82)
info: The getter doesn't override an inherited getter. (override_on_non_overriding_member at [boilerplate] lib/stores/post/post_store.g.dart:15)
info: The setter doesn't override an inherited setter. (override_on_non_overriding_member at [boilerplate] lib/stores/post/post_store.g.dart:21)
info: The setter doesn't override an inherited setter. (override_on_non_overriding_member at [boilerplate] lib/stores/post/post_store.g.dart:52)
info: Name non-constant identifiers using lowerCamelCase. (non_constant_identifier_names at [boilerplate] lib/stores/theme/theme_store.dart:13)
info: The method doesn't override an inherited method. (override_on_non_overriding_member at [boilerplate] lib/stores/theme/theme_store.dart:52)
info: 'title' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is headline6. This feature was deprecated after v1.13.8.. (deprecated_member_use at [boilerplate] lib/ui/home/home.dart:157)
info: 'FlatButton' is deprecated and shouldn't be used. Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). This feature was deprecated after v1.25.0-8.1.pre.. (deprecated_member_use at [boilerplate] lib/ui/login/login.dart:175)
info: 'FlatButton' is deprecated and shouldn't be used. Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). This feature was deprecated after v1.25.0-8.1.pre.. (deprecated_member_use at [boilerplate] lib/widgets/rounded_button_widget.dart:19)

@zubairehman
Copy link
Owner

Please go through the readme on how to run this boilerplate project. Thanks

@lakhbawa
Copy link
Author

Please go through the readme on how to run this boilerplate project. Thanks

Thanks a lot, it did work.

Just need a little clarification regarding this. Do we have to keep flutter packages pub run build_runner watch running all the time, we code. Or its Just one time process?

Step 3:

This project uses inject library that works with code generation, execute the following command to generate files:

flutter packages pub run build_runner build --delete-conflicting-outputs
or watch command in order to keep the source code synced automatically:

flutter packages pub run build_runner watch

@lakhbawa
Copy link
Author

Running flutter packages pub run build_runner watch gives following error.

[INFO] Terminating. No further builds will be scheduled



You have hit a bug in build_runner
Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues


Null check operator used on a null value
package:build_runner/src/generate/watch_impl.dart 189:40  WatchImpl.reader
package:build_runner/src/server/server.dart 50:55         createServeHandler.<fn>
package:build_runner/src/server/server.dart 49:20         createServeHandler.<fn>

pub finished with exit code 1

however flutter packages pub run build_runner build --delete-conflicting-outputs works okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants