Flutter

  1. Adrop์„ Import ํ•˜์„ธ์š”.

  2. ํ”„๋กœ์ ํŠธ์˜ ๋Ÿฐํƒ€์ž„ ๋ผ์ดํ”„์‚ฌ์ดํด ์ดˆ๊ธฐ์—, ๊ฐ€๊ธ‰์ ์ด๋ฉด ์‹œ์ž‘ ์‹œ Adrop์„ ์ดˆ๊ธฐํ™”ํ•ด์ฃผ์„ธ์š”.

import 'package:adrop_ads_flutter/adrop_ads_flutter.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    initialize();
  }

  Future<void> initialize() async {
    // true for production
    await Adrop.initialize(false);
  }
}

๋งŒ์•ฝ production์ด False์ผ ๊ฒฝ์šฐ, ์—๋Ÿฌ ๋กœ๊ทธ๋ฅผ ์ฒดํฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์‚ฌ์šฉ์ž ์†์„ฑ ์„ธํŒ…

์•ฑ ์‚ฌ์šฉ์ž๋ฅผ ์„ค๋ช…ํ•˜๋Š” ์†์„ฑ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ง€์›ํ•˜๋Š” ํ‚ค์— ๋Œ€ํ•ด ์‚ฌ์ „ ์„ค์ •๋œ ๊ฐ’์„ ํ™•์ธํ•˜์„ธ์š”. AdropMetrics์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด์„ธ์š”.

var key = "YOUR_PROPERTY_KEY";
var value = "YOUR_PROPERTY_VALUE";
AdropMetrics.setProperty(key, value);

Last updated