tata_rewards 0.0.43 copy "tata_rewards: ^0.0.43" to clipboard
tata_rewards: ^0.0.43 copied to clipboard

A Flutter package that provides a seamless integration with the Tata Rewards system. It includes features like Scratch Cards, Spin-the-Wheel games, and AI-powered trivia to enhance user engagement. Id [...]

Tata Rewards #

Tata Rewards package lets you add a widget that supports stuffs to rewards to your Flutter app.

Installation #

  1. Add the latest version of package to your pubspec.yaml (and runflutter pub get):
dependencies:
  tata_rewards: ^0.0.43
  1. Import the package and use it in your Flutter App.
    import 'package:tata_rewards/tata_rewards.dart';

Example #

There are a number of properties that you can modify:

https://docs.google.com/spreadsheets/d/1XLEHj1LGox_S-whE9bJ5HoMCyNYrhE37eOzf-Ci0qXc/edit?usp=sharing ( but for this need to get verify from ESMAGICO)



import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:tata_rewards/tata_rewards.dart';

import 'firebase_options.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  http.Client httpClient = http.Client();

  await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);

  // Initialize the SDK
  await MyRewardsSdk.instance.initialize(
    httpClient: httpClient,
    // tdlBaseUrl: "",
    tdlBaseUrl: "",
    tplBaseUrl: "",
  );

  await MyRewardsSdk.instance.notifyLogin(
      tdlToken:
      "",
      tplToken: "");
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Gamification SDK',
      debugShowCheckedModeBanner: false,
      home: HomePage(),
    );
  }
}

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

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("My Rewards Sdk"),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Center(
            child: ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => MyRewardsPage(
                        title: "My Rewards",
                        externalCustomerId: "Abhishek-14",
                        myRewardsPadding: 16,
                        sectionGap: const SizedBox(
                          height: 24,
                        ),
                      )),
                );
              },
              child: const Text("Gamification Sdk"),
            ),
          )
        ],
      ),
    );
  }
}

Tata Rewards

Next Goals #

  • 🕹ī¸ Expand Games Portfolio Add new games alongside Scratch Cards, like Spin-the-Wheel, offering diverse gamified experiences.

  • 🧠 AI-Powered Trivia Introduce engaging trivia games powered by AI to elevate user interaction.

  • 🔍 Advanced Analytics Coming soon: Gain insights into user engagement and performance metrics with enhanced reporting tools.

2
likes
100
points
1.96k
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides a seamless integration with the Tata Rewards system. It includes features like Scratch Cards, Spin-the-Wheel games, and AI-powered trivia to enhance user engagement. Ideal for applications looking to integrate gamified rewards and incentivize user interaction.

Homepage

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

cached_network_image, cloud_firestore, confetti, dotted_dashed_line, firebase_core, fk_user_agent, flutter, flutter_cache_manager, flutter_html, flutter_svg, http, image_fade, intl, lottie, responsive_sizer, scratcher, shimmer, simple_gradient_text, url_launcher

More

Packages that depend on tata_rewards