t_chain_payment_sdk 1.0.0 t_chain_payment_sdk: ^1.0.0 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
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';
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',
theme: ThemeData(
primarySwatch: Colors.blue,
),
initialRoute: ScreenRouter.root,
onGenerateRoute: _router.generateRoute,
),
);
}
}