fikretsengul / flutter_advanced_boilerplate Goto Github PK
View Code? Open in Web Editor NEWA new advanced flutter boilerplate project uses BLoC.
License: MIT License
A new advanced flutter boilerplate project uses BLoC.
License: MIT License
I cloned the repo and followed the instructions, but package:flutter_advanced_boilerplate/i18n/strings.g.dart
is still not being generated even though I ran flutter packages pub run build_runner build -d
. So I can't run the app at all.
Hi,
I have the following issue when I run 'flutter test --update-goldens', same happens when I do "flutter run"
00:07 +0: loading ...\flutter_project\test\features\auth\login\bloc\login_screen_bloc_test.dart
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/graphql-5.1.1/lib/src/links/websocket_link/websocket_client.dart:470:7: Error: The non-abstract class 'GraphQLWebSocketChannel' is missing implementations for these
members:
- WebSocketChannel.ready
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class GraphQLWebSocketChannel extends StreamChannelMixin<dynamic>
^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-2.3.0/lib/src/channel.dart:56:22: Context: 'WebSocketChannel.ready' is defined here.
final Future<void> ready = Future.value();
Flutter doctor result :
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.10, on Microsoft Windows [version 10.0.22000.1455], locale fr-FR)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.11)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.74.3)
[√] Connected device (3 available)
[√] HTTP Host Availability
When users log in successfully, AuthCubit automatically closes. Then if the user presses the logout icon button, then we have the error: Bad state: Cannot emit new states after calling close. I wonder if there are any problems with the auto_route package.
Exception has occurred.
_AssertionError ('package:get_it/get_it_impl.dart': Failed assertion: line 372 pos 7: 'instanceFactory != null': Object/factory with type FlutterSecureStorage is not registered inside GetIt.
(Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance;
Did you forget to register it?))
The AppState
class contains the app theme and is used in AppCubit
, which is a HydratedCubit
. This causes the theme to be persisted into the hydrated storage.
This means that after the application is run for the first time, it's not possible to adjust the theme any more, because it's loaded from disk rather than using the new definition.
This would be fine for development (just rm ~/Documents/hydrated_box.*
to reset the state), but this would also stop app updates from changing the theme on the users' computers, which is bad.
I like it! :)
Minor issue:
FAILURE: Build failed with an exception.
Fixed by adding (in my instance) the following two lines to flutter_advanced_boilerplate\android\local.properties:
flutter.compileSdkVersion=33
flutter.minSdkVersion=26
Please add to "How To Use" section.
Thank you for this!
Android studio & vscode is not analyzing this project probably they cannot find the start and the end of any widget and they cannot reveal the source of any object or widget when I press cmd and click on a specific object
would be good if this boilerplate includes permission handling
Troubleshooting why an API request I was making was failing and firing a 401 unauthorised error, when the API allows anonymous requests. Turns out it's reusing the token from the login.
Should authorisation and tokens be abstracted and assignable further down the chain? It would make more sense to me having the option in rest-api-page/networking.
Or is this part of the ideology, in which case I should duplicate modules/dio for each type of request?
I'm new to opinionated boilerplates but from work in parallel fields I can see I'll benefit greatly from such structure in the future.
Could you provide a sample app? I'd like to see how to structure an app that takes advantage of (and doesn't butcher) the segmentation provided by the boilerplate.
Edit: Unless it's meant to be a functional app as is - the code looks like it should at least have a few pages, but all I get after following the instructions and firing it up on Chrome I get stuck on the splash screen.
A little issue - using Chrome - after entering the username if you hit tab once it will select the password field (slight change of colour) but you need to hit tab again for it to actually give you a text interface.
first of all thank you for this awesome boilerplate.
In relation with graphql subscription, has this boilerplate tested to work with subscription-transport-ws?
please upgrade the project and packages dependency
I am getting an error when running flutter run
❯ flutter run
Launching lib\main.dart on SM M215F in debug mode...
FAILURE: Build failed with an exception.
* Where:
Build file 'E:\Projects\app\android\app\build.gradle' line: 29
* What went wrong:
A problem occurred evaluating project ':app'.
> Cannot invoke method toInteger() on null object
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
Running Gradle task 'assembleDebug'... 2,481ms
Exception: Gradle task assembleDebug failed with exit code 1
Hello,
I am a beginner in development on Dart and I would like to know how to pass a variable to my block to make a request on it.
In this screenshot, my ID is hard coded and I would like to get my variable "eventId" from my screen
Can you help me? @fikretsengul
Best regards,
I don't think that this expression can ever be true:
Hello,
I'm requesting my events app to get only one event by id. But I don't know why the request return the data but never passed to the loaded state and I have only the circular progress indicator display.
This is my bloc with the request
This is the generated Graphql request
They are the logs and never pass on the loaded state but into the dev tools network the data are good
It seem there is an error with the parseData
Can you help and tell me what I have missed?
Best regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.