A Flutter plugin for using the native Ada SDK.
Here are steps to configure a fresh project:
- Add plugin dependency to the
pubspec.yaml
file:
dependencies:
ada: ^1.0.0-beta01
- Create
AdaViewController
instance:
class _MyState extends State<MyApp> {
final _controller = AdaViewController(
config: const AdaConfig(
publisherId: "publisher-id",
tagId: "tag-id",
),
);
// ...
}
- Create
AdaView
widget:
class _MyState extends State<MyApp> {
// ...
@override
Widget build(BuildContext context) {
return AdaView(controller: _controller);
}
}
Building for Android platform requires repository configuration in the settings.gradle
file:
dependencyResolutionManagement {
repositories {
maven {
url "https://us-central1-maven.pkg.dev/mobile-sdk-fd2e4/adservr-maven"
}
}
}