We are using the device_calendar plugin and we are trying to reproduce the example app in ours. Im running into one error that I dont understand. The error is on the "enum DayOfWeekGroup". It is undefined even though I am including the package import. I tried adding it manually from the example code but it exists outside of the example project so its causing issues.
the plugin is : device_calendar: ^3.0.0+1
The enum exists in src folder outside the example everything else is being pulled into the package from the import but this enum.
This feature is not in the plugin yet, the workaround is use DayOfWeek enum in place of DayOfWeekGroup just in case someone is messing with the new version of device Calendar plugin like I was :)
Related
I am desperately trying to figure out how to initializeApp with Flutter (not React Native).
I know about the functions to use, but I can not find the firebaseConfig I need to pass into the function.
And no matter what I search for, every resources references to React Native, like as if nobody codes with Flutter since Firebase 9 has been released anymore (or I am the only dummy which is not able to resolve this by myself).
Can someone tell me where to get the firebaseConfig object from?
If I add a new app to my project, I only get the google-services.json, which does NOT include the firebaseConfig object I need to pass.
I understand your confusion now, let me explain. When the guy in the video talks about Firebase v9 he is talking about the SDK version which in the case of Javascript (which I suppose is his main topic in his channel) is currently 9.17.1 an the version 9 has been around since 2021 so it is not new. The different SDKs have their own versions for each platform so thinking it will be the same in every SDK is a mistake by itself. You can check the SDKS here. So there is no Firebase v9, there is a Firebase SDK for javascript version 9. They managed in that way in javascript and in flutter it is not the same. Being that the last update in the flutter SDK was literally yesterday I'm pretty sure they have their reasons to not implement the same functions in flutter since 2021.
Now, one of the thinks the guy talks in the video is deconstructing, which is something common in javascript. The way you do this in flutter is by using show.
So you would be doing this for example:
import 'package:cloud_firestore/cloud_firestore.dart' show FirebaseFirestore, QuerySnapshot; //Add everything you would be using
This way only the specific parts of the library will be imported and the amount of code the Dart VM has to load will be reduced.
As of the access to documents, it is still the same but you can easily create a helper class that contents your references to your collections and then just use that class to reduce the boilerplate code created by the firebase SDK.
You have to install the Firebase CLI and run firebase init.
You need to use the package firebase_core that will give you access to the class Firebase so you can use it to initialize your app Firebase.initializeApp() you can pass the default options for the current platform using Firebase.initilizeApp(options: DefaultFirebaseOptions.currentPlatform) usually your IDE will automatically import the corresponding package but in case it does not you would have to import 'firebase/firebase_options.dart';
An useful link to the documentation: Add Firebase to your Flutter App
I created an app for a small group of people. I created a lot of widgets/pages and models. Now another group asked if I could make them the app too. I could create a new project and copy/paste al stuff in there, but more groups want this app, and its a lot of work.
My idea was to create something like a package or export the whole code base to another destination, so that I only need to edit one code base and it changes on all app instances. For the new group I only need to change the API URL and some images which can be changed in pub spec.yaml and main.dart. Do you have a working solution for this?
Please read those articles about creating new package:
Flutter Website: link
Tutorial: link
Also, Pay attention to what is the supported platforms in you package and test it with each platform. You can also publish it to Pub.Dev if you want. but must be on GitHub first.
I know the name of the plugin to add into the ionic2. However, when come to import it by using ionic-native, I don't know how to write it.
For example, my plugin is: cordova-plugin-ms-adal, and I install
ionic plugin add cordova-plugin-ms-adal
But how to import this plugin? Is the following correct?
import {MSADAL} from 'ionic-native';
The quickest way is to dive straight into the source code of Ionic Native, you can find it GitHub. If we take the Geolocation plugin for example, you can see the following in the code:
export class Geolocation
This means that Geolocation is the name of the plugin you need to import.
However, in your case there is a simple explanation as to why it doesn't work. The cordova-plugin-ms-adal is simply not supported in Ionic Native. You could either create the implementation yourself and create a pull request to get it merged into the library or open an issue on GitHub.
I've being trying to implement a native File picker on BlackBerry 10 today, I linked it against the required Library -lbbcascadespickers
Included <bb/cascades/pickers/FilePicker> that links to the FilePicker.hpp class and all seems fine, but when I try to create a new File picker it says "error: 'FilePicker' was not declared in this scope"
Code is as follows:
FilePicker* filePicker = new FilePicker();
filePicker->setType(FileType::Picture);
filePicker->setTitle("Select Picture");
filePicker->setMode(FilePickerMode::Picker);
filePicker->open();
// Connect the fileSelected() signal with the slot.
QObject::connect(filePicker,
SIGNAL(fileSelected(const QStringList&)),
this,
SLOT(onFileSelected(const QStringList&)));
// Connect the canceled() signal with the slot.
QObject::connect(filePicker,
SIGNAL(canceled()),
this,
SLOT(onCanceled()));
I'm brand new to BlackBerry development so don't really know what to do, I've cleaned the project and built it many times but it won't play.
I was going by the example on BlackBerry's website:
https://developer.blackberry.com/native/reference/cascades/bb_cascades_pickers__filepicker.html
I wanted to open it from QML (I'm using Qt Quick and not BB components)
If anyone can help it will be deeply appreciated
The compiler can't find FilePicker. So either use a using to tell the compiler where to look:
using namespace bb::cascades::pickers;
or fully qualify the name of the class:
bb::cascades::pickers::FilePicker* filePicker = new FilePicker();
Hey guys so I am trying to dev a app for IPhone and am very very stumped right now. I have tried using Contact Editor - ANE (http://extensionsforair.com/extensions/contact-editor/#comment-7488) but I get an error:
VerifyError: Error #1014: Class pl.mllr.extensions.contactEditor::ContactEditor could not be found.
at runtime::ContentPlayer/loadInitialContent()
at runtime::ContentPlayer/playRawContent()
at runtime::ContentPlayer/playContent()
at runtime::AppRunner/run()
at ADLAppEntry/run()
at global/runtime::ADLEntry()
I made sure I included the correct file path under the ActionScript Build Path, besides that I don't know what else I can do. I do get the function like ContactsSimpe() function that hints when looking for a function. So I know it is connecting but once I go to compile and test in the flash pro I get this error. Here is some code that may help:
code....
import pl.mllr.extensions.contactEditor.ContactEditor;
public class soscode extends MovieClip {
var contactEditor:ContactEditor;
public function soscode() {
stop();
init();
contactEditor.getContacts();
}
code...
in my project window on left the .swc file for the native extension is in the reference folder. That is about it.
I really need some help on this an if you could give me a hand I would much appreciate it!
David,
Please let me know if you need anything else.
I'm guessing this might be a bit late now, but I've just been having this problem myself, and it was caused by the ANE not being packaged with the app when it's sent to the device / simulator.
Classes within the NE weren't being found at runtime, but were accessible in Flash Builder.
It turned out that by default the .ANE file wasn't copied to the device.
To fix this, change the following project property:
ActionScript Build Packaging -> Apple iOS -> Native Extensions -> Check 'Package' for the ANE
No idea why it wasn't included by default. When you uncheck 'Package' you get a warning telling you that it may cause runtime issues!
Hope this is of use for somebody.