Last updated:
0 purchases
flyswitch
Flyswitch Flutter Package #
Flyswitch is a marketing tool that generates native stateful/less UI components that can be modified and published on the fly without requiring the app to be rebuilt.
The Flyswitch Flutter Package makes it simple for developers to connect to and use the Flyswitch service in their Flutter applications.
Warning
This package is still in development and is not yet ready for production use.
Although we have tested it thoroughly, there might be some bugs that we haven't discovered yet.
Please use it at your own risk.
We will update this README file once the package is ready for production use.
Getting Started #
To use Flyswitch in your Flutter application, take the following steps:
At FlySwitch Platform #
Create an account at https://flyswitch.io
Create a new project if not already done, or use an existing one
Create the widget you wish to use in your app, or use an existing one
Design your widget using the Flyswitch UI Builder
Press deploy to publish your widget
Click the connect button to get your API key and widget ID
Flutter Application #
Import the Flyswitch package in your main.dart file:
import 'package:flyswitch/flyswitch.dart'
copied to clipboard
Initialize Flyswitch by adding the following code in the main function:
void main() {
WidgetsFlutterBinding.ensureInitialized();
// Initialize Flyswitch with your API key (obtained from Flyswitch Platform)
FlySwitch.init("API_KEY");
runApp(MyApp());
}
copied to clipboard
To show the widget, you can do either of the following:
Load Then Show
// Load the widget
// This is optional, if you don't load the widget, it will be loaded automatically when you call the show method
// But if you want to load the widget before showing it, you can use this method
// This is useful if you want to show the widget after a specific event (e.g. user clicks a button)
await FlySwitch.i.load("WIDGET_ID")
// Show the widget
// This will show the widget if it's already loaded, otherwise it will load the widget first then show it
FlySwitch.i.show("WIDGET_ID")
copied to clipboard
Directly use the show method to load and show the widget
// Show the widget
// This will load the widget first then show it if it's not loaded yet or show it directly if it's already loaded
FlySwitch.i.show("WIDGET_ID")
copied to clipboard
Documentation #
Coming Soon
Support #
If you have any questions or issues with Flyswitch, please don't hesitate to contact us at [email protected].
or, push an issue on the GitHub repository.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.