GithubHelp home page GithubHelp logo

simpleboilerplates / flutter Goto Github PK

View Code? Open in Web Editor NEW
551.0 551.0 101.0 2.11 MB

A boilerplate project for Flutter using RiverPod, Dio, go_router, Freezed and generated with very_good_cli

License: MIT License

Kotlin 0.09% Ruby 0.82% Swift 0.24% Objective-C 0.02% Dart 94.64% HTML 2.40% Makefile 1.79%
android bloc bloc-pattern dart dio flutter flutter-apps flutter-examples freezed ios riverpod rxdart

flutter's People

Contributors

levingermann avatar sadmansamee avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter's Issues

Project Structure or folders/files are not consistency

Like:
lib
--app
--state
*** app_start_state.dart
--feature
--auth
--model
*** auth_state.dart
--feature
--home
--state
*** books_state.dart
***home_state.dart

I am trying to learn Riverpod and code structure but those got me confused.

Thanks for your time.

Cheers

index.html wrong src

in web/index.html the line
<script src="app.dart.js" type="application/javascript"></script>
has to be changed to
<script src="main.dart.js" type="application/javascript"></script>

Very minor grammar issue in readme.md

at a very quick skim 'Avoid writing scripts with Derry' sounds like you suggest avoiding derry itself.

Suggest changing to something like 'Use Derry to avoid writing your own scripts' or similar

Failed to compile application.

[flutter_starter](master)$ flutter run --flavor development --target lib/main_development.dart -d chrome
Running "flutter pub get" in flutter_starter...                    15.0s
Launching lib/main_development.dart on Chrome in debug mode...
Error: unable to find directory entry in pubspec.yaml:
/Users/bartonhammond/bible/code/flutter_starter/assets/image/
../../../.pub-cache/hosted/pub.dartlang.org/auto_route-3.1.3/lib/src/router/prov
ider/auto_route_information_provider.dart:28:8: Error: The method
'AutoRouteInformationProvider.routerReportsNewRouteInformation' doesn't have the
named parameter 'type' of overridden method
'RouteInformationProvider.routerReportsNewRouteInformation'.
  void routerReportsNewRouteInformation(RouteInformation routeInformation,
       ^
../../../tools/flutter/packages/flutter/lib/src/widgets/router.dart:1329:8:
Context: This is the overridden method ('routerReportsNewRouteInformation').
  void routerReportsNewRouteInformation(RouteInformation routeInformation,
  {required RouteInformationReportingType type}) {}
       ^
../../../.pub-cache/hosted/pub.dartlang.org/auto_route-3.1.3/lib/src/router/cont
roller/auto_router_delegate.dart:26:43: Error: Required named parameter 'type'
must be provided.
        ?.routerReportsNewRouteInformation(
                                          ^
Waiting for connection from debug service on Chrome...             25.3s
Failed to compile application.

Add more pages to the app.

Hi. Im new to AutoRoute, I cant figure out how to make more pages with this boilerplate.
So I made something liek this.

@AdaptiveAutoRouter(
  replaceInRouteName: 'Page,Route',
  routes: <AutoRoute>[
    //RedirectRoute(path: '*', redirectTo: '/'),
    AutoRoute(page: AppStartPage, initial: true),
    AutoRoute(
      path: '/home',
      page: HomePage,
      children: <AutoRoute>[
        AutoRoute<FieldInfoPage>(
          name: 'FieldInfoRoute',
          path: 'fieldInfo',
          page: FieldInfoPage,
        ),
      ],
    ),
    signInRouter,
    signUpRouter,
  ],
)

But the problem here is that after flutters "hot reload" it triggers the AppStartPage, and opens the HomePage again.

How do I make it so it doesn't open HomePage everytime it reloads?

( derry watch ) Can not generate freezed classes

In Terminal : derry clean
In Terminal : derry watch

[email protected]+1 watch
$ flutter pub run build_runner watch --delete-conflicting-outputs

Unhandled exception:
Bad state: Unable to generate package graph, no .../Flutter-master/.dart_tool/flutter_gen/pubspec.yaml found.
#0 _pubspecForPath (package:build_runner_core/src/package_graph/package_graph.dart:232:5)
#1 _parsePackageDependencies (package:build_runner_core/src/package_graph/package_graph.dart:206:21)
#2 PackageGraph.forPath (package:build_runner_core/src/package_graph/package_graph.dart:101:33)

#3 main (file:///Users/.pub-cache/hosted/pub.dev/build_runner-2.3.3/bin/build_runner.dart:27:30)

//------------------------------------------------
I'm Using

derry --version === 1.5

flutter --version
'Flutter 3.7.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision c07f788888 (3 months ago) • 2023-02-22 17:52:33 -0600
Engine • revision 0f359063c4
Tools • Dart 2.19.2 • DevTools 2.20.1

Unable to make playstore build .aab file

Flutter Biolerplate project

Tried using different commands:
flutter build appbundle --release --flavor production -t lib/main_production.dart
flutter build appbundle --flavor production -t lib/main_production.dart

but Playstore showing
You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode.

Also
// buildTypes {
// release {
// signingConfig signingConfigs.release
// minifyEnabled true
// useProguard true
// proguardFiles getDefaultProguardFile('proguard-android.txt')
// }
// debug {
// signingConfig signingConfigs.debug
// }
// }

giving issue when project built.

Need solution, with which i can have playstore build ready asap.

Thanks for this - I think HomeState is unnecessary bcoz (HomeState.loggedOut() can fit in to AuthState

Thanks for this Boilerplate ,i am currently using it on app that will soon go to production .

I think HomeState is unnecessary bcoz (HomeState.loggedOut() can fit in to AuthState.

@freezed
class AuthState with _$AuthState {
const factory AuthState.initial() = _Initial;
const factory AuthState.loading() = _Loading;
const factory AuthState.loggedIn() = _LoggedIn;
const factory AuthState.loggedOut() = _LoggedOut;
const factory AuthState.error(AppException error) = _Error;
}

Cheers

Dio client is not working in web

The signup and sign in requests work fine on Android virtual device. But no trace of requests when run in chrome browser.

Any insight will be helpful.

Tests

Thanks for this project, but I would expect a boilerplate project to have at least a few simple tests. Why not add a few?

flutter pub get doesn't work

[flutter-boilerpplate] flutter pub get
Running "flutter pub get" in flutter-boilerpplate...
Because boilerplate depends on intl ^0.17.0 which doesn't match any versions, version solving failed.
pub get failed (1; Because boilerplate depends on intl ^0.17.0 which doesn't match any versions, version solving failed.)
exit code 1

dependency_overrides:
  intl: any

solved it with the above dependency but can we have an updated version of the boilerplate on v2?


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.

can't get the boilerplate code to run #51220

Steps to Reproduce

literally just running the project in here
https://github.com/SimpleBoilerplates/Flutter
Expected results:
not to crash. I have already ran flutter doctor and flutter pub get, and here are those outputs
flutter.bat doctor --verbose
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.657], locale en-US)
• Flutter version 1.12.13+hotfix.8 at C:\Users\sqandil\Downloads\flutter_windows_v1.12.13+hotfix.8-stable\src\flutter
• Framework revision 0b8abb4 (10 days ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\sqandil\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.

[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.42.1)
• VS Code at C:\Users\sqandil\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.8.1

[√] Connected device (1 available)
• SM A105G • RR8M60E8ZQH • android-arm • Android 9 (API 28)

• No issues found!
Process finished with exit code 0

and here is the flutter pub get

--no-color packages get
Running "flutter pub get" in HandAppPrototype... 1.0s
Process finished with exit code 0

Actual results:

I/flutter (24244): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ I/flutter (24244): The following assertion was thrown building MyApp: I/flutter (24244): MediaQuery.of() called with a context that does not contain a MediaQuery. I/flutter (24244): No MediaQuery ancestor could be found starting from the context that was passed to MediaQuery.of(). I/flutter (24244): This can happen because you do not have a WidgetsApp or MaterialApp widget (those widgets introduce I/flutter (24244): a MediaQuery), or it can happen if the context you use comes from a widget above those widgets. I/flutter (24244): The context used was: I/flutter (24244): Scaffold I/flutter (24244): I/flutter (24244): The relevant error-causing widget was: I/flutter (24244): MyApp file:///C:/Users/sqandil/AndroidStudioProjects/handapp/lib/main.dart:13:10 I/flutter (24244): I/flutter (24244): When the exception was thrown, this was the stack: I/flutter (24244): #0 MediaQuery.of (package:flutter/src/widgets/media_query.dart:799:5) I/flutter (24244): #1 ScaffoldState.didChangeDependencies (package:flutter/src/material/scaffold.dart:2094:50) I/flutter (24244): #2 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4482:12) I/flutter (24244): #3 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4307:5) I/flutter (24244): #4 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3297:14) I/flutter (24244): #5 Element.updateChild (package:flutter/src/widgets/framework.dart:3091:12) I/flutter (24244): #6 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4349:16) I/flutter (24244): #7 Element.rebuild (package:flutter/src/widgets/framework.dart:4053:5) I/flutter (24244): #8 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4312:5) I/flutter (24244): #9 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4307:5) I/flutter (24244): #10 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3297:14) I/flutter (24244): #11 Element.updateChild (package:flutter/src/widgets/framework.dart:3091:12) I/flutter (24244): #12 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1054:16) I/flutter (24244): #13 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1025:5) I/flutter (24244): #14 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:968:17) I/flutter (24244): #15 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2512:19) I/flutter (24244): #16 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:967:13) I/flutter (24244): #17 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:848:7) I/flutter (24244): #18 WidgetsBinding.scheduleAttachRootWidget. (package:flutter/src/widgets/binding.dart:830:7) I/flutter (24244): #27 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19) I/flutter (24244): #28 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5) I/flutter (24244): #29 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12) I/flutter (24244): (elided 8 frames from package dart:async and package dart:async-patch) I/flutter (24244): I/flutter (24244): ════════════════════════════════════════════════════════════════════════════════════════════════════ I/flutter (24303): AppStarted I/flutter (24303): Transition { currentState: AuthenticationUninitialized, event: AppStarted, nextState: AuthenticationUnauthenticated }

Feature request for ChangeNotifierProvider

This flutter template only shows how to work with StateNotifierProvider where the state is a model.
What is an example of when to use ChangeNotifierProvider and can we include it in this boilerplate?

I am willing to do a PR here.

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.