trusted_shops_flutter 0.1.0 copy "trusted_shops_flutter: ^0.1.0" to clipboard
trusted_shops_flutter: ^0.1.0 copied to clipboard

Unofficial Flutter plugin wrapping the official Trusted Shops iOS and Android SDKs for Trustbadge and buyer protection.

example/lib/main.dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:trusted_shops_flutter/trusted_shops_flutter.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  const integrationId = String.fromEnvironment(
    'TRUSTED_SHOPS_INTEGRATION_ID_DE',
  );
  if (integrationId.isNotEmpty) {
    await TrustedShops.start(
      defaultMarket: TrustedShopsMarket.deu,
      integrationIds: {TrustedShopsMarket.deu: integrationId},
      loggingEnabled: kDebugMode,
    );
  }

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Trusted Shops Flutter')),
        body: const Padding(
          padding: EdgeInsets.all(24),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.stretch,
            children: [
              Text(
                'Pass --dart-define=TRUSTED_SHOPS_INTEGRATION_ID_DE=<id> '
                'when running this example.',
              ),
              SizedBox(height: 24),
              TrustbadgeView(height: 72),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
160
points
91
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Unofficial Flutter plugin wrapping the official Trusted Shops iOS and Android SDKs for Trustbadge and buyer protection.

Repository (GitHub)
View/report issues

Topics

#android #ios #widget

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on trusted_shops_flutter

Packages that implement trusted_shops_flutter