flutter_wallet_card 3.0.4 flutter_wallet_card: ^3.0.4 copied to clipboard
Flutter wallet card for iOS devices. Generate Apple Pass card using either locally stored file or download it from web via url.
import 'package:flutter/cupertino.dart';
import 'package:flutter_wallet_card_example/pass.dart';
void main(List<String> args) {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return CupertinoApp(
home: CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: const Text('Flutter Wallet Card Example'),
),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Apple wallet cards using URL'),
const SizedBox(height: 5),
CupertinoButton.filled(
onPressed: () => generateWalletPassFromUri(exampleUrl),
child: Text('Add apple pass'),
),
const SizedBox(height: 20),
const Text('Apple wallet cards using File Path'),
const SizedBox(height: 5),
CupertinoButton.filled(
onPressed: () => generateWalletPassFromPath(),
child: Text('Add apple pass (from path)'),
),
],
),
),
),
);
}
}