Tata Rewards package lets you add a widget that supports stuffs to rewards to your Flutter app.
Add the latest version of package to your pubspec.yaml (and runflutter pub get
):
dependencies:
tata_rewards: ^0.0.47
copied to clipboard
Import the package and use it in your Flutter App.
import 'package:tata_rewards/tata_rewards.dart';
copied to clipboard
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);
await MyRewardsSdk.instance.initialize(
httpClient: httpClient,
tdlBaseUrl: "" ,
tplBaseUrl: "" ,
);
await MyRewardsSdk.instance.notifyLogin(
tdlToken:
"" ,
tplToken: "" );
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super .key});
@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: "" ,
myRewardsPadding: 16 ,
sectionGap: const SizedBox(
height: 24 ,
),
)),
);
},
child: const Text("Gamification Sdk" ),
),
)
],
),
);
}
}
copied to clipboard
đšī¸ 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.
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_fortune_wheel , flutter_html , flutter_svg , http , image_fade , intl , lottie , responsive_sizer , rive , scratcher , shimmer , simple_gradient_text , url_launcher
More Packages that depend on tata_rewards