m4e_sdk 0.0.5-dev.4 icon indicating copy to clipboard operation
m4e_sdk: ^0.0.5-dev.4 copied to clipboard

A dart package for integration m4e payments into flutter and dart applications

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:sdk_example/repositories/auth_repository.dart';
import 'package:sdk_example/repositories/transaction_repository.dart';
import 'package:sdk_example/repositories/wallet_repository.dart';
import 'package:sdk_example/screens/auth_screens/phone_number_auth_screen.dart';
import 'package:m4e_sdk/m4e_sdk.dart';
import 'package:sdk_example/screens/splash_screen.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  // initialize m4e-sdk
  initializeM4eSDK(
      config: M4eSDKConfig.development(appId: M4eUniqueId().toString()));
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MultiProvider(
      providers: [
        ChangeNotifierProvider<AuthRepository>(create: (_) => AuthRepository()),
        ChangeNotifierProvider<WalletRepository>(
          create: (_) => WalletRepository(),
        ),
        ChangeNotifierProvider<TransactionRepository>(
          create: (_) => TransactionRepository(),
        ),
      ],
      builder: (context, _) {
        return MaterialApp(
          title: 'M4e SDK',
          theme: ThemeData(
            primarySwatch: Colors.indigo,
            accentColor: Colors.amber,
            visualDensity: VisualDensity.adaptivePlatformDensity,
          ),
          // home: PhoneNumberAuthScreen(),
          home: SplashScreen(),
        );
      },
    );
  }
}
1
likes
90
pub points
0%
popularity

A dart package for integration m4e payments into flutter and dart applications

Homepage

Documentation

Documentation
API reference

License

MIT (LICENSE)

Dependencies

data_connection_checker, dio, equatable, flutter, flutter_secure_storage, freezed_annotation, get_it, shortid, uuid_type

More

Packages that depend on m4e_sdk