yalla_pay_sudan 1.0.2
yalla_pay_sudan: ^1.0.2 copied to clipboard
Flutter SDK for YallaPaySudan payment gateway. Supports one-time payments, subscriptions, webhook verification, and in-app WebView checkout.
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'payment_page.dart';
Future<void> main() async {
await dotenv.load();
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
ThemeMode _themeMode = ThemeMode.light;
void _toggleTheme() {
setState(() {
_themeMode = _themeMode == ThemeMode.dark
? ThemeMode.light
: ThemeMode.dark;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'YallaPay Sudan',
debugShowCheckedModeBanner: false,
themeMode: _themeMode,
theme: ThemeData(
colorSchemeSeed: const Color(0xFF00897B),
useMaterial3: true,
brightness: Brightness.light,
),
darkTheme: ThemeData(
colorSchemeSeed: const Color(0xFF00897B),
useMaterial3: true,
brightness: Brightness.dark,
),
home: PaymentPage(onToggleTheme: _toggleTheme),
);
}
}