t_chain_payment_sdk 2.1.2 copy "t_chain_payment_sdk: ^2.1.2" to clipboard
t_chain_payment_sdk: ^2.1.2 copied to clipboard

T-Chain Payment is a B2B service helping SMEs add another channel to convert in-app point/money into crypto currency and vice versa using blockchain technology with minimum efforts

example/lib/main.dart

import 'package:example/cubit/fcm/fcm_cubit.dart';
import 'package:example/cubit/payment/payment_cubit.dart';
import 'package:example/firebase_options.dart';
import 'package:example/router/screen_router.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:t_chain_payment_sdk/t_chain_payment_sdk.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  runApp(BlocProvider<FcmCubit>(
    create: (context) => FcmCubit(),
    child: MyApp(),
  ));
}

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

  final _router = ScreenRouter();

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MultiBlocProvider(
      providers: [
        BlocProvider(create: (context) => FcmCubit()),
        BlocProvider(create: (context) => PaymentCubit()),
      ],
      child: MaterialApp(
        title: 'T-Chain Payment SDK Demo',
        localizationsDelegates: const [
          TChainPaymentLocalizations.delegate,
        ],
        supportedLocales: const [
          Locale('en'), // English
          Locale('id'), // Indonesia
        ],
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        initialRoute: ScreenRouter.root,
        onGenerateRoute: _router.generateRoute,
      ),
    );
  }
}
5
likes
50
pub points
0%
popularity

Publisher

unverified uploader

T-Chain Payment is a B2B service helping SMEs add another channel to convert in-app point/money into crypto currency and vice versa using blockchain technology with minimum efforts

Homepage
Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

auto_size_text, copy_with_extension, decimal, dio, equatable, flutter, flutter_bloc, flutter_localizations, flutter_svg, fluttertoast, http, intl, json_annotation, modal_progress_hud_nsn, pigeon, qr_flutter, retrofit, shared_preferences, shimmer_animation, uni_links, url_launcher, web3dart

More

Packages that depend on t_chain_payment_sdk