customized_webview 0.1.0
customized_webview: ^0.1.0 copied to clipboard
A Flutter plugin for handling webviews with download and external app support. Supports file downloads, UPI payments, and external app launches.
example/lib/main.dart
// example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:customized_webview/customized_webview.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Customized WebView Example',
theme: ThemeData(
primarySwatch: Colors.blue,
useMaterial3: true,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Customized WebView Example'),
),
body: PaymentWebView(
url: 'https://example.com',
onError: (error) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Error: $error'),
backgroundColor: Colors.red,
),
);
},
loadingWidget: const Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
CircularProgressIndicator(),
SizedBox(height: 16),
Text('Loading...'),
],
),
),
),
);
}
}