Giter VIP home page Giter VIP logo

growthbook-sdk-flutter's People

Contributors

chandrabezzo avatar dk070202 avatar palmsey avatar princebansal avatar rlopzc avatar

Stargazers

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

Watchers

 avatar  avatar

growthbook-sdk-flutter's Issues

Usage of Equatable package in GBFeature class

Hey!
I would like to propose an enhancement for the growbook package that would make it even more convenient to use.

I suggest adding the usage of the equatable package to the GBFeature class to enable object comparison during the refresh of all features. This will allow users to easily determine if any changes occurred in the GBFeature without the need for additional checks at the user interface level.

Equatable is a library that simplifies object comparison based on their fields and automatically generates equals and hashCode methods. By adding Equatable to GBFeature, users can efficiently identify data changes during the refresh and take appropriate actions without unnecessary checks.

I believe that this enhancement will make growbooksdk even more appealing to developers and help save time by reducing the need for writing additional code to check for changes.

Thank you for considering my suggestion! I am available to provide any further information or answer any questions if needed.

Realtime Updates

Hi!

As you may be aware, GrowthBook have recently added support for realtime updates, allowing changes to features to be picked up in real time. Currently this feature is only available for the React SDK, and I would love it if the Flutter SDK also offered support for this.

We're currently having to poll GrowthBook manually to achieve functionality close to realtime updates, but being limited to 10M API calls per month means we have to put a lot of consideration into the frequency of polling as our number of users increases. Utilising GrowthBook's new support for realtime updates would greatly alleviate this issue, allowing us to only make API calls when our features are updated.

features all always empty

I'm getting always the features map empty, Any advice?

This is how I have implemented it

User? user = await getUser();
  var attributes = {
    'user_id': user?.id ?? '',
    'user_name': user?.name ?? '',
    'user_email': user?.email ?? '',
    'user_phone': user?.phone ?? '',
  };
  gb = GBSDKBuilderApp(
    apiKey: AppConstants.GROWTHBOOK_API_KEY,
    attributes: attributes,
    growthBookTrackingCallBack: (gbExperiment, gbExperimentResult) {},
    hostURL: AppConstants.GROWTHBOOK_HOST_URL,
  ).initialize();
  logDebug('GrowthBook initialized');

Whitelist domain or package name or bundleId

Is possible to implement whitelist like Google API on self hosted Growthbook?

  • domain for web/backend
  • package name for Android
  • bundle id for iOS

So, we can prevent anyone that know our API key and try to fetch the config directly via browser url using API. We need to handle or prevent if anyone try to DDoS our server with request Growthbook data repetitively. Thanks.

Retract Version 1.2.0

Since you publish new architechture with version 2.0.0. Can Growthbook team retract version 1.2.0 from your admin dashboard? So, if anyone use caret version implementation like

growthbook_sdk_flutter: ^1.1.2

Will solve the issue automatically without any declaration from dependency_overrides at pubspec.yaml. Thanks.

Annotation GBFeaturesConverter Flutter Web

Flutter SDK 3.3.10
Growthbook SDK 2.0.0
I think this issue related with analysis issue score from pub.dev.

[2023-03-17T10:59:19.480Z] Target dart2js failed: Exception: Warning: The 'dart2js' entrypoint script is deprecated, please use 'dart compile js' instead.
[2023-03-17T10:59:19.480Z] /opt/flutter/.pub-cache/hosted/pub.dartlang.org/growthbook_sdk_flutter-2.0.0+0/lib/growthbook_sdk_flutter.dart:13:1:
[2023-03-17T10:59:19.480Z] Error: Error when reading '/opt/flutter/.pub-cache/hosted/pub.dartlang.org/growthbook_sdk_flutter-2.0.0+0/lib/src/annotation/gb_features_deserializer.dart': Error reading '/opt/flutter/.pub-cache/hosted/pub.dartlang.org/growthbook_sdk_flutter-2.0.0+0/lib/src/annotation/gb_features_deserializer.dart' (No such file or directory)
[2023-03-17T10:59:19.480Z] export 'src/annotation/gb_features_deserializer.dart';
[2023-03-17T10:59:19.480Z] ^
[2023-03-17T10:59:19.480Z] /opt/flutter/.pub-cache/hosted/pub.dartlang.org/growthbook_sdk_flutter-2.0.0+0/lib/src/Features/features_model.dart:10:4:
[2023-03-17T10:59:19.480Z] Error: Couldn't find constructor 'GBFeaturesConverter'.
[2023-03-17T10:59:19.480Z] @GBFeaturesConverter()
[2023-03-17T10:59:19.480Z] ^^^^^^^^^^^^^^^^^^^
[2023-03-17T10:59:19.480Z] /opt/flutter/.pub-cache/hosted/pub.dartlang.org/growthbook_sdk_flutter-2.0.0+0/lib/src/Features/features_model.g.dart:11:23:
[2023-03-17T10:59:19.480Z] Error: Couldn't find constructor 'GBFeaturesConverter'.
[2023-03-17T10:59:19.480Z] features: const GBFeaturesConverter()
[2023-03-17T10:59:19.480Z] ^^^^^^^^^^^^^^^^^^^
[2023-03-17T10:59:19.480Z] Error: Compilation failed.

Semantic Versioning

Hi team!

When creating an attribute there is now the option to assign a version string attribute. This means we can compare version strings to target specific app versions (i.e. all devices running version 1.20.3 or greater). This was a feature requested and implemented here

This is currently only supported by the latest Javascript and React SDKs, so adding a Flutter SDK implementation of this would be a big help.

conflig with dio 5.0.1

Because every version of growthbook_sdk_flutter depends on dio ^4.0.6 and abs depends on dio ^5.0.1, growthbook_sdk_flutter is forbidden.
So, because abs depends on growthbook_sdk_flutter any, version solving failed.

LateError: LateInitializationError: Field 'data' has not been initialized.

On production we are receiving errors of this type:

LateError: LateInitializationError: Field 'data' has not been initialized.
  File "feature_data_source.dart", in FeatureDataSource.setUpModel
  File "feature_data_source.dart", line 17, in FeatureDataSource.fetchFeatures
  File "<asynchronous suspension>"
  File "features_view_model.dart", line 14, in FeatureViewModel.fetchFeature
  File "<asynchronous suspension>"
  File "growth_book_sdk.dart", line 84, in GrowthBookSDK.refresh
  File "<asynchronous suspension>"
  File "growthbook_notifier.dart", line 45, in GrowthbookNotifier._initialize.<fn>

This happens on android devices mainly but also on iOS ones

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.