one_target_mobile_sdk 0.0.7 copy "one_target_mobile_sdk: ^0.0.7" to clipboard
one_target_mobile_sdk: ^0.0.7 copied to clipboard

G1 tracking's plugin

example/lib/main.dart

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:one_target_mobile_sdk/one_target_mobile_sdk.dart';
import 'package:one_target_mobile_sdk_example/screens/tracking/advancedTracking/search_flight_screen.dart';
import 'package:one_target_mobile_sdk_example/screens/tracking/simpleTracking/simple_tracking_screen.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

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

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

  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      enableLog: true,
      debugShowCheckedModeBanner: true,
      defaultTransition: Transition.cupertino,
      home: Scaffold(
        appBar: AppBar(
          leading: IconButton(
            icon: const Icon(Icons.arrow_back_ios, color: Colors.white),
            onPressed: () {
              exit(0);
            },
          ),
          centerTitle: true,
          title: const Text('OneTargetMobileSDK'),
        ),
        body: Container(
          padding: const EdgeInsets.all(16.0),
          child: ListView(
            physics: const BouncingScrollPhysics(),
            children: [
              SampleButton(
                text: "Simple tracking",
                onPressed: () {
                  Get.to(() => const SimpleTrackingScreen());
                },
              ),
              SampleButton(
                text: "Advanced tracking",
                onPressed: () {
                  Get.to(() => const SearchFlightScreen());
                },
              ),
              // SampleButton(
              //   text: "IAM Sample",
              //   onPressed: () {
              //     Get.to(() => const IAMScreen());
              //   },
              // ),
            ],
          ),
        ),
      ),
    );
  }
}