paynow_bloc 1.0.0 copy "paynow_bloc: ^1.0.0" to clipboard
paynow_bloc: ^1.0.0 copied to clipboard

outdated

Paynow as a Bloc

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:paynow_bloc/paynow_bloc.dart';
import 'routes.dart';
import 'theme.dart';

import 'screens/cart/cart_screen.dart';
// import 'package:'

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    final app = MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: theme(),
      // home: SplashScreen(),
      // We use routeName so that we dont need to remember the name
      initialRoute: CartScreen.routeName,
      routes: routes,
    );
    final paynow = Paynow(
      integrationId: "11287",
      integrationKey: "a072bd58-c25e-48cb-8516-3d33b5b85f64",
      returnUrl: "supercode://paynow.app",
      resultUrl: "supercode://paynow.app"
    );
    return BlocProvider(
      create: (_) => PaynowBloc(
        paynow: paynow
      ),
      child: app,
    );
  }
}
2
likes
0
points
12
downloads

Publisher

verified publishersuperdarkcodelabs.co.zw

Weekly Downloads

Paynow as a Bloc

Homepage

License

unknown (license)

Dependencies

bloc, flutter, logging, paynow, url_launcher

More

Packages that depend on paynow_bloc