lqd_my_flutter_package 0.0.9 copy "lqd_my_flutter_package: ^0.0.9" to clipboard
lqd_my_flutter_package: ^0.0.9 copied to clipboard

thelqd.online License - Version 0.0.9 - April 2nd, 2024 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation cove [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:lqd_my_flutter_package/shelf.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;
  late EventClient _eventClient;

  @override
  void initState() {
    super.initState();
    // naming
    EventClient eventClient = EventTrackingFactory.createTrackingAdapter();
    eventClient.setApiKey('JyLyMTKc4s3VtbpGT6B9zkpo9958vcv3PfNoa6ef');
    // eventClient.setTenantId('JyLyMTKc4s3VtbpGT6B9zkpo9958vcv3PfNoa6ef');

    setState(() {
      _eventClient = eventClient;
    });
  }

  void _incrementCounter() {
    IClickParams params = IClickParams(additionalData: {});

    _eventClient.logClickEvent('skip-for-now_link',
        params: params,
        currentPopupScreen: {'name': 'my-job', 'uiKey': 'my-job-ui-key'});

    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}
1
likes
120
points
8
downloads

Publisher

unverified uploader

Weekly Downloads

thelqd.online License - Version 0.0.9 - April 2nd, 2024 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the 'Software') to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following

Documentation

API reference

License

BSL-1.0 (license)

Dependencies

device_info_plus, fk_user_agent, flutter, flutter_native_timezone, http, logger, network_info_plus, package_info

More

Packages that depend on lqd_my_flutter_package