jeremiahlukus / flutter_template Goto Github PK
View Code? Open in Web Editor NEWtemplate with tests, login flow, riverpod, logging ect.
License: MIT License
template with tests, login flow, riverpod, logging ect.
License: MIT License
important web isn't supported yet, since the web view plug-in used for auth doesnt support web I should get to this early August
Hi @jeremiahlukus , any update on this ?
I found your repo while searching for very_good + riverpod. Thanks for making it :)
But now that mason is out, I'm wondering if we shouldn't use bricks instead ?
First, I love the template! Very nice work.
Second, I'm sorry if I didn't follow instructions properly. I didn't understand this instruction from the README: Setup your backend to login a user.
I'm trying to run the template using the launch configuration in VSCode (ie. not using Docker). It launches on chrome by default, which is what I want.
I'm running on Ubuntu 20.04 but I don't think that should matter. Anyway, my flutter doctor output is included below.
The splash screen and sign in page load just fine.
Unfortunately, when I click the Sign in
button I get the following exception:
Launching lib/main_development.dart on Chrome in debug mode...
lib/main_development.dart:1
This app is linked to the debug service: ws://127.0.0.1:39817/daVhbIDNFFs=/ws
Debug service listening on ws://127.0.0.1:39817/daVhbIDNFFs=/ws
๐ช Running with sound null safety ๐ช
Connecting to VM Service at ws://127.0.0.1:39817/daVhbIDNFFs=/ws
Flutter Web Bootstrap: Auto
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ #0 packages/flutter_template/core/infrastructure/provider_logger.dart 48:21 didUpdateProvider
โ #1 packages/riverpod/src/framework/container.dart 48:7 _runQuaternaryGuarded
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ก {
โ ๐ก "didUpdateProvider": {
โ ๐ก "type": "StateNotifierProvider<AuthNotifier, AuthState>",
โ ๐ก "new_value": "AuthState.unauthenticated()",
โ ๐ก "old_value": "AuthState.initial()"
โ ๐ก }
โ ๐ก }
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ #0 packages/flutter_template/core/infrastructure/provider_logger.dart 48:21 didUpdateProvider
โ #1 packages/riverpod/src/framework/container.dart 48:7 _runQuaternaryGuarded
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ก {
โ ๐ก "didUpdateProvider": {
โ ๐ก "type": "FutureProvider<Unit>",
โ ๐ก "new_value": "AsyncData<Unit>(value: ())",
โ ๐ก "old_value": "AsyncLoading<Unit>()"
โ ๐ก }
โ ๐ก }
Error: Unsupported operation: Platform._operatingSystem
at Object.throw_ [as throw] (http://localhost:37881/dart_sdk.js:5080:11)
at _Platform._operatingSystem (http://localhost:37881/dart_sdk.js:57539:17)
at get operatingSystem [as operatingSystem] (http://localhost:37881/dart_sdk.js:57585:27)
at get _operatingSystem (http://localhost:37881/dart_sdk.js:57498:27)
at desc.get [as _operatingSystem] (http://localhost:37881/dart_sdk.js:5565:17)
at get operatingSystem [as operatingSystem] (http://localhost:37881/dart_sdk.js:57449:26)
at get operatingSystem [as operatingSystem] (http://localhost:37881/packages/platform/src/interface/local_platform.dart.lib.js:25:26)
at get isAndroid [as isAndroid] (http://localhost:37881/packages/platform/src/interface/platform.dart.lib.js:43:19)
at WebAppAuthenticator.authorizationEndpoint (http://localhost:37881/packages/flutter_template/auth/infrastructure/webapp_authenticator.dart.lib.js:86:79)
at webapp_authenticator.WebAppAuthenticator.new.getAuthorizationUrl (http://localhost:37881/packages/flutter_template/auth/infrastructure/webapp_authenticator.dart.lib.js:150:55)
at auth_notifier.AuthNotifier.new.signIn (http://localhost:37881/packages/flutter_template/auth/notifiers/auth_notifier.dart.lib.js:194:78)
at signIn.next (<anonymous>)
at runBody (http://localhost:37881/dart_sdk.js:40660:34)
at Object._async [as async] (http://localhost:37881/dart_sdk.js:40691:7)
at auth_notifier.AuthNotifier.new.signIn (http://localhost:37881/packages/flutter_template/auth/notifiers/auth_notifier.dart.lib.js:193:20)
at http://localhost:37881/packages/flutter_template/auth/presentation/sign_in_page.dart.lib.js:399:103
at [_handleTap] (http://localhost:37881/packages/flutter/src/material/icon_button.dart.lib.js:42254:31)
at tap.TapGestureRecognizer.new.invokeCallback (http://localhost:37881/packages/flutter/src/gestures/recognizer.dart.lib.js:198:18)
at tap.TapGestureRecognizer.new.handleTapUp (http://localhost:37881/packages/flutter/src/gestures/tap.dart.lib.js:411:42)
at [_checkUp] (http://localhost:37881/packages/flutter/src/gestures/tap.dart.lib.js:217:12)
at tap.TapGestureRecognizer.new.handlePrimaryPointer (http://localhost:37881/packages/flutter/src/gestures/tap.dart.lib.js:166:23)
at tap.TapGestureRecognizer.new.handleEvent (http://localhost:37881/packages/flutter/src/gestures/recognizer.dart.lib.js:444:16)
at [_dispatch] (http://localhost:37881/packages/flutter/src/gestures/pointer_router.dart.lib.js:86:9)
at http://localhost:37881/packages/flutter/src/gestures/pointer_router.dart.lib.js:112:26
at LinkedMap.new.forEach (http://localhost:37881/dart_sdk.js:27745:11)
at [_dispatchEventToRoutes] (http://localhost:37881/packages/flutter/src/gestures/pointer_router.dart.lib.js:110:29)
at pointer_router.PointerRouter.new.route (http://localhost:37881/packages/flutter/src/gestures/pointer_router.dart.lib.js:105:37)
at binding$5.WidgetsFlutterBinding.new.handleEvent (http://localhost:37881/packages/flutter/src/gestures/binding.dart.lib.js:367:26)
at binding$5.WidgetsFlutterBinding.new.dispatchEvent (http://localhost:37881/packages/flutter/src/gestures/binding.dart.lib.js:355:24)
at binding$5.WidgetsFlutterBinding.new.dispatchEvent (http://localhost:37881/packages/flutter/src/rendering/layer.dart.lib.js:5440:13)
at [_handlePointerEventImmediately] (http://localhost:37881/packages/flutter/src/gestures/binding.dart.lib.js:331:14)
at binding$5.WidgetsFlutterBinding.new.handlePointerEvent (http://localhost:37881/packages/flutter/src/gestures/binding.dart.lib.js:305:43)
at [_flushPointerEventQueue] (http://localhost:37881/packages/flutter/src/gestures/binding.dart.lib.js:295:14)
at [_handlePointerDataPacket] (http://localhost:37881/packages/flutter/src/gestures/binding.dart.lib.js:286:54)
at Object.invoke1 (http://localhost:37881/dart_sdk.js:191747:7)
at _engine.EnginePlatformDispatcher.__.invokeOnPointerDataPacket (http://localhost:37881/dart_sdk.js:171943:15)
at [_onPointerData] (http://localhost:37881/dart_sdk.js:172879:49)
at http://localhost:37881/dart_sdk.js:173317:28
at http://localhost:37881/dart_sdk.js:173273:16
at loggedHandler (http://localhost:37881/dart_sdk.js:172978:11)
Here's my flutter doctor output:
> flutter doctor -v
[โ] Flutter (Channel stable, 3.0.5, on Ubuntu 20.04.4 LTS
5.15.0-41-generic, locale en_CA.UTF-8)
โข Flutter version 3.0.5 at /home/gj/snap/flutter/common/flutter
โข Upstream repository https://github.com/flutter/flutter.git
โข Framework revision f1875d570e (3 weeks ago), 2022-07-13 11:24:16
-0700
โข Engine revision e85ea0e79c
โข Dart version 2.17.6
โข DevTools version 2.12.2
[โ] Android toolchain - develop for Android devices (Android SDK version
30.0.2)
โข Android SDK at /home/gj/Android/Sdk
โข Platform android-30, build-tools 30.0.2
โข ANDROID_HOME = /home/gj/Android/Sdk
โข Java binary at: /opt/android-studio-4.0/android-studio/jre/bin/java
โข Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
โข All Android licenses accepted.
[โ] Chrome - develop for the web
โข CHROME_EXECUTABLE = /usr/bin/google-chrome
[โ] Linux toolchain - develop for Linux desktop
โข clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
โข cmake version 3.10.2
โข ninja version 1.8.2
โข pkg-config version 0.29.1
[โ] Android Studio (version 4.0)
โข Android Studio at /opt/android-studio-4.0/android-studio
โข Flutter plugin version 51.0.1
โข Dart plugin version 193.7547
โข Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
[โ] Android Studio
โข Android Studio at /opt/android-studio
โข Flutter plugin can be installed from:
๐จ https://plugins.jetbrains.com/plugin/9212-flutter
โข Dart plugin can be installed from:
๐จ https://plugins.jetbrains.com/plugin/6351-dart
โข Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
[โ] Android Studio
โข Android Studio at /home/gj/android-studio
โข Flutter plugin can be installed from:
๐จ https://plugins.jetbrains.com/plugin/9212-flutter
โข Dart plugin can be installed from:
๐จ https://plugins.jetbrains.com/plugin/6351-dart
โข Java version OpenJDK Runtime Environment (build
11.0.10+0-b96-7249189)
[โ] VS Code (version 1.69.2)
โข VS Code at /usr/share/code
โข Flutter extension version 3.44.0
[โ] Connected device (2 available)
โข Linux (desktop) โข linux โข linux-x64 โข Ubuntu 20.04.4 LTS
5.15.0-41-generic
โข Chrome (web) โข chrome โข web-javascript โข Google Chrome
103.0.5060.134
[โ] HTTP Host Availability
โข All required HTTP hosts are available
โข No issues found!
Thanks for reading! Any help would be greatly appreciated!
Me again :P
NOTE: running directly from VSCode, not through Docker.
I'm running on an android emulator (Pixel 2 - API 25), and I'm getting the following error when I click the sign in
button:
Here's the log output:
Launching lib/main_development.dart on Android SDK built for x86 in debug mode...
lib/main_development.dart:1
โ Built build/app/outputs/flutter-apk/app-development-debug.apk.
W/FlutterActivityAndFragmentDelegate( 7255): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
Connecting to VM Service at ws://127.0.0.1:37045/5-1YxSY8wrM=/ws
D/NetworkSecurityConfig( 7255): No Network Security Config specified, using platform default
D/skia ( 7255): Shader compilation error
D/skia ( 7255): ------------------------
D/skia ( 7255): Errors:
D/skia ( 7255): link failed but did not provide an info log
2
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008741
D/skia ( 7255): Shader compilation error
D/skia ( 7255): ------------------------
D/skia ( 7255): Errors:
D/skia ( 7255): link failed but did not provide an info log
2
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008741
D/EGL_emulation( 7255): eglCreateContext: 0x9e7ab1e0: maj 3 min 0 rcv 3
D/EGL_emulation( 7255): eglMakeCurrent: 0x9e7ab1e0: ver 3 0 (tinfo 0x8c17d250)
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008824
I/VideoCapabilities( 7255): Unsupported profile 4 for video/mp4v-es
D/EGL_emulation( 7255): eglCreateContext: 0x9e7acd40: maj 3 min 0 rcv 3
D/EGL_emulation( 7255): eglMakeCurrent: 0x9e7acd40: ver 3 0 (tinfo 0x8c17d250)
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008824
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008a34
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008073
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x000088ff
3
W/cr_BindingManager( 7255): Cannot call determinedVisibility() - never saw a connection for the pid: 7255
W/art ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
flutter doctor output:
> flutter doctor -v
[โ] Flutter (Channel stable, 3.0.5, on Ubuntu 20.04.4 LTS
5.15.0-41-generic, locale en_CA.UTF-8)
โข Flutter version 3.0.5 at /home/gj/snap/flutter/common/flutter
โข Upstream repository https://github.com/flutter/flutter.git
โข Framework revision f1875d570e (3 weeks ago), 2022-07-13 11:24:16
-0700
โข Engine revision e85ea0e79c
โข Dart version 2.17.6
โข DevTools version 2.12.2
[โ] Android toolchain - develop for Android devices (Android SDK version
32.0.0)
โข Android SDK at /home/gj/Android/Sdk
โข Platform android-31, build-tools 32.0.0
โข ANDROID_HOME = /home/gj/Android/Sdk
โข Java binary at: /opt/android-studio-4.0/android-studio/jre/bin/java
โข Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
โข All Android licenses accepted.
[โ] Chrome - develop for the web
โข CHROME_EXECUTABLE = /usr/bin/google-chrome
[โ] Linux toolchain - develop for Linux desktop
โข clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
โข cmake version 3.10.2
โข ninja version 1.8.2
โข pkg-config version 0.29.1
[โ] Android Studio (version 4.0)
โข Android Studio at /opt/android-studio-4.0/android-studio
โข Flutter plugin version 51.0.1
โข Dart plugin version 193.7547
โข Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
[โ] Android Studio
โข Android Studio at /opt/android-studio
โข Flutter plugin can be installed from:
๐จ https://plugins.jetbrains.com/plugin/9212-flutter
โข Dart plugin can be installed from:
๐จ https://plugins.jetbrains.com/plugin/6351-dart
โข Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
[โ] Android Studio
โข Android Studio at /home/gj/android-studio
โข Flutter plugin can be installed from:
๐จ https://plugins.jetbrains.com/plugin/9212-flutter
โข Dart plugin can be installed from:
๐จ https://plugins.jetbrains.com/plugin/6351-dart
โข Java version OpenJDK Runtime Environment (build
11.0.10+0-b96-7249189)
[โ] VS Code (version 1.69.2)
โข VS Code at /usr/share/code
โข Flutter extension version 3.44.0
[โ] Connected device (3 available)
โข Android SDK built for x86 (mobile) โข emulator-5554 โข android-x86 โข
Android 7.1.1 (API 25) (emulator)
โข Linux (desktop) โข linux โข linux-x64 โข
Ubuntu 20.04.4 LTS 5.15.0-41-generic
โข Chrome (web) โข chrome โข web-javascript โข
Google Chrome 103.0.5060.134
[โ] HTTP Host Availability
โข All required HTTP hosts are available
โข No issues found!
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.