-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from flagship-io/feature/support-flutter
Feature/support flutter
- Loading branch information
Showing
5 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,7 @@ codebase-analyzer | |
|
||
### Supported file languages | ||
- .cs .fs | ||
- .dart | ||
- .go | ||
- .java | ||
- .js .jsx | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
## Supported file languages | ||
- .cs .fs | ||
- .dart | ||
- .go | ||
- .java | ||
- .js .jsx | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//////////////////////////////// | ||
/////// Get Flag /////// | ||
//////////////////////////////// | ||
import 'package:flagship/flagship.dart'; | ||
import 'package:flagship/model/flag.dart'; | ||
|
||
|
||
// Get the current visitor | ||
var currentVisitor = Flagship.getCurrentVisitor(); | ||
|
||
// Fetch flags | ||
currentVisitor?.fetchFlags().whenComplete(() { | ||
// Ex: get flag for vip feature | ||
Flag flag = currentVisitor.getFlag("displayVipFeature",false); | ||
Flag flag = currentVisitor.getFlag("backgroundColor", "green"); | ||
Flag flag = currentVisitor.getFlag("backgroundSize", 16); | ||
}); | ||
|
||
// The getFlag function can be directly called through the "currentVisitor" instance if you | ||
// already fetched it elsewhere in the application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters