Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: string base comparison #16

Merged
merged 1 commit into from
Aug 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
61 changes: 33 additions & 28 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:growthbook_sdk_flutter/growthbook_sdk_flutter.dart';

Expand Down Expand Up @@ -47,18 +48,16 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
late final GrowthBookSDK gb;
@override
void initState() {
super.initState();
_tabController = TabController(length: tabNames.length, vsync: this);
tabs = <Tab>[...tabNames.map((e) => Tab(text: e)).toList()];

/// Initializing SDK.
initializeSDK();
super.initState();
}

void initializeSDK() {
gb = GBSDKBuilderApp(
apiKey: '<KEY>',
hostURL: '<HOST URL>',
apiKey: kReleaseMode ? '<PROD_KEY>' : '<DEV_KEY>',
hostURL: '<HOST_URL>',
attributes: userAttr,
growthBookTrackingCallBack: (experiment, experimentResult) {
/// Track feature.
Expand Down Expand Up @@ -91,31 +90,37 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {

@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
body: Column(
children: [
_getRightWidget(),
Expanded(
child: TabBarView(
controller: _tabController,
children: [
for (var i = 0; i < tabNames.length; i++)
Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(tabNames[i]),
ElevatedButton(
onPressed: () {}, child: const Text('Press'))
],
),
return Scaffold(
appBar: AppBar(
title: const Text('GrowthBook SDK'),
),
body: Column(
children: [
_getRightWidget(),
Expanded(
child: TabBarView(
controller: _tabController,
children: [
for (var i = 0; i < tabNames.length; i++)
Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(tabNames[i]),
ElevatedButton(
onPressed: () {
//
gb.features.forEach((key, value) {});
},
child: const Text('Press'),
)
],
),
],
),
),
],
),
],
),
),
],
),
);
}
Expand Down
23 changes: 8 additions & 15 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -120,20 +120,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.6"
enhanced_enum:
dependency: transitive
description:
name: enhanced_enum
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
file:
dependency: transitive
description:
Expand Down Expand Up @@ -220,7 +213,7 @@ packages:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
version: "0.1.4"
meta:
dependency: transitive
description:
Expand All @@ -241,7 +234,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
pub_semver:
dependency: transitive
description:
Expand Down Expand Up @@ -288,7 +281,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -323,7 +316,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.8"
version: "0.4.9"
tuple:
dependency: transitive
description:
Expand All @@ -344,7 +337,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.2"
watcher:
dependency: transitive
description:
Expand All @@ -360,4 +353,4 @@ packages:
source: hosted
version: "3.1.1"
sdks:
dart: ">=2.16.2 <3.0.0"
dart: ">=2.17.2 <3.0.0"