Skip to content

Instantly share code, notes, and snippets.

View aduquet's full-sized avatar
👩‍💻
Focusing

Aleja Duque-Torres aduquet

👩‍💻
Focusing
View GitHub Profile
@aduquet
aduquet / read json file with flutter
Created March 27, 2022 11:52
I got an exceotion with 'type 'Null' is not a subtype of type 'String' ' in flutter
I got an exceotion with 'type 'Null' is not a subtype of type 'String' ' in flutter
════════ Exception caught by widgets library ═══════════════════════════════════
type 'Null' is not a subtype of type 'String'
════════════════════════════════════════════════════════════════════════════════
The problem was that my json file has some interger. then, I just fixed my json file with all strings :D and done!
@aduquet
aduquet / No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase
Last active April 11, 2022 04:47
No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase
I had this problem, working with flutter and firebase
"No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase"
What I did to solve it was:
1. update firebase_core in the pubspec.yaml
2. I force the firebase to initialize before proceed whit this two lines
@aduquet
aduquet / SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR
Last active April 26, 2022 12:07
PIT error with IntelliJ IDE: 11:44:54 AM PIT >> SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR Exception in thread "main" org.pitest.util.PitError: Coverage generation minion exited abnormally!
I got this error:
C:\Users\duquet\.jdks\openjdk-15.0.1\bin\java.exe "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\pitest-junit5-plugin-0.15.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\xpp3_min-1.1.4c.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\xmlpull-1.1.3.1.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\xstream-1.4.8.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\pitest-entry-1.7.4.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\pitest-command-line-1.7.4.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\pitest-1.7.4.jar;C:\User
@aduquet
aduquet / dart
Created June 21, 2022 19:32
Async data on InitState method - dart/flutter
I was struggling in finding a way to load async data on Initial State method
I found the answer here: https://stackoverflow.com/questions/51901002/is-there-a-way-to-load-async-data-on-initstate-method
This is my concrete example
setInitialValueQuestionReview() async {
late DocumentReference<Map<String, dynamic>> testAnwDB = FirebaseFirestore
.instance
.collection('AppUsers')
@aduquet
aduquet / Build grade failure after Flutter update
Created September 29, 2022 14:58
Build grade failure after Flutter update
I was getting this error after updateing dart and flutter project
android:exported needs to be explicitly specified for element
<activity#androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity>.
Apps targeting Android 12 and higher are required to specify an explicit value for android:exported
when the corresponding component has an intent filter defined.
See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
FAILURE: Build failed with an exception.
After searching and trying many things, adding these other activities solved the problem:
@aduquet
aduquet / problems updating app-release.aab
Created October 31, 2022 21:51
keep getting this message in the play store Version code 1 has already been used. Try another version code
I got this solve by changing the versionCode Does not admit floats, and the versionName, I have not try modifying one a let the other tho
defaultConfig {
applicationId "your.applicationId"
minSdkVersion 23
targetSdkVersion 30
versionCode 1 // Change to a higher number
versionName "1.0.1" // Change to a higher number
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {