Giter Site home page Giter Site logo

fikretsengul / flutter_advanced_boilerplate Goto Github PK

View Code? Open in Web Editor NEW
362.0 362.0 57.0 21.27 MB

A new advanced flutter boilerplate project uses BLoC.

License: MIT License

Kotlin 0.07% Ruby 1.55% Swift 0.19% Objective-C 0.02% Dart 96.47% HTML 1.21% JavaScript 0.09% CSS 0.41%

flutter_advanced_boilerplate's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_advanced_boilerplate's Issues

`strings.g.dart` not being generated

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.

'GraphQLWebSocketChannel' is missing implementations

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

AuthCubit close when app still using

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.

FlutterSecureStorage is not registered inside GetIt

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?))

Theme is Persisted on Disk

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.

FAILURE: Build failed with an exception.

I like it! :)
Minor issue:
FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\Develop\Flutter\Playground\Boilerplates\flutter_advanced_boilerplate-main\android\app\build.gradle' line:
    29
    AND
  • Where:
    Build file 'C:\Develop\Flutter\Playground\Boilerplates\flutter_advanced_boilerplate-main\android\app\build.gradle' line:
    50

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!

API and GraphQL requests using login auth token be default

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?

Sample project using the boilerplate

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.

Build Failure

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

Can't display single item by pk

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 screen file
Screenshot 2023-03-29 at 11 26 16

This is my bloc with the request
Screenshot 2023-03-29 at 11 26 33

This is the generated Graphql request
Screenshot 2023-03-29 at 11 27 11

They are the logs and never pass on the loaded state but into the dev tools network the data are good
Screenshot 2023-03-29 at 11 58 55

It seem there is an error with the parseData

Can you help and tell me what I have missed?

Best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.