Welcome to my new adbox (Anonymous disscusion box) project.
-
dfxinstalled to your local machine, making sure you can deploy canister to your local machine. -
flutterinstalled, and useflutter doctor -vmake sure everything works -
flutter pub getbefore running this example. -
If you want to use MacOS to debug, make sure
macos/Runner/DebugProfile.entitlementsandmacos/Runner/Release.entitlementshave content below xml ... com.apple.security.network.client -
Deploy canister use
dfx deploy, theADBoxcanister will be running on your local replica. Make sure you put the ADBoxCanister canister id inside.dfx/local/canister_ids.jsonto yourmain.dart, the json like this: json { "__Candid_UI": { "local": "x2dwq-7aaaa-aaaaa-aaaxq-cai" }, "adbox_backend": { "local": "x5cqe-syaaa-aaaaa-aaaxa-cai" } } -
inside
main.dart, you should change settings withcanisterIdto your actual id. dart // initialize agent, change canister id here: (lib/adbox_canister.dart) _agentFactory ??= await AgentFactory.createAgent( canisterId: newCanisterId ?? (isMainnet ? "ffy5o-bqaaa-aaaag-abphq-cai" : "br5f7-7uaaa-aaaaa-qaaca-cai"), ); -
start bash flutter run